aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Sync: remove author mention from confirm promptGravatar MarkKoz2020-02-12-2/+2
|
* Sync: fix overwriting message with None after editing itGravatar MarkKoz2020-02-12-1/+1
|
* Sync: fix passing context instead of message to _confirm()Gravatar MarkKoz2020-02-12-4/+5
| | | | * Mention possibility of timing out as a reason for aborting a sync
* Sync: fix missing await for fetch_channelGravatar MarkKoz2020-02-12-1/+1
|
* Sync: allow for None values in DiffsGravatar MarkKoz2020-02-12-4/+4
|
* Sync: make Role, User, and Diff privateGravatar MarkKoz2020-02-12-15/+15
|
* Sync: remove generic type from DiffGravatar MarkKoz2020-02-12-19/+10
| | | | | | | | | | It doesn't play along well with NamedTuple due to metaclass conflicts. The workaround involved created a NamedTuple-only base class, which does work but at the cost of confusing some static type checkers. Since Diff is now an internal data structure, it no longer really needs to have precise type annotations. Therefore, a normal namedtuple is adequate.
* Sync: move sync logic into Syncer base classGravatar MarkKoz2020-02-12-93/+54
| | | | | | | | | | | | The interface was becoming cumbersome to work with so it was all moved to a single location. Now just calling Syncer.sync() will take care of everything. * Remove Optional type annotation from Diff attributes * _confirm() can edit the original message and use it as the prompt * Calculate the total diff and compare it against the max before sending a confirmation prompt * Remove abort message from sync(); _confirm() will handle that
* Sync: prompt to confirm when diff is greater than 10Gravatar MarkKoz2020-02-12-37/+158
| | | | | | | | | | | The confirmation prompt will be sent to the dev-core channel or the specified context. Confirmation is done via reactions and waits 5 minutes before timing out. * Add name property to Syncers * Make _get_diff private; only sync() needs to be called now * Change spelling of synchronize to synchronise * Update docstrings
* Sync: create classes for syncersGravatar MarkKoz2020-02-12-242/+158
| | | | | | | | | Replaces the functions with a class for each syncer. The classes inherit from a Syncer base class. A NamedTuple was also created to replace the tuple of the object differences that was previously being returned. * Use namedtuple._asdict to simplify converting namedtuples to JSON
* Sync: support sending messages to a context in sync()Gravatar MarkKoz2020-02-12-17/+11
|
* Sync: support multiple None totals returns from a syncerGravatar MarkKoz2020-02-12-10/+7
|
* Sync: create function for running a single syncerGravatar MarkKoz2020-02-12-22/+24
|
* Sync: refactor cogGravatar MarkKoz2020-02-12-25/+26
| | | | | | | | * Use ID from constants directly instead of SYNC_SERVER_ID * Use f-strings instead of %s for logging * Fit into margin of 100 * Invert condition to reduce nesting * Use Any instead of incorrect function annotation for JSON values
* API: create request function which has a param for the HTTP methodGravatar MarkKoz2020-02-12-18/+10
| | | | Reduces code redundancy.
* API: define functions with keyword-only argumentsGravatar MarkKoz2020-02-12-10/+10
| | | | This seems to have been the intent of the original implementation.
* Constants: add dev-core channel and check mark emojiGravatar MarkKoz2020-02-12-0/+4
|
* Use wait_until_guild_available instead of wait_until_readyGravatar MarkKoz2020-02-12-13/+13
| | | | It has a much better guarantee that the cache will be available.
* Bot: make the connector attribute privateGravatar MarkKoz2020-02-12-4/+4
|
* Bot: add wait_until_guild_availableGravatar MarkKoz2020-02-12-0/+39
| | | | | | | | | This coroutine waits until the configured guild is available and ensures the cache is present. The on_ready event is inadequate because it only waits 2 seconds for a GUILD_CREATE gateway event before giving up and thus not populating the cache for unavailable guilds.
* Merge pull request #747 from mosguinz/pagniation-fixGravatar Sebastiaan Zeeff2020-02-12-1/+1
|\ | | | | Fix pagniation module for "last page" reaction
| * Fix pagniation module for "last page" reactionGravatar mosguinz2020-02-12-1/+1
|/ | | | Fixes #746.
* Merge pull request #625 from python-discord/emoji-cleanupGravatar Mark2020-02-09-14/+19
|\ | | | | Separate message/embed deletion and reaction deletion emojis
| * Remove clear reaction from paginatorsGravatar MarkKoz2020-02-09-17/+2
| | | | | | | | | | It could be confused with the delete reaction. Clearing reactions manually is rarely a useful feature anyway.
| * Merge remote-tracking branch 'origin/master' into emoji-cleanupGravatar MarkKoz2020-02-08-2128/+4834
| |\ | |/ |/|
* | Merge pull request #743 from python-discord/dep/b734/discord.py-1.3Gravatar Mark2020-02-07-39/+34
|\ \ | | | | | | Update discord.py to 1.3.1
| * | Pin discord.py to 1.3.xGravatar MarkKoz2020-02-07-2/+2
| | |
| * | Update discord.py to 1.3.1Gravatar MarkKoz2020-02-07-39/+34
|/ /
* | Merge pull request #542 from python-discord/fuzzy-tag-searchGravatar Shirayuki Nekomata2020-02-07-9/+82
|\ \ | | | | | | Make it easier for user to search for tags
| * \ Merge branch 'master' into fuzzy-tag-searchGravatar Matteo Bertucci2020-02-07-313/+199
| |\ \ | |/ / |/| |
* | | Merge pull request #737 from python-discord/remove-prometheusGravatar Mark2020-02-05-272/+128
|\ \ \ | | | | | | | | Remove prometheus related code
| * \ \ Merge branch 'master' into remove-prometheusGravatar S. Co12020-02-05-41/+71
| |\ \ \ | |/ / / |/| | |
* | | | Merge pull request #739 from python-discord/resources-moveGravatar Leon Sandøy2020-02-05-2/+2
|\ \ \ \ | | | | | | | | | | Move tools and questions guide to under resources
| * | | | Add missing slash to asking good questions url.Gravatar scragly2020-02-06-1/+1
| | | | |
| * | | | Move tools and questions guide to under resourcesGravatar scragly2020-02-05-2/+2
|/ / / / | | | | | | | | | | | | | | | | After the wiki pages adjustment to the resources page, these two urls are needing to be updated to point to the new correct locations for each page. Tools will be under resources, and Asking Good Questions is a guide, so will be under Guides.
* | | | Relay attachments to log channel before filters delete message (#630)Gravatar scragly2020-02-04-39/+69
|\ \ \ \ | | | | | | | | | | Relay attachments to log channel before filters delete message
| * | | | Use a trailing underscore to avoid name conflicts. Gravatar scragly2020-02-04-2/+2
| | | | | | | | | | | | | | | Previously used a leading underscore, but that's usually meant for non-used names.
| * | | | Change typehint name for the attachment-log constantGravatar Matteo Bertucci2020-02-03-1/+1
| | | | |
| * | | | Merge branch 'master' into #549-show-attachments-staffGravatar Matteo Bertucci2020-02-03-508/+1333
| |\ \ \ \ | |/ / / / |/| | | |
| * | | | Replace constant attachment-repost by the actual ID of #attachment-logGravatar Matteo Bertucci2020-02-03-4/+3
| | | | |
| * | | | Relay attchments to #attachment_logGravatar Akarys422019-12-14-1/+2
| | | | |
| * | | | Merge branch 'master' into #549-show-attachments-staffGravatar Matteo Bertucci2019-12-12-334/+1348
| |\ \ \ \
| * | | | | AntiSpam: remove bot field from DeletionContextGravatar MarkKoz2019-12-03-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The destination channel can be retrieved be accessing a message's guild. * Remove unused queue_consumption_tasks attribute.
| * | | | | ModLog: fix 0 message logs uploaded when no attachments givenGravatar MarkKoz2019-12-03-8/+3
| | | | | |
| * | | | | AntiSpam: correct a function annotationGravatar MarkKoz2019-12-03-3/+3
| | | | | |
| * | | | | AntiSpam: replace reupload_attachments with send_attachments from utilsGravatar MarkKoz2019-12-03-28/+6
| | | | | |
| * | | | | Utils: have send_attachments save attachments using the cached URLGravatar MarkKoz2019-12-03-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it more likely to successfully save an attachment after it's been deleted.
| * | | | | Utils: log send_attachments failures instead of raising exceptionsGravatar MarkKoz2019-12-03-1/+10
| | | | | |
| * | | | | Utils: add send_attachments param to disable linking to too-large filesGravatar MarkKoz2019-12-03-7/+14
| | | | | |
| * | | | | Utils: use the guild's filesize_limit to determine max attachment sizeGravatar MarkKoz2019-12-03-4/+3
| | | | | |