aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Fix filtering testsGravatar mbaruh2023-03-23-6/+6
|
* Merge branch 'main' into new-filtersGravatar mbaruh2023-03-21-2607/+3219
|\
| * Override context command explicitly in antispam filter(#2477)Gravatar Amrou Bellalouna2023-03-20-2/+4
| |
| * Merge pull request #2476 from python-discord/remove_muted_roleGravatar Boris Muratov2023-03-20-29/+0
| |\ | | | | | | Remove usage of the muted role
| | * Remove usage of the muted roleGravatar mbaruh2023-03-20-29/+0
| |/
| * Merge pull request #2438 from python-discord/mbaruh/timeoutGravatar Boris Muratov2023-03-20-65/+100
| |\ | | | | | | Migrate from role-based mutes to native timeouts
| | * Merge branch 'main' into mbaruh/timeoutGravatar Boris Muratov2023-03-20-144/+172
| | |\ | | |/ | |/|
| * | Merge pull request #2470 from python-discord/fix-channel-blacklistGravatar Amrou Bellalouna2023-03-14-1/+1
| |\ \ | | | | | | | | Fix typehint that broke duckpond channel blacklist
| | * | Fix pydantic model that prevented channel blacklist from workingGravatar TizzySaurus2023-03-14-1/+1
| |/ /
| * | Merge pull request #2463 from shtlrs/preserve-personal-configGravatar Amrou Bellalouna2023-03-12-3/+6
| |\ \ | | | | | | | | Preserve personal config
| | * \ Merge branch 'main' into preserve-personal-configGravatar Hassan Abouelela2023-03-12-140/+165
| | |\ \ | | |/ / | |/| |
| * | | Merge pull request #2465 from shtlrs/fix-persistent-roles-view-bugGravatar Amrou Bellalouna2023-03-12-2/+0
| |\ \ \ | | | | | | | | | | Fix broken roles view
| | * | | remove CUSTOM_ID_FORMATGravatar shtlrs2023-03-12-1/+0
| | | | |
| | * | | bring back the interaction_checkGravatar shtlrs2023-03-12-0/+10
| | | | | | | | | | | | | | | | | | | | This one is still needed for the `!subscribe` text command to work properly
| | * | | remove custom ids that handle routing to the viewGravatar shtlrs2023-03-12-11/+0
| |/ / /
| * | | Merge pull request #2455 from python-discord/dependabot/pip/aiohttp-3.8.4Gravatar Amrou Bellalouna2023-03-12-91/+91
| |\ \ \ | | | | | | | | | | Bump aiohttp from 3.8.3 to 3.8.4
| | * | | Bump aiohttp from 3.8.3 to 3.8.4Gravatar dependabot[bot]2023-03-12-91/+91
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.3 to 3.8.4. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.8.3...v3.8.4) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
| * | | Merge pull request #2456 from python-discord/dependabot/pip/pydantic-1.10.6Gravatar Amrou Bellalouna2023-03-12-39/+39
| |\ \ \ | | | | | | | | | | Bump pydantic from 1.10.5 to 1.10.6
| | * | | Bump pydantic from 1.10.5 to 1.10.6Gravatar dependabot[bot]2023-03-12-39/+39
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.5 to 1.10.6. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/v1.10.6/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v1.10.5...v1.10.6) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
| * | | Merge pull request #2372 from python-discord/vivek/jump-url-infr-logGravatar Amrou Bellalouna2023-03-12-9/+36
| |\ \ \ | | | | | | | | | | Display jump url to message invoking an infraction in infraction log
| | * | | Update appeals2 to appeals_2 to reflect config changeGravatar vivekashok12212023-03-11-1/+1
| | | | |
| | * | | Merge branch 'main' into vivek/jump-url-infr-logGravatar Vivek Ashokkumar2023-03-11-3146/+3760
| | |\ \ \ | | |/ / / | |/| | |
| | * | | Display "N/A" for infractions in ModMailGravatar vivekashok12212023-03-10-7/+9
| | | | | | | | | | | | | | | | | | | | Previously displayed "Infraction issued in modmail" for infractions in ModMail.
| | * | | Format jump url bot-sideGravatar vivekashok12212023-02-17-18/+28
| | | | |
| | * | | Include message link in mod-log embedsGravatar vivekashok12212023-02-14-0/+2
| | | | |
| | * | | Display message link in infraction logGravatar vivekashok12212023-02-14-1/+14
| | | | |
| | | * | change mode to "wb"Gravatar shtlrs2023-03-12-1/+1
| | | | |
| | | * | write emoji_trashcan to .env.server upon botstrapGravatar shtlrs2023-03-11-1/+5
| | | | |
| | | * | switch order of env files to be parsedGravatar shtlrs2023-03-11-2/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | The priority of the value to be picked is always the last file in the `env_file` tuple We want server values to always be picked up from .env.server, and if someone wants to override them for testing, they'll go into .env But the `env.server` shouldn't be manually tampered with
| | | * Don't manually move timed out usersGravatar mbaruh2023-03-20-3/+0
| | | | | | | | | | | | | | | | The timeout already natively handles blocking voice channels and removing the user from them.
| | | * Add role hierarchy guards for timeoutsGravatar mbaruh2023-03-19-0/+5
| | | | | | | | | | | | | | | | Timeouts have similar role hierarchy restrictions to bans.
| | | * Mention target user in cap messageGravatar mbaruh2023-03-19-3/+4
| | | |
| | | * Merge branch 'main' into mbaruh/timeoutGravatar mbaruh2023-03-10-2007/+2323
| | | |\ | | |_|/ | |/| |
| * | | Merge pull request #2326 from python-discord/snekbox-filesfix-eval-message-limitGravatar Boris Muratov2023-03-10-244/+727
| |\ \ \ | | | | | | | | | | Support `eval` (snekbox) file system and attachment display
| | * | | Merge branch 'main' into snekbox-filesGravatar Ionite2023-03-09-1/+6
| | | | |
| | * | | Merge branch 'main' into snekbox-filesGravatar Ionite2023-03-09-2906/+3026
| | |\ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/constants.py # bot/exts/utils/snekbox/_cog.py # config-default.yml
| * | | | Merge #2459: Update nested delimiter to double underscoreGravatar Amrou Bellalouna2023-03-09-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * change nested delimiter to double underscore * write channel_id along with the webhook_id * make channel mandatory for webhook
| * | | | Merge pull request #2458 from shtlrs/add-botstrap-dep-group-and-taskGravatar Amrou Bellalouna2023-03-09-1/+112
| |\ \ \ \ | | | | | | | | | | | | Add botstrap depency group and task
| | * | | | move httpx to the dev dependency groupGravatar shtlrs2023-03-09-6/+2
| | | | | |
| | * | | | relock dependenciesGravatar shtlrs2023-03-09-1/+110
| | | | | |
| | * | | | add a poetry task to configure botGravatar shtlrs2023-03-09-0/+1
| | | | | |
| | * | | | add the botstrap dependency groupGravatar shtlrs2023-03-09-0/+5
| |/ / / /
| * | | | Merge pull request #2457 from shtlrs/fix-env-var-mappings-in-botstrapGravatar Amrou Bellalouna2023-03-09-1/+1
| |\ \ \ \ | | | | | | | | | | | | Replace correct separator when mapping webhook ids to .env.server
| | * | | | replace . with _ when mapping webhook idsGravatar shtlrs2023-03-09-1/+1
| |/ / / /
| * | | | Make tag slash command guild only (#2452)Gravatar Amrou Bellalouna2023-03-09-0/+1
| | | | | | | | | | | | | | | Co-authored-by: ChrisJL <[email protected]>
| * | | | Merge pull request #2453 from shtlrs/update-char-rules-threshholdGravatar Amrou Bellalouna2023-03-09-2/+2
| |\ \ \ \ | | | | | | | | | | | | Update threshold values for rules
| | * | | | update threshold values for rulesGravatar shtlrs2023-03-09-2/+2
| |/ / / /
| * | | | Merge #2408: Scaffold server config via a bootstrapping scriptGravatar Amrou Bellalouna2023-03-09-1296/+863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor configuration into a pydantic-based python constants file, and add a utility to auto-populate guild data. Squashed commits: * use basic config for demo purposes * fix guiding comments * update var names for proper context reflection * fix wront iteration var * add all roles, & channels * load categories * separate sections in env file * ignore .env.server * rename change_log to changelog This also adds a default env file to look for * remove instantiation of webhooks * add most of the default configs These will mostly be fetched from the .env.default file, which won't be bootstrapped * warn when categories/roles/channels are not found * add env file to keep server defaults * fix malformatted value in the .env.default * add default server env variables * update the sections formatting in default env file * fallback to server env when loading constants * add guild basic defaults * update change_log channel name to changelog * add the Guid settings prefix * make _Guild inherit from EnvConfig * add webhook defaults * add python_news defaults to the server env * ad missing webhooks prefix * update bootstrapper logger name * update priority of the env loaded files According to Pydantic's docs: "Later files in the list/tuple will take priority over earlier files." * warn user that default value from PyDis' config will be used * add colours default config * add antispam config * update antispam references * add redis default cfg * add Stats, Cooldowns and CleanMessages consts This also includes their default values * add Metabase to constants This also includes its default values * add URLS to constants This also includes its default values * use the Field class to provide defaults This avoids overriding & changing the `fields` of the `Config` class "dynamically" * add keys constant class * add Guild conf * replace dash with underscore in script * appease linter * transform attributes of AntiSpam to dict when needed This ensures that the application stays backwards compatible * add root_validator for the colours class This enables the conversion from hex to int easily since it's not a supported type by pydantic * reinstate the role & channels combinations * rename URLS to URLs * add emojis & icons constants * add filter constants & their default values * remove all useless spaces * instantiate the keys class * add bot prefix to default env file * fetch Bot constants from env vars instead of the prefix ones * add Miscellaneous config * instantiate poor forgotten Miscellaneous config * add final touches to the constants module This includes removing dups, adding missing channels & fixing type casts * move all default values to constants.py This is done by using the `Field` class. It allows us to 1. Set defaults, in case the variables are not configured 2. Load them from a env variable under a specific name (for backwards comp) 3. load it from any env variable file that contains the right prefix * ignore all .env files * load BOT_TOKEN & GUILD_ID from .env * allow _GUILD to read its id from the `GUILD_ID` env var * base Webhooks settings off of a Webhook model * create necessary webhooks if non existent * appease flake8 docstrings error * make the script idempotent * update type hints * uppercase all consts * make webhook channel optional * add httpx to its own dependency group This group will be optional & only related to the bootstrapper * replace requests with httpx * pass client as param * include raise_for_status as a response hook * rename get_webhook to webhook_exists * update docstring of the constants module * use "." as a separator * update script to account for already created webhooks * make ANTI_SPAM_RULES a module level constant This ensures that flake8 doesn't complain about making a function call in the function's signature * remove the manual resolving of .env paths * update usages of AntiSpam constants * remove forgotten assignment of rule_config * remove useless assignments of env file names * delete default config-default.yml * update docstrings of CodeBlockCog to reference constants.py * add a poetry task that runs the bootstrapping script * add python-dotenv to the config-bootstrap group * update hook name to _raise_for_status * construct site_api in _URLs * remove __name__ == '__main__'guard * Revert "construct site_api in _URLs" This reverts commit 1c555c4280c6a0bdd452319cbd3ffcd0370f5d48. * remove usage of the Field class * update env var keys that the bootstrapping script needs * use API_KEYS.SITE_API as env var in docker compose instead of BOT_API_KEY * use basic config for demo purposes * fix guiding comments * update var names for proper context reflection * fix wront iteration var * add all roles, & channels * load categories * separate sections in env file * ignore .env.server * rename change_log to changelog This also adds a default env file to look for * remove instantiation of webhooks * add most of the default configs These will mostly be fetched from the .env.default file, which won't be bootstrapped * warn when categories/roles/channels are not found * add env file to keep server defaults * fix malformatted value in the .env.default * add default server env variables * update the sections formatting in default env file * fallback to server env when loading constants * add guild basic defaults * update change_log channel name to changelog * add the Guid settings prefix * make _Guild inherit from EnvConfig * add webhook defaults * add python_news defaults to the server env * ad missing webhooks prefix * update bootstrapper logger name * update priority of the env loaded files According to Pydantic's docs: "Later files in the list/tuple will take priority over earlier files." * warn user that default value from PyDis' config will be used * add colours default config * add antispam config * update antispam references * add redis default cfg * add Stats, Cooldowns and CleanMessages consts This also includes their default values * add Metabase to constants This also includes its default values * add URLS to constants This also includes its default values * use the Field class to provide defaults This avoids overriding & changing the `fields` of the `Config` class "dynamically" * add keys constant class * add Guild conf * replace dash with underscore in script * appease linter * transform attributes of AntiSpam to dict when needed This ensures that the application stays backwards compatible * add root_validator for the colours class This enables the conversion from hex to int easily since it's not a supported type by pydantic * reinstate the role & channels combinations * rename URLS to URLs * add emojis & icons constants * add filter constants & their default values * remove all useless spaces * instantiate the keys class * add bot prefix to default env file * fetch Bot constants from env vars instead of the prefix ones * add Miscellaneous config * instantiate poor forgotten Miscellaneous config * add final touches to the constants module This includes removing dups, adding missing channels & fixing type casts * move all default values to constants.py This is done by using the `Field` class. It allows us to 1. Set defaults, in case the variables are not configured 2. Load them from a env variable under a specific name (for backwards comp) 3. load it from any env variable file that contains the right prefix * ignore all .env files * load BOT_TOKEN & GUILD_ID from .env * allow _GUILD to read its id from the `GUILD_ID` env var * base Webhooks settings off of a Webhook model * create necessary webhooks if non existent * appease flake8 docstrings error * make the script idempotent * update type hints * uppercase all consts * make webhook channel optional * add httpx to its own dependency group This group will be optional & only related to the bootstrapper * replace requests with httpx * pass client as param * include raise_for_status as a response hook * rename get_webhook to webhook_exists * update docstring of the constants module * use "." as a separator * update script to account for already created webhooks * make ANTI_SPAM_RULES a module level constant This ensures that flake8 doesn't complain about making a function call in the function's signature * remove the manual resolving of .env paths * update usages of AntiSpam constants * remove forgotten assignment of rule_config * remove useless assignments of env file names * delete default config-default.yml * update docstrings of CodeBlockCog to reference constants.py * add a poetry task that runs the bootstrapping script * add python-dotenv to the config-bootstrap group * update hook name to _raise_for_status * construct site_api in _URLs * remove __name__ == '__main__'guard * Revert "construct site_api in _URLs" This reverts commit 1c555c4280c6a0bdd452319cbd3ffcd0370f5d48. * remove usage of the Field class * update env var keys that the bootstrapping script needs * use API_KEYS.SITE_API as env var in docker compose instead of BOT_API_KEY * relock dependencies * update snekbox's defaults * add support for ot channels * rename help_system_forum to python_help * rename nomination_archive to nomination_voting_archive * rename appeals2 to appeals_2 * yeet sprinters role out * rename all big_brother_logs instances to big_brother The purpose is to adhere to what we have in prod * rename bootstrap_config.py to botstrap.py * update module name of the configure poetry task * update error messages to reflect the new keys needed for env variables * install dotenv as an extra with pydantic * update all prefixes to "_" (underscore) * log tuple of (channel_name, channel_id) in the config verifier * update needed default values for docker compose env var * relock dependencies * update forgotten delimiters & env prefixes
| * | | | Merge pull request #2449 from python-discord/update-depsGravatar Hassan Abouelela2023-03-08-713/+848
| |\ \ \ \
| | * | | | Allow The Unlicense (Unlicense) in pip-licensesGravatar Chris Lovering2023-03-07-1/+2
| | | | | |