aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/backend (follow)
Commit message (Collapse)AuthorAgeLines
...
| * | Branding: log event path alongside errorGravatar kwzrd2021-03-14-1/+1
| | | | | | | | | | | | Knowing which event failed would probably be quite useful.
| * | Branding: avoid sending #changelog notification on resyncGravatar kwzrd2021-03-14-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The notification is now sent conditionally depending on whether we're entering a new event. This prevents sending a repeating notification in the case of a manual resynchronisation. A practical example of when this may trigger is when a staff member temporarily applies custom assets & then uses the sync command to reapply the current event.
| * | Branding: make 'cog_unload' synchronousGravatar kwzrd2021-03-14-1/+1
| | | | | | | | | | | | Discord.py doesn't await the return value.
| * | Branding: show success information in 'sync' responseGravatar kwzrd2021-03-14-6/+17
| | | | | | | | | | | | | | | Now that the boolean flags are propagating from 'apply_asset', we can present them to the user.
| * | Branding: propagate success-indicating boolean from 'apply_asset'Gravatar kwzrd2021-03-14-19/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | The sync command will now be able to use present this information to the invoking user. This commit also prevents the cached banner & icon hash from being overwritten in the case of asset upload failure. As a result, the daemon will attempt to re-apply the assets the following day.
| * | Branding: do not call 'rotate_icons' from rotation initGravatar kwzrd2021-03-14-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | It makes more sense for the init and the rotation to be separate operations. In a subsequent commit, the separation of responsibility will allow the `rotate_icons` function to have a meaningful return value.
| * | Branding: replace ugly lambda with 'attrgetter'Gravatar kwzrd2021-03-13-1/+2
| | |
| * | Branding: add calendar command groupGravatar kwzrd2021-03-13-0/+63
| | |
| * | Branding: cache all available eventsGravatar kwzrd2021-03-13-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prequel to adding a calendar command. To avoid re-querying the branding repo on command invocation, event information will be cached whenever we make requests. The command can then simply get an up-to-date event schedule from the cache, with the option of forcing an update via the 'populate_cache_events' function. Since we cannot easily serialize entire 'Event' instances, we simply store what's needed - the event name, and its duration. The author has verified that the cache maintains order; in this case chronological order based on event start date.
| * | Branding: extract duration string in helper functionGravatar kwzrd2021-03-13-9/+17
| | |
| * | Branding: add missing early exitGravatar kwzrd2021-03-13-0/+1
| | |
| * | Branding: lock commands to mods+ where necessaryGravatar kwzrd2021-03-13-1/+3
| | |
| * | Branding: implement command interfaceGravatar kwzrd2021-03-13-1/+85
| | |
| * | Branding: gate sync via helper functionGravatar kwzrd2021-03-13-8/+19
| | | | | | | | | | | | Sync make also be invoked with a command; avoid logic duplication.
| * | Branding: implement daemonGravatar kwzrd2021-03-13-3/+109
| | |
| * | Branding: implement internal utilityGravatar kwzrd2021-03-13-2/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the core logic of branding management. In comparison with the previous version, we now maintain all state in Redis, which allows the bot to seamlessly restart without losing any information. The 'send_info_embed' function is intentionally implemented with the consideration of allowing users to invoke it on-demand. It always reads information from the cache, even if the caller could pass a 'MetaFile' instance. So while this may look needlessly indirect right now, it should begin to make sense once the command API is implemented.
| * | Branding: expose SHA on remote objectsGravatar kwzrd2021-03-13-0/+1
| | |
| * | Branding: implement asset application logicGravatar kwzrd2021-03-13-0/+51
| | |
| * | Branding: do not require 'RemoteObject' instance to fetch fileGravatar kwzrd2021-03-13-5/+5
| | |
| * | Branding: correctly annotate optional attributeGravatar kwzrd2021-03-13-1/+1
| | |
| * | Branding: make event instances aware of their locationGravatar kwzrd2021-03-13-2/+6
| | | | | | | | | | | | This allows us to add a neat string representation.
| * | Branding: add event gettersGravatar kwzrd2021-03-13-0/+51
| | | | | | | | | | | | These methods form the API to the repository abstraction.
| * | Branding: define event construction methodologyGravatar kwzrd2021-03-13-0/+84
| | |
| * | Branding: add HTTP fetch helper methodsGravatar kwzrd2021-03-13-0/+54
| | |
| * | Branding: migrate constantsGravatar kwzrd2021-03-13-11/+11
| | | | | | | | | | | | | | | Constants will only be used in one place and there's not enough of them to warrant a separate module.
| * | Branding: initiate repository abstractionGravatar kwzrd2021-03-13-0/+15
| | |
| * | Branding: remove current implementationGravatar kwzrd2021-03-13-811/+10
| |/ | | | | | | | | Since we're planning substantial changes, it will be easier to build from scratch.
| * Close coroutine to prevent `RuntimeWarning`sGravatar Numerlor2021-02-25-0/+1
| |
| * Send command help for `BadUnionArgument`sGravatar Numerlor2021-02-25-0/+1
| |
* | Remove unnecessary ResponseCodeError suppressGravatar ks1292021-02-19-4/+2
| |
* | Merge branch 'master' into error-handler-testGravatar ks1292021-02-19-11/+893
|\|
| * Fix #1371 error via adding errors.Gravatar Senjan212021-02-05-1/+3
| |
| * Remove ConversionError from comment, as its now handled above.Gravatar Chris2021-01-29-1/+1
| |
| * handle within the error handlerGravatar Chris2021-01-29-0/+6
| |
| * 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.
| * 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 branch 'master' into branding-managerGravatar Mark2021-01-18-6/+1
| |\
| | * Stop Tag Matching On SuggestionGravatar Hassan Abouelela2021-01-17-6/+1
| | |
| * | Merge branch 'master' into branding-managerGravatar ks1292021-01-17-2/+44
| |\|
| | * Checks If Similar Command Is NoneGravatar Hassan Abouelela2021-01-17-0/+3
| | |
| | * Adds Return On Tag MatchesGravatar Hassan Abouelela2021-01-17-1/+2
| | |
| | * Removed 'Channels' import, unused.Gravatar xithrius2021-01-16-1/+1
| | |
| | * Merge branch 'master' into feat/F4zi/CommandSuggestionGravatar Xithrius2021-01-16-5/+3
| | |\
| | * | 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-1/+38
| | | | | | | | | | | | | | | | 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 'master' into branding-managerGravatar ks1292021-01-16-6/+4
| |\ \ \ | | | |/ | | |/|
| | * | Annihilate all traces of Developer and Unverified rolesGravatar mbaruh2021-01-11-6/+4
| | |/
| * | Add startup and daemon tasks canceling on cog unloadGravatar ks1292021-01-16-0/+6
| | |