| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
| |
to constants.py.
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
smaller. Added warning loggings. Better Some Numbers section formatting.
|
| | |
| |
| |
| | |
fixed type hints.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
things more dynamical.
|
| | |
| |
| |
| | |
added alias .movie
|
| | |
| |
| |
| | |
depending how much movies you define. This use TMDB API.
|
| | | |
|
| |\ \
| | |
| | |
| | | |
F4zi/bug/LAST_EMOJI-352
|
| | | | |
|
| | | | |
|
| |/ / |
|
| | |
| |
| |
| |
| |
| | |
Changed the pagination emoji collection from list to tuple
This change was suggested since this collection is constant
|
| | |
| |
| |
| |
| |
| |
| | |
Clicking on [:trashcan:] broke the loop and deleted the message,
instead, now we return after a message deletion and break when
an `asyncio.TimeoutError` is raised
(when a user fails to add reactions in time)
|
| | |
| |
| |
| |
| | |
Switched the emoji used to clear the reactions of a paginator [":x:"]
With [":trashcan:"], Clicking on this emoji deletes the message
|
| |/
|
|
|
|
|
|
| |
When using pagination in the Reddit cog, clicking the LAST_EMOJI would
raise an exception like this:
TypeError: unsupported operand type(s) for -: 'list' and 'int'
This was resolved by taking the subtraction out of the len() function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The emoji IDs in the Reddit cog were for emojis that are not available to Seasonal Bot. While I think a proper solution using constants is to be preferred, I've edited in IDs for emojis that can be used by the bot in the mean time.
I've reused three of the emojis that we were already using for our Reddit webhook and added four new emojis to the `PyDis Emoji II` server.
Reused emojis:
:user: 638729835442602003
:upvotes: 638729835245731840
:comments: 638729835073765387
New emojis available on PyDis Emoji II:
:reddit_logo: 676030265734332427
:reddit_post_photo: 676030265734201344
:reddit_post_text: 676030265910493204
:reddit_post_video: 676030265839190047
The latter four may need to be restyled to match the first three in the future.
|
| |
|
|
| |
reddit posts insted of using a while loop
|
| |\ |
|
| | |
| |
| | |
Update logging events so they follow the correct chain of execution
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |\ |
|
| | | |\ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Advent of Code cog has a subscription system that allows members
to subscribe to a daily notification indicating the puzzle for that
day has become available. However, we introduces a more stringent
role mentionability policy that meant that the mentions did not
actually ping the members subscribed.
To solve this, I've made sure that the bot unlocks the role before
making the announcement using the `unlock_role` context manager. This
also means the role is automatically unlocked after the message is
sent.
In addition, I noticed that Seasonalbot was consistently announcing
the puzzle about 0.5 seconds early. I've correct this by adding a
second to the sleep delay. In addition, the bot now verifies that the
puzzle is available using a small HEAD request. While this does send
a request to the AoC server, it prevents multiple users from sending
unnecessary requests by following our link before the puzzle is
actually available.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I have made the `#advent-of-code` channel id configurable using the
same environment variable technique used for other settings. This
makes it easier to test features that rely on this channel in a test
environment.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, our regualar roles are not mentionable by default. This
means that features that rely on roles to keep track of users that
want to receive announcements, like the AoC Day Countdown, don't
actually ping the users subscribed to it. The solution is obviously
that the bot should unlock prior to making the announcement.
However, this is complicated by the fact that there needs to be a
sufficient delay. both between unlocking and sending the message
and between sending the message and locking the role again. If not,
Discord's not done synchronizing across all servers and some users
won't receive a ping.
To make this easier, I have implemented a context manager that takes
an instance of `discord.Role` and an optional `delay` (default: 5s)
that yields a context in which the role is unlocked. This context
manager also makes sure that the role is locked even if an exception
occured within the unlocked context.
|
| | | | | |
|
| | |/ / |
|
| | | |
| | |
| | |
| | | |
Code style is now consistent with the bot repo.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
The title now defaults to Bookmark and is logged surrounded by
single quotes to make it clear which part is the title.
|
| | | |
| | |
| | |
| | |
| | | |
Instead of returning on error we add an else clause to the try-except
block and add a reaction on success to reduce needless visual clutter.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Improves the wording of both docstrings, strips trailing dot from log
and response messages for consistency. Refactors the error embed and
renames the variable.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
The bookmark method's function signature is reformatted,
bookmark image url is reduced to a single line,
and the embed's description is broken into separate lines.
|