You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ We recommend also reading the following if you're unsure or not confident:
35
35
*[Contributing To An Open Source Project For The First Time](https://firsttimersonly.com)
36
36
37
37
TeX-Bot is written in [Python](https://python.org) using [Pycord](https://pycord.dev) and uses Discord's [slash-commands](https://support.discord.com/hc/articles/1500000368501-Slash-Commands-FAQ) & [user-commands](https://guide.pycord.dev/interactions/application-commands/context-menus).
38
-
We would recommend being somewhat familiar with the [Pycord library](https://docs.pycord.dev), [Python language](https://docs.python.org/3/reference/index) & [project terminology](README.md#terminology) before contributing.
38
+
We would recommend being somewhat familiar with the [Pycord library](https://docs.pycord.dev), [Python language](https://docs.python.org/3/reference/index) & [project terminology](TERMINOLOGY.md) before contributing.
39
39
40
40
## Using the Issue Tracker
41
41
@@ -52,13 +52,13 @@ If you are submitting a feature request, please include the steps to implement t
52
52
### Top level files
53
53
54
54
*[`main.py`](main.py): is the main entrypoint to instantiate the [`Bot` object](https://docs.pycord.dev/stable/api/clients.html#discord.Bot) & run it
55
-
*[`exceptions.py`](exceptions.py): contains common [exception](https://docs.python.org/3/tutorial/errors) subclasses that may be raised when certain errors occur
56
-
*[`config.py`](config.py): retrieves the [environment variables](README.md#setting-environment-variables)& populates the correct values into the `settings` object
55
+
*[`exceptions/`](exceptions): contains common [exception](https://docs.python.org/3/tutorial/errors) subclasses that may be raised when certain errors occur
56
+
*[`config.py`](config.py): retrieves the [environment variables](README.md#setting-environment-variables)and populates the correct values into the `settings` object
57
57
58
58
### Other significant directories
59
59
60
60
*[`cogs/`](cogs): contains all the [cogs](https://guide.pycord.dev/popular-topics/cogs) within this project, see [below](#cogs) for more information
61
-
*[`utils/`](utils): contains common utility classes & functions used by the top-level modules & cogs
61
+
*[`utils/`](utils): contains common utility classes and functions used by the top-level modules and cogs
62
62
*[`db/core/models/`](db/core/models): contains all the [database ORM models](https://docs.djangoproject.com/en/stable/topics/db/models) to interact with storing information longer-term (between individual command events)
63
63
*[`tests/`](tests): contains the complete test suite for this project, based on the [Pytest framework](https://pytest.org)
64
64
@@ -107,11 +107,11 @@ There are separate cog files for each activity, and one [`__init__.py`](cogs/__i
107
107
108
108
*[`cogs/startup.py`](cogs/startup.py): cogs for startup & bot initialisation
109
109
110
-
*[`cogs/stats.py`](cogs/stats.py): cogs for displaying stats about your group's Discord guild, as well as its channels & Discord members
110
+
*[`cogs/stats/`](cogs/stats): cogs for displaying stats about your group's Discord guild, as well as its channels & Discord members
111
111
112
112
*[`cogs/strike.py`](cogs/strike.py): cogs for applying moderation actions to Discord members
113
113
114
-
*[`cogs/write_roles.py`](cogs/write_roles.py): cogs relating to sending the message that contains all the opt-in roles, into the "#**roles**" channel
114
+
*[`cogs/write_roles.py`](cogs/write_roles.py): cogs relating to sending the message, that contains all the opt-in roles, into the "#**roles**" channel
115
115
116
116
## Making Your First Contribution
117
117
@@ -155,7 +155,7 @@ It can be run with the following command:
155
155
uv run mypy .
156
156
```
157
157
158
-
Although there is [a PyCharm plugin](https://github.com/leinardi/mypy-pycharm#mypy-pycharm) to provide GUI control & inline warnings for [mypy](https://mypy-lang.org), it has been rather temperamental recently.
158
+
Although there is [a PyCharm plugin](https://github.com/leinardi/mypy-pycharm#mypy-pycharm) to provide GUI control and inline warnings for [mypy](https://mypy-lang.org), it has been rather temperamental recently.
159
159
So it is suggested to avoid using it, and run [mypy](https://mypy-lang.org) from the command-line instead.
160
160
161
161
#### PyMarkdown
@@ -326,7 +326,7 @@ To add a new environment variable to the project, follow these steps:
326
326
```
327
327
328
328
4. **Document the Variable**
329
-
- Update the `README.md`file under the "Setting Environment Variables" section to include the new variable, its purpose,andany valid values.
329
+
- Update the `README.md`file under the "Setting Environment Variables" section to include the new variable, its purpose andany valid values.
330
330
331
331
5. **Test the Variable**
332
332
- Run the bot with your changes and ensure the new variable is loaded correctly.
@@ -339,7 +339,7 @@ Response buttons are interactive UI components that allow users to respond to bo
339
339
1. **Define the Button Class**
340
340
- Create a new classin your cog file that inherits from`discord.ui.View`.
341
341
- Add button callback response methods using the `@discord.ui.button` decorator.
342
-
- Each button method should define the button's label, style, and a custom response ID.
342
+
- Each button method should define the button's label, a custom response ID and style.
343
343
344
344
Example:
345
345
```python
@@ -513,7 +513,7 @@ To retrieve members from the database using their hashed Discord ID, follow thes
513
513
print("Member's smiley facesnot found.")
514
514
```
515
515
516
-
It is unlikely that you will need to query the `DiscordMember` model directly. Instead the attributes of the member can be accessed by the relationship between each new Django model to the `DiscordMember` model.
516
+
It is unlikely that you will need to query the `DiscordMember` model directly. Instead, the attributes of the member can be accessed by the relationship between each new Django model to the `DiscordMember` model.
517
517
518
518
3.**Test the Query**
519
519
- Ensure the query works as expected by testing it with valid and invalid Discord IDs.
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Featured in the [CSS Discord guild](https://cssbham.com/discord).
18
18
## Error Codes
19
19
20
20
Users of TeX-Bot may encounter an error code when executing a slash-command fails.
21
-
If a user encounters any of these errors, please communicate the error to the committee member that has been assigned to upkeep & deployment of your instance of TeX-Bot.
21
+
If a user encounters any of these errors, please communicate the error to the committee member that has been assigned to upkeep and deployment of your instance of TeX-Bot.
22
22
The meaning of each error code is given here:
23
23
24
24
*`E1011` - The value for the [environment variable](https://wikipedia.org/wiki/Environment_variable)`DISCORD_GUILD_ID` is an [ID](https://discord.com/developers/docs/reference#snowflakes) that references a [Discord guild](https://discord.com/developers/docs/resources/guild) that does not exist
@@ -136,7 +136,7 @@ You'll also need to set a number of [environment variables](https://wikipedia.or
136
136
(This setting is optional.
137
137
Error logs will **always** be sent to the [console](https://wikipedia.org/wiki/Terminal_emulator), this setting allows them to also be sent to a [Discord log channel](https://docs.pycord.dev/en/stable/api/models.html#discord.TextChannel).)
138
138
139
-
*`ORGANISATION_ID`: Your Guild society ID. This is used to dynamically create the members list among other needed URLs.
139
+
*`ORGANISATION_ID`: Your Guild society ID. This is used to dynamically fetch your community group's list of members, among other necessary URLs.
140
140
141
141
*`MEMBERS_LIST_URL_SESSION_COOKIE`: The members-list [URL](https://wikipedia.org/wiki/URL)[session cookie](https://wikipedia.org/wiki/HTTP_cookie#Session_cookie).
142
142
(If your group's members-list is stored at a [URL](https://wikipedia.org/wiki/URL) that requires [authentication](https://wikipedia.org/wiki/Authentication), this [session cookie](https://wikipedia.org/wiki/HTTP_cookie#Session_cookie) should [authenticate](https://wikipedia.org/wiki/Authentication) TeX-Bot to view your group's members-list, as if it were [logged in to the website](https://wikipedia.org/wiki/Login_session) as a Committee member.
@@ -176,7 +176,7 @@ This will ensure your code meets the standard required for this project and give
176
176
This project follows the [semantic versioning scheme](https://semver.org).
177
177
We currently treat TeX-Bot as alpha software, and as such no numbered release has been made yet.
178
178
179
-
When selecting a version tag to use for [deploying TeX-Bot as a container image](#deploying-in-production) there are multiple tag schemes available:
179
+
When selecting a version tag to use for [deploying TeX-Bot as a container image](#deploying-in-production), there are multiple tag schemes available:
180
180
181
181
*`latest` - The most recent numerically tagged version released
182
182
*`br-<branch>` - The most recent commit from a given branch in this repository (E.g. `br-main`) (N.B. this does not include branches of forks of this repository)
Message-context commands, are executed via right-clicking on a [Discord *Message*](https://discord.com/developers/docs/resources/message), clicking "Apps", then selecting the command from the menu. The interaction callback method is provided information about which message was clicked, along with which user clicked it.
47
+
Message-context commands are executed via right-clicking on a [Discord *Message*](https://discord.com/developers/docs/resources/message), clicking "Apps", then selecting the command from the menu. The interaction callback method is provided information about which message was clicked, along with which user clicked it.
48
48
49
-
The main difference between [Context Commands](#context-commands) and [Slash Commands](#slash-commands) is that [Context Commands](#context-commands) do not take user defined arguments and are limited to the [Message](https://discord.com/developers/docs/resources/message) that the command is issued on and the context which is passed along side it.
49
+
The main difference between [Context Commands](#context-commands) and [Slash Commands](#slash-commands) is that [Context Commands](#context-commands) do not take user defined arguments and are limited to the [Message](https://discord.com/developers/docs/resources/message) that the command is issued on and the context which is passed alongside it.
@@ -62,7 +62,7 @@ Therefore, it can be [messaged via DM](https://dictionary.com/browse/dm) or be r
62
62
(See [the Discord developer docs](https://discord.com/developers/docs/resources/user) & [Pycord's docs](https://docs.pycord.dev/en/stable/api/models.html#users) for more information.)
63
63
64
64
In contrast, a [Discord "member" object](https://discord.com/developers/docs/resources/guild#guild-member-object) is a [user](https://discord.com/developers/docs/resources/user) attached to a specific [guild](https://discord.com/developers/docs/resources/guild).
65
-
Therefore, it can have [roles](https://discord.com/developers/docs/topics/permissions#role-object), be [banned](https://discord.com/developers/docs/resources/guild#ban-object)& have many other actions applied to it.
65
+
Therefore, it can have [roles](https://discord.com/developers/docs/topics/permissions#role-object), be [banned](https://discord.com/developers/docs/resources/guild#ban-object)and have many other actions applied to it.
66
66
(See [the Discord developer docs](https://discord.com/developers/docs/resources/guild#guild-member-object) & [Pycord's docs](https://docs.pycord.dev/en/stable/api/models.html#discord.Member) for more information.)
67
67
68
68
### Community Group Membership
@@ -75,4 +75,4 @@ Some commands may require you to create [roles](https://discord.com/developers/d
75
75
### Other Uses
76
76
77
77
In some other contexts, the term "user" may be used to refer to any person/organisation making use of this project.
78
-
(E.g. the description within [the "Error Codes" section](#error-codes).)
78
+
(E.g. the description within [the "Error Codes" section](README.md#error-codes).)
0 commit comments