Skip to content

Move configuration to tex-bot-deployment.yaml #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 150 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
05fc775
Move config.py
CarrotManMatt May 21, 2024
c8d8ed3
Initial changes to declare YAML schema
CarrotManMatt May 22, 2024
533c179
Fix not copying changed directory in `Dockerfile`
CarrotManMatt May 22, 2024
c797cf8
Use improved exit reasons
CarrotManMatt May 23, 2024
f47fd8c
Improve YAML loading
CarrotManMatt May 23, 2024
e36c1c6
Add restart after config change functionality
CarrotManMatt May 23, 2024
80a8b9c
Add more config settings loading
CarrotManMatt May 23, 2024
7f99890
Merge branch 'refs/heads/main' into 165-move-configuration-to-tex-bot…
CarrotManMatt May 24, 2024
14e881f
Add more config loading
CarrotManMatt May 24, 2024
36ccf6f
Add more config loading
CarrotManMatt May 24, 2024
d4d0abb
Merge branch 'refs/heads/main' into 165-move-configuration-to-tex-bot…
CarrotManMatt May 24, 2024
91cb156
Add purchase membership link setting
CarrotManMatt May 25, 2024
5f75465
Add more config loading
CarrotManMatt May 25, 2024
e38e1c8
Add final configuration loading
CarrotManMatt May 26, 2024
e73b844
Fix typing errors
CarrotManMatt May 26, 2024
5e98c80
Fix some linting errors
CarrotManMatt May 26, 2024
1e098c5
Improve `on_ready` event listener
CarrotManMatt May 26, 2024
f54db19
Fix redefined final exception message
CarrotManMatt May 26, 2024
154e4e0
Fixes
CarrotManMatt May 26, 2024
364f446
Remove unused dependencies
CarrotManMatt May 26, 2024
b87187f
Merge branch 'refs/heads/main' into 165-move-configuration-to-tex-bot…
CarrotManMatt May 26, 2024
0bb33db
Improve config structure
CarrotManMatt May 26, 2024
e0326a7
Add messages loading
CarrotManMatt May 26, 2024
a616c20
Fix Dockerfile
CarrotManMatt May 26, 2024
2fc6867
Remove unused exceptions
CarrotManMatt May 26, 2024
43972d9
Fix linting errors
CarrotManMatt May 26, 2024
40c6e61
Don't add issue details in TODO
CarrotManMatt May 26, 2024
29d54e3
Fix typing error
CarrotManMatt May 26, 2024
b4a4926
Add `get_config_value` command
CarrotManMatt May 27, 2024
6bcf128
Merge branch 'refs/heads/main' into 165-move-configuration-to-tex-bot…
CarrotManMatt May 27, 2024
2a26a96
Remove re-added exceptions after merge
CarrotManMatt May 27, 2024
6ae0176
Fix exception imports after being removed
CarrotManMatt May 27, 2024
aa796fa
Fix linting errors
CarrotManMatt May 27, 2024
c6df834
Fix typing errors
CarrotManMatt May 27, 2024
b591fb0
Implement config help command
CarrotManMatt May 27, 2024
7206f01
Update dependencies
CarrotManMatt Jun 8, 2024
9a18af9
Add initial changes for config setter command
CarrotManMatt Jun 8, 2024
c0b23af
Fix bug in assigning new values to config settings
CarrotManMatt Jun 9, 2024
94d8b03
Add TODO
CarrotManMatt Jun 9, 2024
9865120
Fix saving config to file
CarrotManMatt Jun 9, 2024
4aae5cd
Update regex functions used & add config value autocompletes
CarrotManMatt Jun 10, 2024
370a789
Fix typing & linting errors
CarrotManMatt Jun 10, 2024
f25ac5d
Remove `exceptions/messages.py`
CarrotManMatt Jun 10, 2024
6215428
Small fixes
CarrotManMatt Jun 10, 2024
c76e607
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jun 11, 2024
abc6023
Finish adding autocomplete suggestions for setting values
CarrotManMatt Jun 12, 2024
55735d2
Fix failing test
CarrotManMatt Jun 12, 2024
7528133
Fix incorrect string types used
CarrotManMatt Jun 12, 2024
ea55c51
Fix linting errors
CarrotManMatt Jun 12, 2024
9478d63
Improve config stuffs
CarrotManMatt Jun 13, 2024
64a2369
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jun 13, 2024
30be863
Add confirmation button for overwriting config value
CarrotManMatt Jun 13, 2024
7d26822
Merge branch 'main' into 165-move-configuration-to-tex-bot-deployment…
CarrotManMatt Jun 14, 2024
a994f17
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jun 15, 2024
1115948
Improve boolean handling
CarrotManMatt Jun 15, 2024
ed0d9a6
Improve error message handling
CarrotManMatt Jun 17, 2024
cea1bd6
Add "/config unset" command
CarrotManMatt Jun 18, 2024
8e29da6
Implement config file changes watcher
CarrotManMatt Jun 18, 2024
30e6217
Improve already unset message
CarrotManMatt Jun 18, 2024
38cb357
Add TODO
CarrotManMatt Jun 19, 2024
c5764c4
Update dependencies
CarrotManMatt Jun 20, 2024
8165388
Fix incorrectly bolded `@` symbol within `README.md`
CarrotManMatt Jun 26, 2024
6a6e9d5
Improve shortcut accessors & autocomplete set iterators
CarrotManMatt Jun 26, 2024
1f98a83
Fix main_guild shortcut accessor priorities
CarrotManMatt Jun 26, 2024
d698140
Update dependencies
CarrotManMatt Jun 26, 2024
6aef4ae
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jun 26, 2024
72b260b
Fix SPAG & formatting
CarrotManMatt Jun 26, 2024
5a3ed70
Update dependencies
CarrotManMatt Jun 30, 2024
6d25131
Use improved member access functions
CarrotManMatt Jun 30, 2024
16717f7
Use more specific strike action types
CarrotManMatt Jul 2, 2024
f3a4f25
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 2, 2024
51dd291
Improve code ordering in `cogs/strike.py`
CarrotManMatt Jul 2, 2024
1f52335
Fix type-annotations in `cogs/strike.py`
CarrotManMatt Jul 2, 2024
d0d15e4
Merge branch 'main' into 165-move-configuration-to-tex-bot-deployment…
CarrotManMatt Jul 2, 2024
b25908a
Update __init__.py
CarrotManMatt Jul 2, 2024
3779206
Update dependencies
CarrotManMatt Jul 10, 2024
8a633db
Rename error_capture_decorators to make it clear that they shutdown T…
CarrotManMatt Jul 11, 2024
22c76d3
Revert "Rename error_capture_decorators to make it clear that they sh…
CarrotManMatt Jul 11, 2024
35990ee
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 11, 2024
4c197a8
Improve descriptions, rename `ctx.bot` & improve strike moderation types
CarrotManMatt Jul 11, 2024
8d98bcb
Update dependencies
CarrotManMatt Jul 12, 2024
a609157
Improve selected linting rules
CarrotManMatt Jul 12, 2024
50d33ee
Improve `GetTokenAuthorisationCommandCog` name
CarrotManMatt Jul 12, 2024
1a8a41b
Improve `MessageSavingSenderComponent` name
CarrotManMatt Jul 12, 2024
fb360b4
Ensure command descriptions end with punctuation
CarrotManMatt Jul 12, 2024
6840280
Make all custom exceptions inherit from `BaseTeXBotError`
CarrotManMatt Jul 12, 2024
26907c9
Fix references of "the bot" into "TeX-Bot"
CarrotManMatt Jul 12, 2024
0d95015
Ensure all loggers annotated as `Final`
CarrotManMatt Jul 12, 2024
650e8ff
Use improved set type annotation in autocomplete functions
CarrotManMatt Jul 13, 2024
732bef9
Use improved formatting of channel & role names
CarrotManMatt Jul 13, 2024
347106c
Make command names hyphenated
CarrotManMatt Jul 13, 2024
77afbe6
Use `re.fullmatch()`, rather than ~`re.match`~
CarrotManMatt Jul 13, 2024
4908ba7
Fix missed references of "the bot" to "TeX-Bot"
CarrotManMatt Jul 13, 2024
53f3de8
Add subclass `@override` decorator for overridden methods
CarrotManMatt Jul 13, 2024
53ea6e1
Fix missed references of "the bot" to "TeX-Bot"
CarrotManMatt Jul 13, 2024
5e8c78d
Use relative imports inside local packages to fix cyclical import errors
CarrotManMatt Jul 13, 2024
a6f1611
Fix missing import & class export
CarrotManMatt Jul 13, 2024
3262c7b
Fix spelling & grammar mistakes
CarrotManMatt Jul 13, 2024
788a136
Change calls to functions to use keyword arguments to be more explicit
CarrotManMatt Jul 13, 2024
5afc748
Fix incorrect usage of whitespace and newlines
CarrotManMatt Jul 13, 2024
9a00a06
Improve ordering of Dockerfile directory copying
CarrotManMatt Jul 13, 2024
2a445ce
Fix grammar error
CarrotManMatt Jul 13, 2024
e937704
Use the term "main guild" rather than just "guild" & improve shortcut…
CarrotManMatt Jul 14, 2024
fbecdab
Apply missed small fixes
CarrotManMatt Jul 14, 2024
f4c3d39
Improve f-string formatting
CarrotManMatt Jul 14, 2024
c8a7bb8
Improve values embedded within strings
CarrotManMatt Jul 14, 2024
127fb20
Improve usage of `Final` constants & capitalisation
CarrotManMatt Jul 14, 2024
2590973
Fix missed `Final` constant usage
CarrotManMatt Jul 14, 2024
03b9e0f
Improve ping command response message
CarrotManMatt Jul 14, 2024
ff47669
Improve source command response message
CarrotManMatt Jul 14, 2024
0a56269
Improve autocomplete exception handling
CarrotManMatt Jul 14, 2024
475d2a5
Improve function names
CarrotManMatt Jul 14, 2024
49e8e3c
Fix missing linting error changes
CarrotManMatt Jul 14, 2024
c0bcd5f
Fix more uses of the term "guild" rather than "main guild"
CarrotManMatt Jul 14, 2024
44d2104
Fix incorrect punctuation
CarrotManMatt Jul 14, 2024
befbc15
Fix more incorrect linting ignores & whitespace
CarrotManMatt Jul 14, 2024
541661c
Improve guard-clause function returns
CarrotManMatt Jul 14, 2024
b832389
Improve settings names
CarrotManMatt Jul 14, 2024
d8c77b4
Fix command description
CarrotManMatt Jul 14, 2024
9bcddd4
Improve type annotations for messages iterable
CarrotManMatt Jul 14, 2024
f3296a4
Fix missed use of the term "guild" rather than "main guild"
CarrotManMatt Jul 14, 2024
828fc0f
Improve running in `main.py`
CarrotManMatt Jul 14, 2024
c4b826e
Fix missed unhyphenated command name
CarrotManMatt Jul 14, 2024
884e90a
Improve string handling
CarrotManMatt Jul 14, 2024
eafa980
Annotate that `discord.Bot.close()` function will not return
CarrotManMatt Jul 14, 2024
510317f
Improve error handling with `TeXBot.close()` function
CarrotManMatt Jul 14, 2024
2a97bd3
Fix typing & linting errors
CarrotManMatt Jul 14, 2024
4e9acec
Fix missed spelling mistakes
CarrotManMatt Jul 14, 2024
04227bf
Fix linting error
CarrotManMatt Jul 14, 2024
9831bca
Fix missing spaces in `#noqa` comments
CarrotManMatt Jul 15, 2024
97faec4
Merge branch 'main' into small-fixes
CarrotManMatt Jul 15, 2024
7efc0bb
Merge branch 'main' into 165-move-configuration-to-tex-bot-deployment…
CarrotManMatt Jul 15, 2024
0af16ce
Add missing space
CarrotManMatt Jul 20, 2024
25414c8
Merge branch 'refs/heads/main' into small-fixes
CarrotManMatt Jul 24, 2024
cc743af
Fix too limited Discord bot token regex
CarrotManMatt Jul 25, 2024
f3f7da8
Fix invalid references to `tex_bot` in context classes
CarrotManMatt Jul 25, 2024
8787f57
Rename `tex_bot` to `bot`
CarrotManMatt Jul 25, 2024
2ae9402
Merge remote-tracking branch 'refs/remotes/origin/main' into small-fixes
CarrotManMatt Jul 25, 2024
fd0212c
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 25, 2024
abc79f0
Merge remote-tracking branch 'origin/165-move-configuration-to-tex-bo…
CarrotManMatt Jul 25, 2024
ed01325
Merge branch 'refs/heads/small-fixes' into 165-move-configuration-to-…
CarrotManMatt Jul 25, 2024
14c68cb
Rename `tex_bot` to `bot`
CarrotManMatt Jul 25, 2024
cb8083d
Update dependencies
CarrotManMatt Jul 25, 2024
c80a4b2
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 27, 2024
dd5c13f
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 29, 2024
6cf83bf
Fix formatting errors
CarrotManMatt Jul 29, 2024
18893e2
Fix linting errors
CarrotManMatt Jul 29, 2024
5fbe190
Merge remote-tracking branch 'refs/remotes/origin/main' into 165-move…
CarrotManMatt Jul 29, 2024
0764b39
Fix mismatched dependencies
CarrotManMatt Jul 29, 2024
eb252db
Fix typing errors
CarrotManMatt Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 0 additions & 108 deletions .env.example

This file was deleted.

72 changes: 72 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,75 @@ local/
*.sqlite3.bak
*.db.bak
local_stubs/
TeX-Bot-deployment.yaml
TeX-Bot-deployment.yaml.original
TeX-Bot-deployment.yaml.backup
TeX-Bot-deployment.yaml.bkp
TeX-Bot-deployment.yaml.bckp
TeX-Bot-deployment.yaml.bak
TeX-Bot-deployment.yml
TeX-Bot-deployment.yml.original
TeX-Bot-deployment.yml.backup
TeX-Bot-deployment.yml.bkp
TeX-Bot-deployment.yml.bckp
TeX-Bot-deployment.yml.bak
tex-bot-deployment.yaml
tex-bot-deployment.yaml.original
tex-bot-deployment.yaml.backup
tex-bot-deployment.yaml.bkp
tex-bot-deployment.yaml.bckp
tex-bot-deployment.yaml.bak
tex-bot-deployment.yml
tex-bot-deployment.yml.original
tex-bot-deployment.yml.backup
tex-bot-deployment.yml.bkp
tex-bot-deployment.yml.bckp
tex-bot-deployment.yml.bak
TeX-Bot-settings.yaml
TeX-Bot-settings.yaml.original
TeX-Bot-settings.yaml.backup
TeX-Bot-settings.yaml.bkp
TeX-Bot-settings.yaml.bckp
TeX-Bot-settings.yaml.bak
TeX-Bot-settings.yml
TeX-Bot-settings.yml.original
TeX-Bot-settings.yml.backup
TeX-Bot-settings.yml.bkp
TeX-Bot-settings.yml.bckp
TeX-Bot-settings.yml.bak
tex-bot-settings.yaml
tex-bot-settings.yaml.original
tex-bot-settings.yaml.backup
tex-bot-settings.yaml.bkp
tex-bot-settings.yaml.bckp
tex-bot-settings.yaml.bak
tex-bot-settings.yml
tex-bot-settings.yml.original
tex-bot-settings.yml.backup
tex-bot-settings.yml.bkp
tex-bot-settings.yml.bckp
tex-bot-settings.yml.bak
TeX-Bot-config.yaml
TeX-Bot-config.yaml.original
TeX-Bot-config.yaml.backup
TeX-Bot-config.yaml.bkp
TeX-Bot-config.yaml.bckp
TeX-Bot-config.yaml.bak
TeX-Bot-config.yml
TeX-Bot-config.yml.original
TeX-Bot-config.yml.backup
TeX-Bot-config.yml.bkp
TeX-Bot-config.yml.bckp
TeX-Bot-config.yml.bak
tex-bot-config.yaml
tex-bot-config.yaml.original
tex-bot-config.yaml.backup
tex-bot-config.yaml.bkp
tex-bot-config.yaml.bckp
tex-bot-config.yaml.bak
tex-bot-config.yml
tex-bot-config.yml.original
tex-bot-config.yml.backup
tex-bot-config.yml.bkp
tex-bot-config.yml.bckp
tex-bot-config.yml.bak
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}

WORKDIR /app

COPY LICENSE .en[v] config.py main.py messages.json ./
COPY LICENSE main.py ./
RUN chmod +x main.py

COPY exceptions/ ./exceptions/
COPY utils/ ./utils/
COPY db/ ./db/
COPY config/ ./config/
COPY cogs/ ./cogs/

ENTRYPOINT ["python", "-m", "main"]
4 changes: 4 additions & 0 deletions cogs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

__all__: Sequence[str] = (
"ArchiveCommandCog",
"ConfigChangeCommandsCog",
"GetTokenAuthorisationCommandCog",
"CommandErrorCog",
"DeleteAllCommandsCog",
Expand Down Expand Up @@ -50,6 +51,7 @@
CommitteeHandoverCommandCog,
)
from .archive import ArchiveCommandCog
from .change_config import CheckConfigFileChangedTaskCog, ConfigChangeCommandsCog
from .command_error import CommandErrorCog
from .delete_all import DeleteAllCommandsCog
from .edit_message import EditMessageCommandCog
Expand Down Expand Up @@ -84,6 +86,8 @@ def setup(bot: TeXBot) -> None:
cogs: Iterable[type[TeXBotBaseCog]] = (
ArchiveCommandCog,
GetTokenAuthorisationCommandCog,
CheckConfigFileChangedTaskCog,
ConfigChangeCommandsCog,
CommandErrorCog,
DeleteAllCommandsCog,
EditMessageCommandCog,
Expand Down
Loading