aboutsummaryrefslogtreecommitdiffstats
path: root/.gitignore (follow)
Commit message (Collapse)AuthorAgeLines
* Voice Verify Button Instead of Voice Verify Command (#2856)Gravatar Daniel Brown2024-01-03-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added additional ignore to `.gitignore` * Setting structure for view class * Transferring voice_verification functionality to button view * Completed VerifyView and added cog_load * Moved `voice_verify()` functionality to button. Added `prepare_voice_button()` to create the persistent button and message. * Tweaked message deletion times to be more consistent * Voice Gate rework - Removed unused imports caused by changes - Changed voice pings to reflect the use of button instead of command - Changed from deleting pings by message id in favor of using built in `delete_after` arguments on messages - Changed `delete_after` to use values from config - Redis cache no longer tracks message ids along with user id for the purpose of tracking people who have been pinged - * Changes to Structure and Logic - Removed superfluous new line in constants file - Removed ModLog from file as it is no longer needed - New to voice chat users will no longer be sent a DM, and will instead only be sent a ping in the verification channel - Changed class name from `VerifyView` to `VoiceVerificationView` for added clarity - Adjusted voice button role check logic to reduce number of api calls * Corrected logging formatting - Formatting now correctly using %-style instead of f-strings * Swapped channel getting & corrected redundant logic - Swapped get_channel to get_or_fetch_channel to make sure channel is retrieved - Adjusted list comprehension and for loop to be a single for loop * Change ping phrasing for clarity Co-authored-by: wookie184 <[email protected]> --------- Co-authored-by: wookie184 <[email protected]>
* Merge #2408: Scaffold server config via a bootstrapping scriptGravatar Amrou Bellalouna2023-03-09-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update constants for new forum channel help systemGravatar Chris Lovering2022-11-25-1/+1
|
* Add metricity to docker-composeGravatar Chris Lovering2021-09-17-0/+1
| | | | | | By adding metricity to the compose, we allow it to migrate itself, rather than needing the site to do it. Defaulting 'USE_METRICITY' to false means that it will run migrations, but not actually start the bot. This means we don't add another service that needs to run all the time, which could impact some contribs on lower powered hardware.
* Add docker-compose.override.yml to gitignoreGravatar Numerlor2021-05-12-0/+1
|
* Move logging set up to a separate moduleGravatar MarkKoz2020-10-17-0/+1
|
* Include rolled over logs in gitignoreGravatar Numerlor2020-10-06-0/+1
| | | | | RotatingFileHandler appends .# to log names when rolling over to a new file.
* Merge branch 'master' into unittest-migrationGravatar Sebastiaan Zeeff2019-10-15-0/+3
|\ | | | | | | | | Resolving merge conflicts from master in `.gitignore` and `tests/helpers.py`.
| * Added to the .gitignore file a new file to be ignored, .DS_Store (only on ↵Gravatar kraktus2019-10-05-0/+3
| | | | | | | | Mac OS), that stores custom attributes of its containing folder. New contributors on Mac OS won't have to bother anymore about this mysterious file that create when you fork the project.
* | Change pipeline testrunner to xmlrunnerGravatar Sebastiaan Zeeff2019-10-11-2/+2
|/ | | | | | | | | I have change the testrunner from `unittest` to `xmlrunner` in the Azure pipeline to be able to publish our test results on Azure. This is the same runner as `site` uses to generate XML reports. In addition, I've cleaned up some small mistakes in docstrings and `README.md`.
* Pin dependencies, pre-build `regex` pkg.Gravatar scragly2019-09-24-1/+0
|
* Remove duplicate coverage.xml gitignoreGravatar scragly2019-09-17-3/+0
|
* Add coverage reporting to tests.Gravatar Johannes Christ2019-09-17-0/+6
|
* GitIgnore: VSCodeGravatar scragly2018-10-23-0/+3
|
* Update gitignore for logfilesGravatar Gareth Coles2018-06-06-2/+2
|
* Configure constants with YAML file(s) (#57)Gravatar Volcyy2018-05-22-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Load various constants from `.yml` file. * Ignore user-provided `config.yml`. * Support environment variables in YAML configuration. * Use "class-based" configuration. * Configure logging properly. * Move the last few constants to YAML. * Fix recursive update accidentally overriding mappings. * Read bot token from YAML configuration. * Add documentation strings and `KeyError` handling. * Remove coding setting from constants module. * Add `help4` channel ID to `config-default.yml`. * Fix a few linting issues from merge. * s/Channels.help1/Channels.help0/g * s/Channels.help2/Channels.help1/g * s/Channels.help3/Channels.help2/g * s/Channels.help4/Channels.help3/g * Adress @JoeBanks13's review comments. * Put a block comment above dataclasses.
* Logging cogs (#32)Gravatar Leon Sandøy2018-03-14-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added logging to events and verification cogs * Added logging to the tags cog * Added logging to Fun, Logging, and Security cogs. * Added logging to Deployment cog. * Added logging to cog management cog * Added logging to clickup cog * Changed some logging levels across all cogs. Most of my log.infos should have been log.debugs. Thanks Joseph. * Added logging to the Bot cog. * Adding logging to the non-cog files. * Added the logging handler to Eval, but didn't add the actual Logging. I'll leave that to Martmist * A couple of minor bugfixes * Add "trace" logging level * Add logging for paginator * Add JSON logging for future datadog integration * Changed some loglevels to trace now that we have the trace method, and also fixed stuff pointed out by joseph in his review. * Completed testing for bot.py * Completed testing for clickup.py * Completed testing for cogs.py * Completed testing for deployment.py * Completed testing for fun.py * Finished logging for bot and tags.py, as well as __init__.py * Addressing all feedback in request for changes.
* adds vagrant file (#14)Gravatar Christopher Baklid2018-03-02-0/+3
| | | | | | * adds vagrant file * reduce memory allocation
* Clean up repo structureGravatar Gareth Coles2018-02-04-0/+3
|
* Initial commitGravatar Joseph2018-02-03-0/+101