aboutsummaryrefslogtreecommitdiffstats
path: root/bot/__main__.py (follow)
Commit message (Collapse)AuthorAgeLines
* Bump ruff from 0.2.1 to 0.3.3 (#1479)Gravatar dependabot[bot]2024-03-21-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Bump ruff from 0.2.1 to 0.3.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.1 to 0.3.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.2.1...v0.3.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * apply ruff fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: shtlrs <[email protected]>
* Use new logging util from bot-coreGravatar Chris Lovering2023-11-25-3/+4
|
* use `get_secret_value` for client tokenGravatar shtlrs2023-05-06-1/+1
|
* use `SecretStr` for all secretsGravatar shtlrs2023-05-06-1/+1
|
* revert renaming of Client to BotGravatar shtlrs2023-05-06-5/+5
|
* update Redis configGravatar shtlrs2023-05-06-4/+4
| | | | This also renames RedisConfig to Redis, the way we have it in Python
* update Client constantsGravatar shtlrs2023-05-06-5/+5
| | | | This also renames the Client class to Bot, to align better with Python.
* Bump botcore version (#1180)Gravatar Amrou Bellalouna2022-12-28-2/+2
| | | Co-authored-by: Amrou Bellalouna <[email protected]>
* Support loading all extensions in CIGravatar Chris Lovering2022-09-21-1/+20
|
* Update redis init due to new redis-py upgradeGravatar Chris Lovering2022-09-21-6/+7
|
* Use BotBase from bot coreGravatar Chris Lovering2022-09-21-11/+59
|
* Add 1<<15 to the raw intents valueGravatar Chris Lovering2022-08-28-0/+3
| | | | | | | | 1<<15 is the flag for message content intent, so adding this value to the intents value hard codes that to always be enabled. Doing it this way also bypasses the need to patch the flags themselvse in discord.py. This is required until https://github.com/python-discord/sir-lancebot/pull/1092 is merged.
* Don't call bot.run() if IN_CI env var is setGravatar Chris Lovering2022-02-20-1/+2
|
* Move Sentry Into InitGravatar Hassan Abouelela2021-11-12-19/+1
| | | | | | | | Moves the sentry setup to be one of the very first things run during startup, so we are able to catch more errors, such as ones that might occur while setting up logs. Signed-off-by: Hassan Abouelela <[email protected]>
* Overhauls In Channel CheckGravatar Hassan Abouelela2021-02-07-3/+2
| | | | | | | Upgrades in channel check to support categories, and in the case of overrides, roles too. Signed-off-by: Hassan Abouelela <[email protected]>
* Use sir-lancebot instead pydis-sir-lancebot for release nameGravatar ks1292020-12-19-1/+1
| | | Co-authored-by: Joe Banks <[email protected]>
* Remove aiohttp integration from SentryGravatar ks1292020-12-19-3/+1
|
* Add release tag to Sentry SDK initializationGravatar ks1292020-12-19-3/+4
|
* Add Redis and aiohttp integrations to SentryGravatar ks1292020-12-19-1/+7
|
* Remove walk_extensions from exts' initGravatar Gustav Odinger2020-09-23-1/+2
| | | | - Updates __main__.py to use the walk_extensions in utils/extensions.py
* Merge master: sentry sdk, updated contributing docsGravatar kwzrd2020-03-28-0/+13
|\
| * Setup SentryGravatar Joseph Banks2020-03-25-0/+13
| |
* | Deseasonify: make `get_extensions` an iteratorGravatar kwzrd2020-03-28-2/+2
| | | | | | | | Simplify internal structure & adjust var naming.
* | Deseasonify: rename `seasons` pkg to `exts`Gravatar kwzrd2020-03-28-1/+1
| | | | | | | | | | | | | | | | | | It is believed that this is now a more logical name for the package, as extensions no longer bind to seasons. Internally, packages are still grouped into seasonal sub-packages. There are quite a few, and it makes sense to group them by a common theme that inspired their functionality.
* | Deseasonify: move branding extension under evergreen pkgGravatar kwzrd2020-03-28-2/+0
| |
* | Deseasonify: move help extension under evergreen pkgGravatar kwzrd2020-03-28-1/+0
| |
* | Deseasonify: move decorators module under utilsGravatar kwzrd2020-03-28-1/+1
| |
* | Merge branch 'master' into seasonal-purgeGravatar kwzrd2020-03-15-0/+3
|\| | | | | | | | | | | | | 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.
| * (Help): Added cog loading to __main__.pyGravatar ks1232020-03-07-0/+1
| |
* | Deseasonify: load all extensions on start-upGravatar kwzrd2020-03-07-0/+5
| | | | | | | | Extensions are no longer bound to their respective seasons.
* | Deseasonify: do not load legacy SeasonManager on start-upGravatar kwzrd2020-03-07-1/+0
|/
* Add global check to SeasonalBotGravatar kosayoda2019-08-06-1/+3
|
* Move bot out of constants.py to bot.pyGravatar kosayoda2019-08-05-1/+2
|
* Allows you to create Seasons. (#64)Gravatar Leon Sandøy2018-11-27-29/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allows you to create Season objects which change the bots behavior. For example, a season can determine things like the avatar, the nickname, and which cogs are loaded. Season automatically changes according to the date range you specify when you create it. * removing some hungarian notation. * Automatic season changes will now always happen at a minute past midnight, no matter when the bot started. * catching dunders in the glob. * Refine Season Creation behaviour and structure. * Added channel and role constants, refactored roles into NamedTuples, added role check decorators from the main bot, and added role checks for the season change feature. Yes this is duplicate code from our main bot, but it will just have to be like that for now until we get a bot core running. * replacing the or with an xor and switching out the assert for a UserWarning * New lockfile * changing discord.py to discord-py to prevent pip bug from putting two of them in our lockfile * fixing flake errors * flake8 * Cleaned everything up, but I seem to have introduced some sort of infinite load loop? o.O * Fixing up all bugs in the halloween cogs. This should be ready for merge now. * Add avatar_path baseclass method for consistency. While making it simpler to add avatar urls in new season extensions, it also allows the avatar resource path to be changed in a single place if needed in future. * Avoid shadowing builtin `object`. * Add debug mode, refine bot user editing on season load. The changing of a bot's username and avatar is heavily ratelimited. While testing, restarting the bot and changing seasons is required, and hitting these limits are typical. Instead, when in debug mode, the avatar isn't set and only the nickname is changed to prevent unnecessary account edit requests. In the case that the rate limit is hit when not in debug mode, there's an added fallback to use the nickname instead. * Add cancel load_seasons task on SeasonManager un/reload. Previously the load_seasons task was loaded and looping forever. Even if the cog was unloaded for some reason, it would still be running. On loading the SeasonManager again, it would create a new load_seasons task, while the old one still existed. Adding the cancellation allows the task to end when the cog is unloaded or reloaded, and will help assist with live code changes during development at a later time where it's possible to reload this extension (perhaps when the pending bot core is implemented). * get_season_class helper, season class attribs, fix admin id Changes `get_season`'s date check to not initialise unwanted classes (to avoid needless loading of tasks which would otherwise cause unexpected behaviour). To do this, defining attributes of season classes have been moved from `__init__` as an instance variable, to the class variable level. This also results in `__init__` not needing to be defined for the `SeasonBase` class, and `super().__init__()` not needing to be called in individual season classes, making things cleaner/simpler for them. Adds a helper function for retrieving a season class and combines two unnecessarily separate if statements. Credits to @MarkKoz for the suggestions. Reverts the admin ID mistakenly changed in a previous commit. * Update bot/seasons/halloween/hacktoberstats.py Co-Authored-By: heavysaturn <[email protected]> * Update bot/seasons/halloween/halloween_facts.py Co-Authored-By: heavysaturn <[email protected]> * No more property in halloweenfacts * Changed all aliases to tuples * Made tokens a seperate namedtuple * Update bot/seasons/halloween/spookyavatar.py Co-Authored-By: heavysaturn <[email protected]>
* It should work now.Gravatar Leon Sandøy2018-11-20-3/+3
|
* Minor changesGravatar Leon Sandøy2018-11-20-2/+2
|
* Hacktoberbot -> SeasonalbotGravatar Gareth Coles2018-11-18-6/+6
|
* Flake8Gravatar Leon Sandøy2018-11-18-2/+0
|
* Created an uptime cog. Testing Azure CI deployment.Gravatar Leon Sandøy2018-11-18-7/+3
|
* improving the .help docstrings, and making the bot load cogs from the ↵Gravatar Leon Sandøy2018-10-11-3/+3
| | | | | | | | correct path. (#43) * Improving some docstrings and making it look in ./bot/cogs for cogs. * Removing pointless stuff from a docstring
* Adding Pale Man, fixing all flake8 issues, converting halloweenify to use ↵Gravatar Leon Sandøy2018-10-11-0/+39
aiohttp, fixing broken logging, ignoring irrelevant loggers, and turning the script into a valid module script.