aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py (follow)
Commit message (Collapse)AuthorAgeLines
* Always use the get_logger func from bot-coreGravatar Chris Lovering2023-11-25-3/+2
|
* Bump ruff from 0.0.272 to 0.0.280 (#1333)Gravatar dependabot[bot]2023-08-10-1/+1
| | | | | | | Co-authored-by: wookie184 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Lovering <[email protected]> Co-authored-by: ChrisJL <[email protected]>
* Apply fixes for ruff lintingGravatar Chris Lovering2023-05-09-2/+1
| | | | | Co-authored-by: wookie184 <[email protected]> Co-authored-by: Amrou Bellalouna <[email protected]>
* Bump botcore version (#1180)Gravatar Amrou Bellalouna2022-12-28-2/+2
| | | Co-authored-by: Amrou Bellalouna <[email protected]>
* Remove all wait_until_guil_available as this is now done in bot-coreGravatar Chris Lovering2022-09-23-1/+0
|
* Use extension utils from bot-coreGravatar Chris Lovering2022-09-21-0/+8
|
* Move startup checks and logs to their own cogGravatar Chris Lovering2022-09-21-29/+2
| | | | This is to avoid needed to use wait_until_guild_available during the setup hook.
* Use BotBase from bot coreGravatar Chris Lovering2022-09-21-152/+14
|
* Make the bot automatically join threadsGravatar Matteo Bertucci2021-08-31-2/+18
| | | | | | This is just a QoL of life thing, avoiding having us to check if the bot is here or not before issuing a command Co-authored-by: ChrisJL <[email protected]>
* Trigger the bot on mentionsGravatar Matteo Bertucci2021-08-31-1/+2
| | | | Since it is the only way to add bots to threads, it would make sense to be able to execute that command.
* Migrate to Discord.py 2.0a0Gravatar Matteo Bertucci2021-08-31-1/+1
| | | | | | Since the Discord.py repository has been archived, we can switch to the latest commit of 2.0a0, knowing no breaking change will occur (still pinned to the commit just in case). This commit also solves two small problems due to that fix, the avatar interface changing and Embed.name disappearing. Quite a painless migration.
* chore: Prefer double quotes over single quotesGravatar ToxicKidz2021-05-04-1/+1
|
* Merge branch 'master' into Enforce-image-processing-concurrencyGravatar ChrisJL2021-03-05-1/+16
|\
| * Don't use setsGravatar Shivansh-0072021-03-02-1/+1
| |
| * Fix Channel Check to use channel ids instead of channel objects, and skip ↵Gravatar Shivansh-0072021-03-02-2/+7
| | | | | | | | channel check if debug is true
| * Fixed linting errors.Gravatar xithrius2021-01-24-2/+1
| |
| * Merge branch 'master' into startup-channel-checkGravatar William Da Silva2020-12-29-109/+53
| |\
| * | Capitalize "ID" in error messageGravatar Will Da Silva2020-10-04-1/+1
| | |
| * | Add docstring to check_channelsGravatar Will Da Silva2020-10-04-0/+1
| | |
| * | Verify channel constants on startupGravatar Will Da Silva2020-10-04-1/+10
| | | | | | | | | | | | Closes #393
* | | Add root alias support for commandsGravatar Chris2021-02-18-0/+41
| |/ |/|
* | Remove dead ShowProjects cog.Gravatar Leon Sandøy2020-11-21-1/+1
| | | | | | | | We no longer have this channel, so this cog serves no purpose.
* | Make the bot name less hard-coded.Gravatar Leon Sandøy2020-11-21-18/+20
| |
* | Get rid from branding management stuffGravatar ks1292020-11-17-95/+3
| |
* | Implement Redis connection to bot class and create instanceGravatar ks1292020-11-16-2/+26
| |
* | Intents: use 'default' factoryGravatar kwzrd2020-10-31-3/+1
| | | | | | | | | | | | | | | | Since we disable both privileged intents, we can just construct an instance with them already off. As Senjan notes, this will also future-proof us against any privileged intents added in the future. Co-authored-by: Senjan21 <[email protected]>
* | Intents: document which intents are privilegedGravatar kwzrd2020-10-31-2/+2
| |
* | Intents: disable privileged 'Members' intentGravatar kwzrd2020-10-31-0/+1
| | | | | | | | | | | | | | With 'd.py' 1.5.1, the Member converter will now lazily fetch the member object. It is believed that this removes our need for the intent.
* | Intents: call classmethod on class, not intermediate instanceGravatar kwzrd2020-10-05-1/+1
| |
* | Intents: initial setupGravatar kwzrd2020-10-05-0/+10
|/ | | | | | | For now, we require the privileged 'Guild Members' intent, to maintain all current functionality (e.g. Member convertors working with IDs). In the future, we may look into disabling this intent.
* Prevent bot from mentioning non-mod rolesGravatar MarkKoz2020-07-14-2/+4
| | | | | This was open to abuse when the bot relayed user input. The fix relies on a discord.py alpha feature.
* Show bot prefix in rich presenceGravatar kwzrd2020-05-08-1/+4
| | | | This emulates the main bot's message for consistency.
* Transition towards `wait_until_guild_available` useGravatar kwzrd2020-04-04-1/+1
| | | | | | All calls to `wait_until_ready` are replaced with the new event. To help with static analysis, we annotate `bot` attrs as instances of our custom SeasonalBot class where necessary.
* Add `wait_until_guild_available` coroutineGravatar kwzrd2020-04-04-0/+34
| | | | | | | | | | | See docstring for explanation & comparison to the `on_ready` event. This is taken from the Python bot repository. Originally implemented by Mark. The `on_guild_available` callback was adapted and simplified from the original implementation, as with Sentry in place, it is believed that dispatching an error webhook is unnecessary. Co-authored-by: MarkKoz <[email protected]>
* Try to fetch devlog channel if not found in cacheGravatar kwzrd2020-04-04-2/+6
|
* Remove redundant task assignmentGravatar kwzrd2020-04-03-1/+1
|
* Send greeting message to devlog channel on bot start-upGravatar kwzrd2020-04-03-0/+1
| | | | | Previously, this was done by the SeasonManager cog, which was removed during our deseasonification efforts.
* Ensure cache is ready before grabbing devlog channelGravatar kwzrd2020-04-03-0/+1
|
* Refactor: capitalize AssetType enum membersGravatar kwzrd2020-03-31-6/+6
| | | | Co-authored-by: MarkKoz <[email protected]>
* Deseasonify: use `self` rather than local `bot` instance varGravatar kwzrd2020-03-29-3/+3
|
* Deseasonify: adjust bot method defs to a more logical orderGravatar kwzrd2020-03-29-33/+33
|
* Deseasonify: use new `_apply_asset` setterGravatar kwzrd2020-03-29-54/+26
| | | | | | | | The diff should demonstrate how much code repetition we prevent. We do not make use of `_apply_asset` for nickname changes - due to the comparative simplicity and conceptual difference, this method provides its own error handling.
* Deseasonify: implement generic media asset setterGravatar kwzrd2020-03-29-2/+30
| | | | | | | | | | | | | | | | Current `set_avatar`, `set_icon` and `set_banner` methods are almost identical - they only differ in the type of asset they upload. This leads to a lot of code repetition, especially w.r.t. error handling. We instead add a generic method that is parametrized by an AssetType param, and by the target entity (i.e. bot, or guild) that the asset should be applied to. All error handling can then be done in one place. Error handling methodology is adjusted - instead of suppressing errors, we catch and log them. Since we no longer determine whether the upload succeeded based on 'before' != 'after', this solves a bug where re-applying the same asset resulted in a warning-level log, triggering Sentry.
* Deseasonify: add AssetType enumGravatar kwzrd2020-03-29-2/+14
|
* Deseasonify: remove unused `set_username` methodGravatar kwzrd2020-03-29-30/+0
| | | | | | | The method is a left-over from the old seasonal system. We no longer use it, the bot's username never changes, only the nickname. The amount of internal branching logic makes it difficult to maintain.
* Deseasonify: log in `add_cog` rather than in each `setup`Gravatar kwzrd2020-03-28-0/+9
| | | | | | | | | | | | The previous system required each extension's `setup` func to log that the cog was loaded. This leads to inconsistent messages all trying to convey the same thing, variable logger names in the output file are difficult to read, and several extensions were not logging at all. By logging directly in the `add_cog` method, we reduce code repetition, ensure consistent format, and remove the responsibility to remember that a log should be made.
* Deseasonify: move decorators module under utilsGravatar kwzrd2020-03-28-1/+1
|
* Deseasonify: mock expensive API calls in debug modeGravatar kwzrd2020-03-24-1/+13
| | | | | | The methods will pretend that the selected asset was uploaded successfully. This allows extensive testing of the branding manager without API abuse.
* Deseasonify: remove `load_extensions` methodGravatar kwzrd2020-03-23-19/+1
| | | | | This is unused and no longer necessary, as all extensions load only once: on start-up, in `__main__.py`.
* Merge branch 'master' into seasonal-purgeGravatar kwzrd2020-03-15-1/+1
|\ | | | | | | | | | | | | This merges the newly added help cog. Resolve slight conflict in the __main__ module caused by the the master branch still assuming the presence of the legacy season manager cog.