aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | * | | Set asyncio logger level to INFOGravatar MarkKoz2021-01-04-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If asyncio's debug mode is enabled, the asyncio logger's level gets set to DEBUG. While other features of the debug mode are useful, the DEBUG log level spams generally irrelevant stuff.
| | | | | | * | | HelpChannels: fix unclaim exiting too early if claimant is NoneGravatar MarkKoz2021-01-04-4/+2
| | | | | | | | |
| | | | | | * | | HelpChannels: fix manual use of lock decoratorGravatar MarkKoz2021-01-04-3/+3
| | | | | | | | |
| | | | | | * | | HelpChannels: fix race condition when unclaiming a channelGravatar MarkKoz2021-01-04-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Place a channel-specific lock on `unclaim_channel`. If both the dormant task and the command simultaneously unclaim a channel, one of them will silently be aborted. Fix #1341
| | | | | | * | | HelpChannels: change caller str parameter to a boolGravatar MarkKoz2021-01-04-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Booleans are less error-prone than strings.
| | | | | | * | | HelpChannels: unschedule the dormant task in unclaim_channelGravatar MarkKoz2021-01-04-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the cancellation will be under the lock once the lock is added.
| | | | | | * | | HelpChannels: clarify close command docstringGravatar MarkKoz2021-01-04-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Referencing internal functions in public-facing documentation is not helpful to users.
| | | | | | * | | HelpChannels: refactor the close command checkGravatar MarkKoz2021-01-04-10/+10
| | | | | | | | |
| | | | | | * | | HelpChannels: make a channel available within the lockGravatar MarkKoz2021-01-04-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the lock causes the function to abort, a new channel shouldn't be made available. However, the only way to know it's aborted from the outside would be through a return value or global variable. Neither seem as nice as just just using `create_task` within the lock to avoid having `move_to_available` hold the lock.
| | | | | | * | | Add asyncio.create_task wrapper which logs exceptionsGravatar MarkKoz2021-01-04-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally exceptions are only logged when tasks are garbage collected. This wrapper will allow them to be logged immediately through a done callback. This is similar to how the Scheduler logs errors.
| | | | | | * | | HelpChannels: fix race condition between claiming and unclaimingGravatar MarkKoz2021-01-04-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The race condition is when a user claims a channel while their other channel is being unclaimed. Specifically, it's while their cooldown is being removed. The lock ensures that either the cooldown will be re-applied after it's removed or that it won't be removed since `unclaim_channel` will see the user has another claimed channel.
| | | | | | * | | Lock: support waiting until a lock is availableGravatar MarkKoz2021-01-04-37/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been determined that asyncio.Lock is safe to use in such manner. Therefore, replace LockGuard entirely with asyncio.Lock.
| | | | | | * | | HelpChannels: refactor channel unclaimingGravatar MarkKoz2021-01-04-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Narrow the scope of `move_to_dormant` to just moving the channel. Following the design of `claim_channel`, make `unclaim_channel` handle cooldowns and unpinning.
| | | | | | * | | HelpChannels: remove obsolete channel position trace logGravatar MarkKoz2021-01-04-1/+0
| | | | | | | | |
| | | | | | * | | HelpChannels: refactor stat trackingGravatar MarkKoz2021-01-04-27/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move significant code related to stats to a separate module.
| | | | | | * | | HelpChannels: move function to the channel moduleGravatar MarkKoz2021-01-04-42/+45
| | | | | | | | |
| | | | | | * | | HelpChannels: prevent user from claiming multiple channels quicklyGravatar MarkKoz2021-01-04-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's conceivable for a user to be able to quickly send a message in all available channels before the code has a chance to add the cooldown role. Place a lock on the author to prevent the claim code from running multiple times for the same user.
| | | | | | * | | HelpChannels: await init task at the start of event listenersGravatar MarkKoz2021-01-04-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It feels safer to do this since the init task moves channels to different categories and the listeners check if channels are in certain categories.
| | | | | | * | | HelpChannels: use a more accurate lock for messagesGravatar MarkKoz2021-01-04-47/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the `lock_arg` decorator to keep a separate lock for each channel rather than a single lock used by all messages. Separate the core logic in `on_message` into a separate function to facilitate the use of `lock_arg` - not everything in `on_message` needs to be under the lock.
| | | | | | | | * Handle unloaded cogs when retrieving server info.Gravatar kosayoda2021-01-23-9/+16
| | | | | | | | |
| | | | | | | | * Reduce unnecessary line splits and parameters.Gravatar kosayoda2021-01-23-12/+6
| | | | | | | | |
| | | | | | | | * Use helper function to determine mod channel.Gravatar kosayoda2021-01-23-1/+1
| | | | | | | | |
| | | | | | | | * Extract `is_staff_channel` to a utility function.Gravatar kosayoda2021-01-23-18/+19
| | | | | | | | |
| | | | | | | | * Merge branch 'master' into feat/info/server-cmd-enhancementsGravatar Xithrius2021-01-19-55/+970
| | | | | | | | |\ | |_|_|_|_|_|_|_|/ |/| | | | | | | |
* | | | | | | | | Merge pull request #1368 from python-discord/mbaruh/filtersGravatar Boris Muratov2021-01-19-9/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove additional embed message
| * | | | | | | | | Remove additional embed messageGravatar Boris Muratov2021-01-19-9/+1
|/ / / / / / / / /
* | | | | | | | | Replace in_whitelist check with commands.has_any_role checkGravatar ks1292021-01-19-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in_whitelist allow normal users also run commands in bot commands, but branding commands should be mod+ only, so we need to use has_any_role instead from discord.py.
* | | | | | | | | Merge pull request #1367 from ↵Gravatar Dennis Pham2021-01-18-13/+26
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/bug/backend/bot-4x/chunk-sync-requests Sync: chunk user requests
| * | | | | | | | | Sync: test chunking of user requestsGravatar MarkKoz2021-01-18-11/+18
| | | | | | | | | |
| * | | | | | | | | Sync: chunk user requestsGravatar MarkKoz2021-01-18-2/+8
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site can't handle huge syncs. Even a bulk patch of 10k users will crash the service. Chunk the requests into groups of 1000 users and await them sequentially. Testing showed that concurrent requests are not scalable and would also crash the service.
* | | | | | | | | Merge PR #1289 - add branding managerGravatar Mark2021-01-18-19/+872
|\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge branch 'master' into branding-managerGravatar Mark2021-01-18-6/+5
| |\ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | |
* | | | | | | | | | Update config-default.ymlGravatar Boris Muratov2021-01-18-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whitelisted mod_meta and mod_tools as mod channels
* | | | | | | | | | Merge pull request #1364 from HassanAbouelela/fix_suggestion_tagsGravatar Xithrius2021-01-17-6/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix ZeroDivisionError In Error Handler
| * | | | | | | | | | Stop Tag Matching On SuggestionGravatar Hassan Abouelela2021-01-17-6/+1
|/ / / / / / / / / /
| * | | | | | | | | Merge branch 'master' into branding-managerGravatar ks1292021-01-17-15/+74
| |\ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | |
* | | | | | | | | | Merge pull request #1360 from HassanAbouelela/fixes_tag_suggestionsGravatar Dennis Pham2021-01-17-4/+12
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fixes Error Handler Tag Dispatching
| * | | | | | | | | | Checks If Similar Command Is NoneGravatar Hassan Abouelela2021-01-17-0/+3
| | | | | | | | | | |
| * | | | | | | | | | Adds Return On Tag MatchesGravatar Hassan Abouelela2021-01-17-4/+9
|/ / / / / / / / / /
* | | | | | | | | | Update to use Member.pending instead of bot.http.get_memberGravatar Joe Banks2021-01-17-3/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #760 from python-discord/feat/F4zi/CommandSuggestionGravatar Xithrius2021-01-16-9/+63
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Feature: suggest command usage for misspelt commands
| * | | | | | | | | | Removed 'Channels' import, unused.Gravatar xithrius2021-01-16-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Merge branch 'master' into feat/F4zi/CommandSuggestionGravatar Xithrius2021-01-16-751/+58
| |\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
* | | | | | | | | | | Merge pull request #1354 from python-discord/remove-unnomiation-reasonGravatar Xithrius2021-01-16-2/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / / / |/| | | | | | | | | | Remove unwatch reason from the !nominate output
| * | | | | | | | | | Remove unwatch reason from the !nominate outputGravatar Matteo Bertucci2021-01-16-2/+1
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the watch reason can contain private information, we shouldn't share it with the whole staff.
| * | | | | | | | | Only helpers and below now get command suggestionsGravatar xithrius2021-01-06-2/+2
| | | | | | | | | |
| * | | | | | | | | If user is a staff member, no command suggestions.Gravatar xithrius2021-01-05-6/+7
| | | | | | | | | |
| * | | | | | | | | Removed possibility of exception via walrus.Gravatar xithrius2021-01-02-16/+16
| | | | | | | | | |
| * | | | | | | | | Rebased after a long time of being abandonGravatar xithrius2021-01-02-8062/+19057
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | Since the cogs folder has been removed, the error_handler and tag cogs had to be removed and transfer into their respective places in the exts folder.
| * | | | | | | | | Merge branch 'feat/F4zi/CommandSuggestion' of ↵Gravatar F4zii2020-03-07-4/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/bot into feat/F4zi/CommandSuggestion