#dev-log
1 messages ยท Page 52 of 1
Build 20200902.6 succeeded
Leon Sandรธy
00:03:58
Site
Abstract
Our 100k milestone is coming up fast, and to celebrate we are creating a timeline of significant events in PyDis history.
This is an extremely rough draft as of writing, just wanted to get something out there.
Build 20200903.1 failed
GitHub
00:02:05
Site
Postgres backup completed!
Seems to work as intended in testing. Giving it the green light.
Alright, seems fine now. let's get this merged.
Build 20200903.1 succeeded
GitHub
00:03:52
Bot
40ad0de Everyone Ping: Add rules to default config file - MrAwesomeRocks
df4ef2e Everyone Ping: Added rule - MrAwesomeRocks
99aa7d5 Everyone Ping: Added rule to recognized rules - MrAwesomeRocks
f873e68 Everyone Ping: Added required values to config - MrAwesomeRocks
c55b7e3 Everyone Ping: Fixed rule, edited config - MrAwesomeRocks
Build 20200903.2 succeeded
GitHub
00:05:47
Bot
Connected!
Build 20200903.3 succeeded
GitHub
00:05:20
Bot
Connected!
Postgres backup completed!
"Closes #331"
when bot able to search
when times up
when error happen
It sends value error if user try to send str or float value
it gives list from ...
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200904.1 failed
GitHub
00:01:00
Seasonal Bot
Build 20200904.2 succeeded
GitHub
00:01:01
Seasonal Bot
The feature works well. Just a few coding conventions to change here and there.
Also, this is my first review on a pydis PR, would love to hear some feedback on this.
Could use better variable names, example: search_description instead of s?
here too, instead of a and j, we can use better names. maybe rename title -> titles and a-> title.
this is the second time we are looping over the title list and the final list is not required. we can simply replace j with a.replace(" ", "_"). (a should be renamed as mentioned in a previous comment).
This way, we don't have to loop over the title list 2 times and populate the final list as done in line 52.
The everyone ping rule has been picking up some false positives, working on a solution now.
Ok I will make changes according to what u said :) btw this is my first pr also in pydis too
Build 20200904.3 succeeded
GitHub
00:00:56
Seasonal Bot
Closes #1142
The everyone ping rule was picking up some false positives, such as
`a`@everyone`b`
or
Hello`@everyone`
This fixes that issue by first removing all codeblocks from the message, then checking the the clean, de-codeblocked message has any @everyone pings inside of it.
Build 20200904.1 succeeded
GitHub
00:03:08
Bot
This introduces false negatives with
`@everyone``
and possibly other messages.
I'm not sure regex is the way to go now.
I think I'm gonna close this PR - we will handle this in the core dev team, @MrAwesomeRocks, because I want some good unit tests for this so we're sure we're catching every edge case.
1512dcc Disable burst_shared filter of the AntiSpam cog - SebastiaanZ
We need to completely remove django-wiki from the site, as a step in our journey towards complete dewikification.
It will be useful to look at https://github.com/python-discord/site/pull/202 to see what kinds of changes we made when introducing it - this issue is to essentially do the opposite of that. However, we can't simply revert this because we've made many changes to the wiki stuff since then, so this will need to be done manually.
This will probably also require a migration, si...
Build 20200904.2 succeeded
GitHub
00:04:35
Bot
Connected!
Create a new Django app that will serve guides.
This app will have a folder full of markdown files with guide content, and will render those markdown files dynamically depending on the url. Something like pythondiscord.com/guides/ will navigate to a page displaying all the content in the correct markdown file. These markdown files should be GitHub-flavored markdown.
What should a page like this look like?
Well, it should look like one of our current guides.
, we will want a slightly different approach. These will basically just be normal static pages, but we need a clever, modular system for displaying sidebars.
What's a sidebar?
Take a look at one of our current event pages.

See the information on the right hand side? That's a sidebar. These sidebars should be able to c...
This issue must be solved after #385
Once a new system for the event pages is ready, we should migrate our existing event pages into this new system.
Please make this a separate pull request, so that we can review the system and the content separately.
Remember to target the dewikification branch with this pull request
On some clients (android), the markdown is commonly not rendered properly within text links, in this case the bolding didn't happen and the markdown asterisks remainder as plaintext.
Moving them outside of the link text fixes the issue

Build 20200904.3 succeeded
GitHub
00:03:04
Bot
Remember to target the dewikification branch with this pull request
On the current site, we provide a curated set of resources - It's beautiful!

We need to recreate this for the dewikified site.
So, what precisely needs to be done?
Well, you need to create a django app, let's call it resources, which will contain all this stuff.
When someone navigates to `p...
Overall I like what I see, but I do have one question and one suggestion that I'd like to see addressed.
Should the thresholds be stored in here or in the configuration file? The other constants like the join and verification messages make sense here but as an example we have the anti-spam settings in the config-default.yaml file
Will this be an issue if the bot is forced to restart? Is the task_cache stored somewhere persistent?
task_cache is a RedisCache; it will persist in Redis.
Remember to target the dewikification branch with this pull request
This must be solved after the https://github.com/python-discord/site/issues/387 solution has been merged.
Okay, so currently we have these lists of resources, right?

These pages should be generated based on a hierarchy of YAML files - one for each resource - so that we don't actually have to writ...
Remember to target the dewikification branch with this pull request
This will depend on most of the issues in the https://github.com/python-discord/site/projects/1 project, so it should be handled pretty late in the dewikification process.
Most of the issues in the dewikification will probably end up changing the URLs that refer to certain key pages, such as our resources page. This is problematic because many pages on the world wide web refer to our pages, and these will end up b...
Yea, think of task_cache as a dict that persists across restarts.
This condition should only be True the first time the bot connects. After that, the last sent reminder should always be cached, but nothing bad happens if it isn't ~ the bot will just send another one, and then cache it.
I'm not sure. I usually try to advocate keeping the definitions close to where they are used.
Let's imagine that these settings are in the config.yml. If you're reading the code and you wonder what the value is, you have to:
- Follow the import to
constants.py - Look at from where the value is being loaded
- Navigate to the YAML and find the value
IDE generally cannot aid you in this process, as the value only gets bound at runtime. In my opinion, this creates a significant level...
Another downside that I notice with creating move distance between the value and its use, is that it increases the amount of necessary documentation. The names of these variables would likely need to be longer, and be more annotated, so that it's obvious what they represent.
For what it's worth, both on Windows and Android, it doesn't render as bold. However, unlike the screenshot, the asterisk aren't visible either.
One additional factor to consider is if these values need to be changed for a testing environment. If so, using the config system ensures that people do not have the modify any of the files checked into our version control system, as they only have to configure config.yaml to their liking to overwrite the default in config-default.yaml. This prevents debug values from being accidentally committed to the repository.
I'm honestly kind of torn about whether we should move it. On one hand you're right, there's all the distance between the values and the and where they're used that causes potential issues sifting through the code, as I've certainly had in the past.
I also think there's an argument to be made that the anti-spam cog needs it to be in the config file just due to the number of rules it touches. But I think my main concern is when we actually need to tweak the configuration from a moderati...
For what it's worth, both on Windows and Android, it didn't render as bold before your fix.
Hmm, it does render properly for me on windows; I guess it's inconsistent all over.
This prevents debug values from being accidentally committed to the repository.
@SebastiaanZ: This is true, although it doesn't feel like a very strong argument to me. I don't think it's difficult to review the diff before commiting it, and it should definitely be done before pushing. Unintended diff being commited & pushed sadly happens often even with these measures in place. I actually probably find it easier to have them version controlled, it forces you to keep your settings tidy & ...
This is true, although it doesn't feel like a very strong argument to me. I don't think it's difficult to review the diff before commiting it, and it should definitely be done before pushing. Unintended diff being commited & pushed sadly happens often even with these measures in place. I actually probably find it easier to have them version controlled, it forces you to keep your settings tidy & you will always know when and how your configured behaviour differs from the production one.
T...
To me, personally, it's one of the biggest reasons why we use the configuration system we do.
Interesting, thanks for sharing that. It's the opposite for me. I don't feel very comfortable having a config.yml with no history or easy way to see how it differs from production settings, or other developers' settings. It feels to me like that's an easy way to miss something during review, because you're not aware that you're getting different behaviour.
For me, the most notable advantage...
Ideally these would be configurable. It's just that the current config system sucks and we haven't gotten far with coming up with an alternative.
This PR modifies the regex in the everyone ping rule to avoid false positives and negatives. Test cases have also been added to enforce correctness.
Implementation
The check now removes all codeblocks, inline or multiline from the message before detecting pings. As it uses re.sub, there may be a performance concern. If that turns out to be the case, we can do a basic ping inclusion check, then strip codeblocks if the first filter passes.
Tests
There may be more edge cases th...
Build 20200905.1 succeeded
GitHub
00:02:55
Bot
I want to work on this issue :)
When someone uses !help in another channel than #bot-commands, the output is redirected to #bot-commands.
This is still the case when send message permissions in #bot-commands are removed, which could lead to spamming or "drowning" a potential message about what is happening, in the channel.
Postgres backup completed!
The warning system trying to prevent people from attempting to @everyone is also picking up on people with the nickname 'everyone'
Although after discussing this with other people in discord and looking at the code, it might just be an issue on discords side
I'm not sure if the message that you're highlighting is the one that actually triggered this filter. The filter normally also removes the message in question and there's no error that says that the bot was unable to delete a message here. My working hypothesis is that this user sent two messages in a row: the first one (still there) had a member ping and the second one contained an actual everyone-ping.
53cb77b Disable everyone_ping filter in AntiSpam cog - SebastiaanZ
Build 20200905.2 succeeded
GitHub
00:05:11
Bot
Connected!
There will be an error here when entering a negative number or a number that is greater than the amount of results:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/bot/bot/exts/evergreen/wikipedia.py", line 72, in w_pedia
await ctx.send(WIKIPEDIA_URL.format(title=final[int(user.content) - 1]))
IndexError: list index out of range
Also en...
Overall it looks pretty good, but there are some designs that can be improved.
This docstring does not really tell what this function is about, how it is used, I strongly suggest adding more information, otherwise invoking .help wiki will yield this

A good docstring can yield good help as well, as seen here:

async def search_wikipedia(self, search_term: str) -> Optional[List[str]]:
You will want to import List from typing as well.
d6f91f8 Updated constants to include Wolfram configurat... - Xithrius
c373d4c Migrated Wolfram cog from the Python bot in Pyt... - Xithrius
38bebb3 Added necessary utility for Wolfram cog. - Xithrius
a3941cb Update bot/exts/evergreen/wolfram.py - Xithrius
d472389 Removed the time utility and replaced it with t... - Xithrius
Build 20200905.1 succeeded
GitHub
00:02:29
Seasonal Bot
Connected!
Is there a reason why these are defined inside the command? From the look of it, you can move it outside as well to prevent them being defined everytime the command is run, declaring them as @staticmethod
Build 20200905.2 failed
GitHub
00:01:11
Seasonal Bot
I've initially decided to define these inside of the function to be consistent with the form of the other commands inside of the Fun cog. I could change them into @staticmethods but I'm not sure whether making them standalone top-level functions would avoid polluting the cog.
I would suggest moving them outside, in case we want to write unittests for these. Naming these with a _ in front of the name to signify that these are to be used internally might be able to help, otherwise you can always move them outside in their own class and just call it inside the Cog.
Build 20200905.3 succeeded
GitHub
00:03:12
Bot
Build 20200905.4 succeeded
GitHub
00:04:31
Bot
Connected!
Grafana can show this now. Do we really need a Discord front-end to it? @lemonsaurus
nope. I mean, this is an issue that severely predates grafana. I consider this solved.
I would add a check for @everyone in messages before re.sub, just to make this as robust as possible, because we can't really test this in a server of 98k+ without deploying it, and it would be bad if the bot got lagged out during a raid or something.
I see @MarkKoz's way working better, because then we could just add an @deleteable or @trashable decorator and would not have to completely modify the bot's message-sending functionality. It just seems simpler to implement this that way.
A bit nitpicky, but after being curious on how it works, I looked it up and saw this little discrepancy.
Docstring says 256 colors (8-bit), but it actually only uses 32 colors (5 bit?). Either of those should probably be adjusted to match the other?
I'd like to work on this please.
putting these here so i remember to do them
anyone is welcome to beat me to it (please )
- [x] REPL
- [x]
exit()- [x]
if __name__ == '__main__'- [x] off-topic
- [x] metasyntactic variables (foo, bar, etc)
- [x] paste (link to paste.pydis.com, explain about saving and url changing)
- [x] xy problem
- [x] parameters vs. arguments
- [x] codeblock [UPDATED] (added info about backticks and other bad formatting)
- [x] self
- [x] classes...
Postgres backup completed!
A new tag named guilds that directs people towards the awesome list found under the communities section of the python discord's site and to partners of the python discord. I believe this will come in handy both when people ask for help regarding other languages and fields and for when people ask if there is any guilds similar to the python discord but that are focused on othe...
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200906.1 succeeded
GitHub
00:03:03
Bot
Build 20200906.2 succeeded
GitHub
00:03:04
Bot
As we discussed during the admin meeting today, we'd like to see the automod stuff completely removed from the feature, keep the mod-alert, and make it work for @here too.
Going by that, does it make sense to move it from antispam to filtering? The former is rigid on pinging/infracting, and I think it suits the latter more.
Looking at filtering, that file is getting very long (583 lines) because of all the different rules. The filtering rules also seem to be organized similarly to the antispam rules.
Would it make sense to move the rules out of filtering and into a rules directory somewhere, sort of like in antispam? It would make it simpler to add rules later on.
It could be out of the scope of this PR to change filtering that much, though.
2 lemoji templates, one straightened and one tilted, with the symmetrical beard.
The straightened one should help ensure that any added features can also be symmetrical before tilting.
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Code of Conduct Code of conduct for our community
- Python Discord Contributor Wiki - A set of resources about setting up our services
Build 20200906.1 succeeded
GitHub
00:00:51
Seasonal Bot
Waiting for #59 to merge to change the lemonsaurus head.
Updating all existing lemojis to incorporate new lemon template that has the symmetrical beard. Slight adjustments to the emojis themselves are also done to unify the style.
Would it make sense to move the rules out of filtering and into a rules directory somewhere, sort of like in antispam?
Yeah, I think we should probably consider doing that - maybe rules could have a subfolder for filtering and one for antispam. But yeah it's probably out of scope for this PR. You could make an issue for it if you want, @MrAwesomeRocks ?
The quality and the design has definitely improved, great job!
I would definitely advise against introducing unnecessary blank line, especially between if / elif / else or try / except.
You do want to capitalize the S in Sorry and you would want proper grammar here instead of informal language.
await ctx.send("Sorry, but you cannot do that, I will only accept an integer.")
The same can be said for other messages as well.
This should be moved up to line 33, since at this line we've already finished appending titles.
You can also change the text here as well to something like "Finished appending titles."
Build 20200906.2 succeeded
GitHub
00:01:00
Seasonal Bot
Description
Update the discord.py version to 1.4.1, and also put the voice extra back in
Reasoning
It currently gets the package straight from GitHub,
https://github.com/python-discord/seasonalbot/blob/da468c51502c88c00687e2869f05a1a46c715e45/Pipfile#L10
which was necessary to allow for usage of AllowedMentions before it was released, but wasn't ideal. Now that the new version has been released I believe this is no longer necessary. Currently it also doesn't include the voice...
Postgres backup completed!
Build 20200907.1 succeeded
GitHub
00:00:58
Seasonal Bot
sorry my commit msg is looking weired, actually my commit failed and then i corrected changes and commited again with new msg and previous commit msg got disappeared ๐
I think for now, we should align with the current configuration standard and move the things we would need to tweak on the fly (the constants I mentioned up above) to the config-default.yaml
log.info("trying to append titles")
There are some typos in the file similar to this one, let's fix them so they show up properly in the log as well.
log.info("Finished appending titles with underscores")
Did you mean "with underscore"?
I like the idea of using chances, that's a great design! We're almost there!
The 3 number should not be hard-coded and should be moved up to be a variable for the cog.
Even better, you can make it configurable in the config as well, by declaring them in the bot/constants.py for example
Build 20200907.2 succeeded
GitHub
00:01:20
Seasonal Bot

I don't know why that happen to you but when u tried that worked fine can u show me what u searched
When using !rule 6, the embed contains the string #python-general as a reference to the channel. Let's make it a link.
In #rules, it's already a link.
Sure think, I did what you tried as well, and this is what I got:


It makes senses as well, since l_of_list is indeed an int.
8c39b74 Remove with_role decorator in favour of has_any... - MarkKoz
24657d4 Implement the without_role decorator by negatin... - MarkKoz
b0a2ebb Use has_any_role's predicate directly - MarkKoz
8e161a3 Implement role checks using has_any_role - MarkKoz
7722578 Rename role checks and decorators - MarkKoz
Resolves #217
This simplifies the implementations by relying on the function discord.py provides. with_role is entirely replaced by has_any_role since it was identical. The rest had their implementations changed. Consequently, they now support specifying roles as names in addition to IDs. They were also renamed to be more consistent with has_any_role's name.
Build 20200907.1 failed
GitHub
00:00:50
Bot
Okay, it's been a few days and I got 2 "yes" responses. I'm going to start on this.
Build 20200907.2 failed
GitHub
00:02:16
Bot
7b31119 Sync: remove confirmation - MarkKoz
The confirmation was intended to be a safe guard against cache issues that would cause a huge number of roles/users to deleted after syncing. With wait_until_guild_available, such cache issue shouldn't arise. Therefore, this feature is obsolete.
Resolve #1075
Stalled until #1151 is merged, which will simplify this implementation.
Build 20200907.3 failed
GitHub
00:02:41
Bot
Build 20200907.4 succeeded
GitHub
00:03:15
Bot
Actually I did this to detect spam of command if user use try to give .wiki in spam bot can detect with this
Postgres backup completed!
Connected!
This PR adds 3 new lemojis
-
:lemon_raised_eyebrow

-
:lemon_tongue:

-
:lemon_swag:

That's fine, but you mutate it into two totally different types, and that can cause confusion to anyone reading the code, so I still strongly suggest using two variables instead.
@slushiegoose do you still want to work on this issue?
This looks great, and I appreciate you opening this request.
I think this is fun, and I don't mind adding it to the emoji roster in our community - but I don't think it really belongs in the lemoji folder in this repo, it's just too different.
So, I'm gonna add it to the community and then close this PR.
Build 20200908.1 succeeded
GitHub
00:01:03
Seasonal Bot
Awesome! Only some minor typo and grammar errors and I believe it'll be ready!
await ctx.send(f"Sorry, please give an integer between `1` and `{l_of_list}`, {error_msg}")
This can be applied to the prompts below as well for IndexError
There's a typo here, it should be appending instead of appening
Build 20200908.2 succeeded
GitHub
00:01:03
Seasonal Bot
Build 20200908.3 succeeded
GitHub
00:01:05
Seasonal Bot
Build 20200908.4 succeeded
GitHub
00:00:56
Seasonal Bot
Build 20200908.5 succeeded
GitHub
00:00:55
Seasonal Bot
Build 20200908.6 succeeded
GitHub
00:00:51
Seasonal Bot
Build 20200908.7 succeeded
GitHub
00:00:58
Seasonal Bot
@Vincenwobdo do you still want to work on this? Or you are fine leaving the issue to @Anubhav1603?
@Anubhav1603 you certainly can take it on. Thank you.
Ok i will work on this issue ๐ ty
Build 20200908.1 succeeded
GitHub
00:03:00
Bot
Build 20200909.1 failed
GitHub
00:01:42
Site
Postgres backup completed!
Build 20200909.2 succeeded
GitHub
00:01:50
Site
Description
We doesnt have source command for seasonal bot so it will be good if we add one
Reasoning
with source command we can quickly check source of any command same like python bot
Would you like to implement this yourself?
- [x] I'd like to implement this feature myself
- [x] Anyone can implement this feature
Connected!
Description
Changing the output of the .topic command from plain text to an embed. The suggested topic will be in the title, bold. The description will be a hyperlink to the topic suggestion form, which can be found here
Reasoning
The output of the .topic command is too plain, and no one knows where to suggest new topics! With this addition, people will now not only be able to see the topic more clearly, but they will know where to go...
e0438b2 Watchchannels: censor message content if it has... - MarkKoz
c0afea1 Don't send code block help if message has a web... - MarkKoz
59a58db Use wait_for_deletion from bot/utils/messages.p... - AtieP
ee4efbb Define a Command subclass with root alias support - MarkKoz
f455a79 Bot: add root alias support - MarkKoz
Build 20200909.1 succeeded
GitHub
00:03:25
Bot
Relevant Issues
Closes #434
Description
Embeds are now used for providing the topic and the hyperlink to where you can suggest more. The form here has been updated to include the offtopic section.
Reasoning
By using itertools.cycle, all channels in the TOPICS dictionary have an infinite generator. This was created by shuffling the topics in their current state and then putting them into their own section of a dictionary. Th...
Build 20200909.1 succeeded
GitHub
00:01:00
Seasonal Bot
Build 20200909.2 succeeded
GitHub
00:00:57
Seasonal Bot
Build 20200909.3 succeeded
GitHub
00:00:56
Seasonal Bot
I've gone ahead with your suggestion to use a custom lock class.
fe08fd2 Fix attribute docstring for LockedResourceError - MarkKoz
db79b6a Kaizen: Move OffTopicName to converters.py. - lemonsaurus
98c325f Cache AllowDenyList data at bot startup. - lemonsaurus
d834174 Add ValidAllowDenyListType converter. - lemonsaurus
0d22a04 Kaizen: Make error_handler.py more embeddy. - lemonsaurus
ccc2e7a Better BadArgument exception text. - lemonsaurus
Build 20200910.1 succeeded
GitHub
00:02:48
Bot
Very nice idea with RandomCycle, I like it a lot!
This can be simplified to
TOPICS = {
channel: RandomCycle(topics or ['No topics found for this channel.'])
for channel, topics in all_topics.items()
}
And then you can remove a layer of checking when getting topics in line 60 where we do not have to check if TOPICS[ctx.channel.id] is False or not. like so
try:
# Fetching topics.
channel_topics = TOPICS[ctx.channel.id]
# If the channel isn't Python-relate...
ALL_TOPICS = {'default': STARTERS, **PY_TOPICS}
This should be uppercased to signify that it should be treated as a constant,
2844b11 Update bot/exts/evergreen/conversationstarters.py - Xithrius
Build 20200910.1 failed
GitHub
00:01:01
Seasonal Bot
I like these simplifications. Thanks for the input!
Looks good to me - only a few small things.
Is there any reason for captializing Python here? The text channel names are all lowercase in the guild.
I think this could have a more descriptive docstring, such as:
"""
Cycles through elements from a randomly shuffled iterable, repeating indefinitely.
The iterable is reshuffled after each full cycle.
"""
Postgres backup completed!
Connected!
Build 20200910.2 failed
GitHub
00:01:01
Seasonal Bot
Build 20200910.3 failed
GitHub
00:00:53
Seasonal Bot
f206290 Renamed "esoteric-Python" to "esoteric-python" - Xithrius
I did a replace-all for "python" to "Python", and I had forgotten that #esoteric-python is a channel that exists.
This has been reverted to esoteric-python to keep consistency with the actual channels on the server.
Build 20200910.4 failed
GitHub
00:01:12
Seasonal Bot
Build 20200910.5 succeeded
GitHub
00:01:10
Seasonal Bot
Moved constants to the YAML file in 1b3a5c5 including BOT_MESSAGE_DELETE_DELAY which was an in-module constant before this PR. I'm not sure, but it doesn't look like the top-level definitions in neither constants.py nor the YAML are ordered lexicographically, so I just put mine below PythonNews in both.
Build 20200910.2 succeeded
GitHub
00:04:08
Bot
Here is the new lemoji!

And this is how it looks in a message:

Build 20200910.6 succeeded
GitHub
00:01:00
Seasonal Bot
Looks good to me, let's get the ball rolling.
e2a035c Filtering: ignore webhooks for nickname filter - MarkKoz
1344d3d Utils: show error message for long poll titles - MarkKoz
f553785 HelpChannels: move unpinning to separate function - MarkKoz
9b9a439 HelpChannels: add more detail to unpin log mess... - MarkKoz
6f31a11 HelpChannels: don't unpin message if ID is None - MarkKoz
Build 20200910.3 succeeded
GitHub
00:02:43
Bot
a221895 Verification: add initial on join message - kwzrd
fad7961 Verification: adjust & rename welcome message - kwzrd
0521af6 Verification: send initial message on member join - kwzrd
226af0e Verification: add @Unverified role to config - kwzrd
5006105 Verification: refactor discord imports - kwzrd
Build 20200910.4 succeeded
GitHub
00:04:28
Bot
Connected!
There was basically no guarantee that the dropdown element was loaded when the script ran. This was a leftover from the original script #27. Issue 27 also says you use that script on the PyDis site, so you should probably look into fixing it there too (unless the jQuery parts does some magic that defers the script execution/adding event listeners)
There was something I missed previously, and a few things that need to be fixed in py_topics.yaml.
This isn't the correct ID for #computer-science. I'm guessing you committed the test server channel IDs?
650401909852864553:
I'm surprised I didn't catch this before in a previous PR, but the list comprehension is not needed. You can just do list(PY_TOPICS). If you want to be more explicit, list(PY_TOPICS.keys()) works as well.
ALL_ALLOWED_CHANNELS = list(PY_TOPICS.keys()) + list(WHITELISTED_CHANNELS)
This isn't the correct ID for #python-general.
267624335836053506:
e7f6512 Update bot/exts/evergreen/conversationstarters.py - Xithrius
d2d09af Update bot/resources/evergreen/py_topics.yaml - Xithrius
Build 20200910.7 succeeded
GitHub
00:01:05
Seasonal Bot
Build 20200910.9 succeeded
GitHub
00:00:53
Seasonal Bot
Both previous commits that updated the py_topics.yaml file changed the IDs from the test server channel IDs to the actual Python Discord channel IDs.
Build 20200910.11 succeeded
GitHub
00:00:56
Seasonal Bot
Build 20200910.12 succeeded
GitHub
00:00:59
Seasonal Bot
Sorry, I forgot to also mention that you forgot the #tools-and-devops topical channel.
The force pushes were both meant to show a different commit for the previous commits that only said that a file was updated.
One last thing - this should be in alphabetical order, like this:
from discord import Color, Embed
from discord.ext import commands
import yaml
I'm kind of surprised the linting tests didn't catch this.
pipenv run lint complains when imports are reordered to what you suggested. Pycharm reorders the imports when autoformatting, and a manual run of flake8 on the bot directory also complains.
This sounds like fun. I could take a look at this if you would like.
Postgres backup completed!
Sure thing, I've assigned the issue to you @ncDevMan
@AtieP will you have time to address the requested changes? After they have been addressed I can approve this as well
Demo
Here is a quick demo of what can be done with the new beard structure!

The included pieces
This new set of 20 lemojis can be used to create almost any beard structure imaginable. The following pieces are included:
- Four 90ยฐ separated rotations of the head
- Four 90ยฐ separated rotations of the beard end
- One blank piece for alignment
- Eleven regular beard piece...
File names
We have blank, head_DIRECTION, end_DIRECTION and CONNECTIONS pieces.
CONNECTIONSis the places that the piece connects to pieces. For example, one calledl_t_r_bwould be a piece has connections on all four sides โ a "center piece" โ whilel_rwould be an only horizontal one.DIRECTIONis simply the way that aheadorendis pointing. Ahead_tpiece would be an upright head piece.
Description
A command that would let the user easily convert text to a beard structure, using the beard structure lemojis.
Here's PyDis using the beard structure, in a Discord channel!

Reasoning
Being able to write with lemoji beard, without having to reinvent the characters every time, would be fantastic.
Proposed Implementation
A command like `.beardif...
Us having to disable send message permissions in bot-commands specifically is a rare event, and it isn't the end of the world if this issue happens anyway. Messages with information can be pinned in the channel, and updates on an incident would usually be in #announcements or #changelog anyway.
I'm not sure changing this behavior is really worth it imo.
Build 20200911.1 succeeded
GitHub
00:05:10
Bot
Connected!
49e7243 Allow blank/null input to the nomination reason. - eivl
We are lowering the threshold for nomination. By allowing the users to
make a nomination without a reason might make this feature more
attractive amongst members of staff.
Build 20200911.1 failed
GitHub
00:01:58
Site
Build 20200911.2 succeeded
GitHub
00:02:15
Site
Build 20200911.2 failed
GitHub
00:00:47
Bot
Build 20200911.3 succeeded
GitHub
00:02:33
Bot
Looks good to me as well.
Build 20200912.1 succeeded
GitHub
00:02:31
Seasonal Bot
Connected!
Postgres backup completed!
So yeah, ask the title says !reddit command doesnโt filter nsfw subreddits ._.
doing: !reddit top nsfw displays the direct URL link to the nsfw subreddit.
this should be a simple fix as done here
https://github.com/python-discord/seasonalbot/blob/master/bot/exts/evergreen/reddit.py#L57
it's another Reddit command, but for seasonalbot
This is blocked by the major changes we've got planned for our content management system.
I'm going to add this issue to the Dewikification project, and edit the description with a more precise spec.
There is no reason we should use subdomains in our app.
- Get rid of subdomains. instead of
staff.pythondiscord.com, we will simply usepythondiscord.com/staff/. - Get rid of the subdomain dependencies.
- We will need to update the bot, which specifically uses the subdomains in its configuration. This should just be a matter of changing a few lines in the
default-config.ymlfile. Please make sure this change is made, that both pull requests are open at the same time and that they ge...
We need to set up a linting check suite in GitHub Actions for this project. The check suite run on commits to master and on pull requests, including those opened from forks. The latter makes it difficult to use GitHub Actions from the marketplace that insert annotations/review comments, as you need to have access to the secrets/GitHub token for that. This is disabled for Pull Requests opened from a fork.
My proposal:
- Use a set up similar to python-discord/django-simple-bulma
- Optional...
There is a bug in the _to_typestring conversion method.
When converting values, the first tuple in prefixes is ("f|", float). If a bool is being stored, the conditional on line 113 then triggers and returns f|0 or f|1. On the way out, the int get cast to float as per the typestring and so we get 0.0 or 1.0.
The test_set_get_item test function does not...
42c22a8 Close session in README example - SebastiaanZ
This PR resolves #56. Lemon_pika was updated to remove black outlines in this lemoji update.
Nice. Hopefully they implement this ๐
We should keep this open until it is implemented.
"and don't try to ping 90000 people." deserves to be immortalized. Thus, lemon_ping.
Also lemon_grimace.
Looks fantastic, thanks so much for all these improvements.
A new tileset, consisting of 20 emojis is added โ including source files. The snake uses the PyDis brand colors.
Preview
These are the pieces in the PyDis-Snake tileset:

Changes
- A new directory
emotes/tilesetsconsisting of all tilesets was added. - The new snake tileset was added to
tilesets/pydis_snake. The files are split into two subfolders โsrcand...
I don't think the Optional annotation is needed here, since the default argument is a string.
Build 20200913.1 succeeded
GitHub
00:04:25
Site
I would like to finish this
Add subcommands for different PyDis projects to !source command. For example, SeasonalBot: !source seasonalbot. These subcommands should give short description about project and link to GitHub.
I think these projects should have subcommands:
- site
- seasonalbot
- branding
- snekbox
- public-stats
- django-simple-bulma
I solved this issue by force-shortening (ignoring word breaks) in case when description will be still too long.
Build 20200913.1 failed
GitHub
00:02:33
Bot
Postgres backup completed!
I think this approach is much better, but why are we still running the reason through textwrap.shorten? That shouldn't be necessary anymore, right?
I think this should be still there, because this try first soft-shortening (breaking between words) and when after this string is still too long, this force-break, what may break word.
That is true, but it still suffers from the problem of guessing at what the maximum length should be. I think that for the sake of simplicity and transparency, just the final cut-off would be fine (also easier to make assertions about in the tests). I don't personally see much appeal in keeping whole words if a sentence gets cut off anyway.
Build 20200913.1 succeeded
GitHub
00:00:59
Seasonal Bot
@ikuyarihS Done, I addressed the requested changes.
steps to reproduce:
- post a link
- bot fetches the site doc title and description, and deletes the original link
- most users don't see the bot's message but some do regardless of being mods or having privileges
for some reason it's timestamped jan 1 1970
- Fixes issue where some yellow from the lemon shape was shown on the edges of the beard
- Makes lemon shape fully symmetrical (excluding the hair)
Here's a preview of the new template:

symmetrical lemon, yes. I need this in my life.
e635914 Update lemoji template - gustavwilliam
d4f6672 Merge branch 'master' of https://github.com/pyt... - gustavwilliam
d52cb6c Merge pull request #67 from gustavwilliam/symme... - lemonsaurus
Postgres backup completed!
Sorry for being late,
I feel tutorials could be a great choice for notification. Channel examples:
- Corey MS
Python programming tutorials. - Traversy Media
Mostly related to JS, but also covers other languages too (this channel has kinda become a replica of freecodecamp now). - coding For Entrepreneurs
This one is my favorite. Great Django and python tutorials. Recently uploading 30 days of python series. - JetBrains TV
IDE related and python tutorials occasionally.
The above-m...
Spam is not appreciated, don't waste our time.
Description
I was using the .quiz command with the Seasonal Bot, and the question was When did World War I start? I put a bunch of years between 1910 and 1920 one after another and I had typed the correct answer 1914 but the Bot wasn't able to detect that even though it said the correct answer was 1914.
Steps to Reproduce
You can look at the quiz thread
I basically jus...
@RohanJnr I've assigned the issue to you
Build 20200915.1 succeeded
GitHub
00:01:00
Seasonal Bot
Postgres backup completed!
closes #1153
Changes made to Reddit Cog:
-
Check if the subreddit is NSFW or similar by using the
over_18boolean value got with the API response. -
if True, then send an error message.
-
if False, the fetched data is sent to the user.
-
A small change to the return format of the
fetch_posts()method, instead of returning an emptylistin case of an error, it now returns a list, with adictcontaining the error message. This is done in order to distinguish between the ...
Build 20200915.1 succeeded
GitHub
00:02:58
Bot
We should add a note on the "Using Local Images in Embeds" section, stating that the filename parameter of discord.File should be the same as the end of the embed url (after attachment://)
Suggested by 609540346304659477 (RaVen) in #discord.py

Iโd just like to mention that I put together a little document some time ago of another PyDis timeline, maybe that could help you to complete this one.
Postgres backup completed!
Build 20200916.1 failed
GitHub
00:01:07
Seasonal Bot
Build 20200916.2 succeeded
GitHub
00:01:01
Seasonal Bot
TL;DR: I've begun implementing this myself.
I have a few updates to the implementation of it:
- Resulting text will be returned as a png
- Emojis will be on a separate server
- Multiple different fonts can be used (one exists as of now). The font height between fronts and letter width within fonts is variable
I'll write more about the custom emoji font format soon, if anyone is interested in contributing with more fonts!
"Closes #414"
- Added two subcommand
- zodiac
- date
searching with zodiac
searching with month and date
error
- [x] Join the [**Python Discord ...
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
it pulling data of wiki command also
Build 20200916.3 succeeded
GitHub
00:01:03
Seasonal Bot
We currently have dice emoji in our community, which are used quite actively both by our users and in a seasonalbot feature .roll. They look like this:
https://cdn.discordapp.com/emojis/431249694467948544.png?v=1
It's been suggested that we could rebrand these to have pydis colors, and I think this is a good idea. This issue asks you to create these rebranded pydis dice.
Build 20200916.4 succeeded
GitHub
00:01:09
Seasonal Bot
Build 20200916.6 succeeded
GitHub
00:01:00
Seasonal Bot
A while ago, a member pointed out that the layout of the dice is incorrect. For a standard die, opposite sides should add up to 7. In the picture above, however, 3 and 4 are next to each other rather than on opposite sides. This problem also exists in the other dice. This issue would be a good opportunity to correct the layout of the dice as well.
Build 20200916.7 failed
GitHub
00:01:02
Seasonal Bot
I've edited this issue now since !mention is no longer relevant to us - I still think we want this slimming down of the role embed, it looks great.
@lemonsaurus could you assign me this, here on GitHub as well?
@MagicTurtle2203 At least the first design iteration will be flat, eliminating this issue. If this doesn't quite work (which I doubt), we'll make sure to get that right.
Good to know. I'll put it on the todo immediately after the site admin pages which I'm working on atm. Thanks lemon.
"Closes #414 "
Added partnerzodiac subcommands -zodiac and date
- [x] Join the Python Discord Community?
- [x] If dependencies h...
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Sorry but i dont know y but its fetching my old commits also
Build 20200916.8 failed
GitHub
00:00:58
Seasonal Bot
last two commits are the commits which are used for partnerzodiac subcommand
Build 20200916.9 failed
GitHub
00:01:00
Seasonal Bot
Build 20200916.10 succeeded
GitHub
00:01:06
Seasonal Bot
Sounds good, @scragly. Looks like maybe you already have this solved and it just needs to be a pull request, so I think you're exactly the right person to handle it.
Names of emotes used in #reddit have been changed to have reddit_ prefixed in their name, config must be updated so bot still can use those emotes without problems.
Build 20200916.1 succeeded
GitHub
00:03:04
Bot
Thank you for the feedback, but this is very likely an issue on Discord's end. I'm closing this until it's verifiable that it's a bug with our bot.
Build 20200916.3 succeeded
GitHub
00:04:38
Bot
Connected!
This PR adds new PyDis branded dice emojis. Here's a preview, as seen from Discord clients using both dark and light mode:
This resolves #68.
d8e4bf3 Fix deadlocks in methods that call other methods - SebastiaanZ
74ff2e7 Remove local package build and publication tools - SebastiaanZ
57ad2a1 Ignore function name linting error for tests - SebastiaanZ
cbe8e95 Add unittests for our Redis types - SebastiaanZ
07e4ee9 Add GitHub Actions for linting and unit tests - SebastiaanZ
3f5fe9f Use system version of python instead of pipenv - SebastiaanZ
f8272b4 update the reddit emojis to actual emojis' - Senjan21
Build 20200916.5 succeeded
GitHub
00:02:48
Bot
Build 20200916.6 succeeded
GitHub
00:04:13
Bot
Connected!
@MarkKoz Not anymore, no.
Since I'm not part of the organization, I'll need to be removed from this. Thanks :+1:
fc8dde0 Add new dice emojis - gustavwilliam
353d7ec Merge branch 'master' of https://github.com/pyt... - gustavwilliam
95eb0c5 Merge pull request #69 from gustavwilliam/master - AnonGuy
97ed015 Add PyDis-Snake tileset pngs - gustavwilliam
6e2580b Add PyDis-Snake tileset svgs - gustavwilliam
400ad3f Move lemoji-beard tileset files - gustavwilliam
7af27f1 Change name of lemoji-beard files to match conv... - gustavwilliam
e901a1e Merge branch 'master' of https://github.com/pyt... - gustavwilliam
Description
After an update to the server's dice emojis' names (together with updated designs), the output of .dice will be the string of the old emoji names, instead of the new ones. This causes it to be displayed as text.
Steps to Reproduce
Send .roll in any channel that accepts the command.
Expected Behaviour
Assuming that the output is 3, the returned string should be:
:dice_3:
This would be converted to the correct emoji by Discord.
Actual Behaviour
The output of...
Relevant Issues
Closes #440.
Description
- Emojis in
constants.pywere replaced with the new emojis, following the dice redesign .rollcommand was updated to use the new emoji names inconstants.py
Did you:
- [x] Join the Python Discord Community?
- [x] If dependencies have been added or updated, run
pipenv lock? - [x] Lint your code (
pipenv run lint)? - [x] Set the PR to allow edits from contributors?
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200916.11 succeeded
GitHub
00:01:02
Seasonal Bot
Nice, only one small request.
Maybe also rename the variable to dice or die?
Sure; we could do that. The emojis on the server are called dice_X, though.
If we rename this, I think we should rename the server icons as well.
Build 20200916.12 succeeded
GitHub
00:01:01
Seasonal Bot
Looks good to me, thanks!
Build 20200916.13 succeeded
GitHub
00:02:20
Seasonal Bot
Connected!
Yes. I don't strongly feel that testing it is necessary. If someone forgets to add the attribute, it's not a big problem. It's not hard to notice or fix.
Since the merging of #1124, only 3 alias commands remain, listed below. All usage statistics are since stats have been tracked, which is around April of 2020.
!get docs- alias for!docs get- Usage: 4 times
- Usage of
!docs get: 793 times - Usage of
!docs: 9240 times (includes all the above and empty arg invocations)
!get tags- alias for!tags get- Usage: 0 times
- Usage of
!tags get: 4 times - Usage of
!tags: 720 times (includes all ...
Build 20200917.1 succeeded
GitHub
00:01:06
Seasonal Bot
Build 20200917.2 succeeded
GitHub
00:02:27
Seasonal Bot
Connected!
Build 20200917.3 succeeded
GitHub
00:01:00
Seasonal Bot
Postgres backup completed!
I might be harsh, but it's my honest review at least.
-Chibli
# Ignore pages with "may refer to"
Sounds better stay neutral, in addition the comment should probably state why we ignore them. Personally I have no idea just reading the comment. Is there no information on those pages?
if not search_results:
Pythonic, and might catch a None / False instead of an empty list
Does it return a list of what i searched for? Or a list of results containing my search quest?
Build 20200917.5 succeeded
GitHub
00:00:58
Seasonal Bot
Build 20200917.6 succeeded
GitHub
00:00:59
Seasonal Bot
Build 20200917.7 succeeded
GitHub
00:01:01
Seasonal Bot
Build 20200917.8 succeeded
GitHub
00:00:59
Seasonal Bot
Build 20200917.10 succeeded
GitHub
00:01:05
Seasonal Bot
Build 20200917.9 succeeded
GitHub
00:01:03
Seasonal Bot
i am doing str concating because list concating is taking 160 character s_desc = "\n".join([f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})for (index, title) in enumerate(titles, start=1)])` and flake8 is failing that as we are allowed 120 char only
others are mostly string or int thats y i have not typed them
Build 20200917.11 succeeded
GitHub
00:01:01
Seasonal Bot
c501cdf fix reddit command to use new emojis. - Senjan21
Description
Changed the ID's to use ID's of new emojis.
Reasoning
Old emojis were removed from the server and moved to emojis server.
Did you:
- [x] Join the Python Discord Community?
- [x] If dependencies have been added or updated, run
pipenv lock? - [x] Lint your code (
pipenv run lint)? - [x] Set the PR to allow edits from contributors?
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200917.12 succeeded
GitHub
00:01:04
Seasonal Bot
Build 20200917.13 succeeded
GitHub
00:02:19
Seasonal Bot
Connected!
Description
There is currently no way to quickly silence users in voice chat with a command. This currently makes it somewhat difficult to moderate when there are a lot of users in chat talking over each other and the mods. Users also don't always pay attention to the #voice-chat text channel if mods try to de-escalate a situation via the text channel.
This suggestion would be to implement a !shh-equivalent command that would be run in the voice chat text channels that would apply mut...
I think regex will be good to use in this case
Let's do this. Always good to trim unused features.
!exception isn't a suitable alias for traceback anyway, and we have tags for both.
If you, say, edit a
noteinfraction, you won't be able to save your changes unless you set an expiry date.
The issue for non-expiring infractions being unable to save changes has been addressed coincidentally, but out of concern that the bot infraction tasks will desync if editing expiry is allowed external to the bot.
I've double checked, and turning the expiry read-only results in successful reason edits.
I'm in the middle of thoroughly testing this branch as I populate my local database, and I've run into an odd bug.
Through the power of laziness, neglect and sheer forgetfulness, much time has passed, and just as the water stream eventually erodes the rock, we have lost the presence of tags in the database, with them being stored back in repos. Hence, time is the true solution to all that is bad with the world.
ec2ae9d Add validation rules to Infraction serializer - SebastiaanZ
cf1a075 Migrate undesirable active infraction to inactive - SebastiaanZ
0d383cb Prevent double active infractions with constraint - SebastiaanZ
6670a3b Merge branch 'master' into active-infractions-v... - SebastiaanZ
e415428 Solve migration conflict by renaming migrations - SebastiaanZ
Postgres backup completed!
I've gone through and tweaked edit permissions for certain models, and atm it's showing the following in the admin site:

Figured I'd give a bit of an update. I'll try get a proper update coming tomorrow, but unfortunately I'm absolutely wrecked and need sleep.
The file has since been removed from the bot to move it to SeasonalBot in PR #1134
Closing as its no longer relevant to the state of the bot.
Build 20200918.1 succeeded
GitHub
00:00:56
Seasonal Bot
Build 20200918.1 failed
Scragly
00:01:49
Site
s_desc = "\n".join([
f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})'
for index, title
in enumerate(titles, start=1)
])
It would look cleaner if you combined the 2 for loops that both iterate titles, since you could remove the replace then and just use title_for_creating_link, but I digress.
Build 20200918.3 succeeded
GitHub
00:00:52
Seasonal Bot
Build 20200918.4 succeeded
GitHub
00:03:24
Seasonal Bot
Connected!
I still feel like these 2 could be combined
for title in titles:
title_for_creating_link = title.replace(" ", "_") # wikipedia uses "_" as spaces
titles_no_underscore.append(title_for_creating_link)
log.info("Finished appending titles to titles_no_underscore list")
async with ctx.typing():
for index, title in enumerate(titles, start=1):
s_desc += f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})\n'
embed = Embed(colour=Color...
8edeb88 Remove noqa from DeletedMessagesLogURLTests setup. - scragly
Build 20200918.2 failed
GitHub
00:02:10
Site
dc63f50 Stop users from viewing messages they shouldn't. - kosayoda
Using a user token, a user could fetch the message ID of a message in any channel, which may leak information when potential Message objects are automatically converted and parsed.
Now, the bot will only retrive text from a valid Message object if the user has read permissions for the message the channel is in.

Build 20200918.5 succeeded
GitHub
00:01:16
Seasonal Bot
Looks LGTM to me, tested with an alt in the dev server.
Build 20200918.6 succeeded
GitHub
00:03:03
Seasonal Bot
Connected!
Build 20200918.3 failed
GitHub
00:02:35
Site
Internal discussions deemed these tests to be unnecessary.โ
This feature is now a thing within the discord client thus the issue isn't needed anymore.

Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Internal discussions deemed these tests to be unnecessary.โ
Considering Python2 is EOL since January of this year, we don't really need this feature.
I'll go ahead and push this into #1014 in the near future if there's nobody against it.
Should the sphinx license be handled like in #886 with the same file?
There should be no need to add type hinting for message in this case as it's local to the try-except block and doesn't actually do anything at runtime.
.join should be able to accept a generator expression just fine as well. I also suggest refactoring the formatting into a staticmethod if it means making the expression much more readable.
s_desc = "\n".join(
self._format_wikipedia_url(index, title)
for index, title in enumerate(titles, start=1)
)
I would like to work on this too as I have been working on the related site issue too
https://github.com/python-discord/site/pull/378
Postgres backup completed!
Build 20200919.1 succeeded
GitHub
00:03:08
Bot
f2092a7 Update release workflow - SebastiaanZ
f76bc36 Update release workflow - SebastiaanZ
Looks very solid, just 1 small change
eval_msg should end with a space if the is_eval is set to True
Otherwise we will end with
... via DM using !evalwith ... as an example.
Thank you for the pull request, and sorry for the delay in review. I've done a quick first round of review, which involves some high level changes. Feel free to ask for clarification.
PS: Can you also add a spacer to the first line of the board whenever it is printed? Using the compact display setting, the game looks like this:

A docstring here describing the check would be nice.
This is identical to #L198-L214 and should be factored out to a helper function.
Can you please document the return type here? What do the boolean value and the optional string represent?
394d1ca Test username property formatting for user model. - scragly
Build 20200919.1 succeeded
GitHub
00:02:07
Site
a9131e2 Exclude tests package from PyPI release - SebastiaanZ
d10032f Remove dev as optional feature of our release - SebastiaanZ
e369856 Change package url to python-discord GH org - SebastiaanZ
a0f09b0 Specify supported Python versions in setup.py - SebastiaanZ
54ab562 Bump version to 0.1.2 - SebastiaanZ
Build 20200919.3 succeeded
GitHub
00:02:13
Site
I've set up a simple linting CI using GitHub actions. It's currently not using one of the actions from the marketplace; it's just using plain flake8.
Does it have inline code annotations
Not yet, but I'm planning on changing that later.
To be able to use such actions, we'll need to change the trigger event to pull_request_target, which will slightly change the way in which the workflow works. I think it only means that it will use the already committed workflow file, so it's safer to expose the secrets needed for such annotations actions, but it's still a bit vague.
Another thing that the current annotations actions don't have is the option to also just print the flak...
This PR edits token_remover to add the following features:
- Decode and report a discord user ID from a detected token
- Check the user ID against the server, and if found, report within the alerting channel and additionally ping everyone
- Check the HMAC portion of the token against low-entropy: if it has less than four case-insensitive characters, it's probably a dummy value (like Xxxxxxxxxx), and thus it's not a "valid" token and won't be actioned )
I've left the HMAC portion in a se...
Thank you for contributing to Python Discord!
Please check out the following documents:
- Join the Discord server! - If you have not already, join the Discord server and introduce yourself in our #dev-contrib channel.
- Python Discord Contributor Wiki - A set of resources about setting up our services
- Python Discord Code of Conduct - Code of conduct for our commu...
Build 20200919.2 failed
GitHub
00:02:29
Bot
We've recently published a PyPI package, async-rediscache, that contains all of the functionality of the RedisCache class that we use in our bot and more. This means that it's now time to remove the RedisCache implementation from this repository and use the async-rediscache package instead.
While it's mostly a drop-in replacement, there are a few differences as well in that the package offers a new data type, RedisQueue, which is go...
eval_msg = "using !eval " if is_eval else ""
1480232 Filtering: add missing space to log msg - MarkKoz
715dd46 Allow Nomination end_reason to have a blank val... - scragly
Build 20200919.4 succeeded
GitHub
00:02:10
Site
Build 20200919.3 succeeded
GitHub
00:03:03
Bot
aca700c Use global namespace bot for our RedisSession - SebastiaanZ
As we've recently isolated the RedisCache code and moved it into its own PyPI package, it's now time to start using that package here in the bot. The main reason for this change is that we can now use RedisCache instances in all of our bots by simply installing a package instead of duplicating the code.
The package and the new RedisCache is pretty much a drop-in replacement, although the internals have changed a bit:
- There's now a application-level global namespace to prevent name...
Build 20200919.4 succeeded
GitHub
00:03:26
Bot
Build 20200919.5 succeeded
GitHub
00:02:02
Site
Im not seeing it. Maybe I do not understand the Optional annotation. reason: Optional[str] ? like I thought it was to annotate that it could be "falsy" a string.
Build 20200919.6 succeeded
GitHub
00:02:04
Site
Nah, Optional is explicitly Union[str, None], so the alternative must be a NoneType.
3fc5aa7 Remove delete permission for bot settings admin. - scragly
Build 20200919.7 failed
GitHub
00:01:31
Site
Sounds good, go for it.
I agree, greedy parsing would be best here, as commas can be problematic especially on mobile.
Build 20200919.8 succeeded
GitHub
00:02:07
Site
Everything looks clean to me.
a13f573 Updated issue/pr command to get multiple links. - Xithrius
7a29cce Replaced single quotes with double, set the rep... - Xithrius
733a634 Described how links are shown in the embed. - Xithrius
Relevant Issues
Closes #398
Description
By looping through the set of number(s) given by the user, this bot will acquire as many links as it can. All links acquired are appended to a list, which is eventually formatted and put into an embed. If any of the issue/PR numbers are incorrect, the bot will stop at the first one giving the error and let the user know what the response from GitHub was.
Reasoning
The loop will be broken out of at the first error, since it's po...
Build 20200919.1 succeeded
GitHub
00:01:04
Seasonal Bot
Build 20200919.2 succeeded
GitHub
00:02:26
Seasonal Bot
Connected!
An exceptinoally good PR. Beautifully described, well documented code, concise, and useful.
Connected!
Prevented emojify command from working correctly by having an image file name that didn't follow the convention.
- For both the snake and beard, the distobution directory is now called
dist - Done in order to imporve consistency and allow SeasonalBot to fetch data automatically
6ab05d3 Set default example.com dev site to pythondisco... - scragly
e2956b8 Set newest-first sorting for message deletion m... - scragly
f590d2b Add message log links, improved formatting to m... - scragly
618610f Order roles by positioning, add filters and sea... - scragly
0021d4a Improve infractions admin list and page, add se... - scragly
Build 20200920.1 succeeded
Joseph Banks
00:04:18
Site
Description
This PR changes a few things for the .issue command:
- Allows use in #dev-branding
- Limits the maximum PRs/issues to 10 per command invocation
- Invokes the help command when no PRs/issues are given
- Makes requests to the GitHub API with authentication
Just some small improvements for this command!
Build 20200920.1 succeeded
GitHub
00:01:01
Seasonal Bot
Postgres backup completed!
in constants.py i have stored total chances and its incrementing at every input from user.
User has total of 3 chance if he/she gives 3 wrong input looks breaks, so i dont think is there any chance of infinite loop
or i am missing anything can u tell me how infinite loop can happen.
Loop breaks if these two thing happens also:
- If user gives right input
- If times up
Build 20200920.2 succeeded
GitHub
00:01:05
Seasonal Bot
In my opinion for _ in range(total_chances) or more precisely for _ in range(Wikipedia.total_retries) is a better idiom for this purpose. It's not that probable that somehow, somewhere, something is going to error out and cause an infinite loop but then again, using common idioms helps better with readability.
Looks good! Just a few more changes and it should be fairly ready.
In addendum to using for _ in range(Wikipedia.total_retries), this can probably be refactored to the following:
for retry_count in range(1, Wikipedia.total_retries + 1):
if retry_count < Wikipedia.total_retries:
retries_left = Wikipedia.total_retries - retry_count
error_msg = f"You have `{retries_left}/{Wikipedia.total_retries}` chances left"
else:
error_msg = 'Please try again by using `.wiki` command'
Refactor as you see fit.
Build 20200920.3 succeeded
GitHub
00:01:01
Seasonal Bot
Build 20200920.4 succeeded
GitHub
00:01:02
Seasonal Bot
We should add pycon here I think, python console is what it is for.
<img width="191" alt="Screenshot 2020-09-20 at 14 22 56" src="https://user-images.githubusercontent.com/20439493/93712281-cc2fea80-fb4c-11ea-8312-6b66d993e25e.png">
PY_LANG_CODES = ("python", "pycon", "py") # Order is important; "py" is second cause it's a subset.
409f0b5 Determine eligible duckpond emojis dynamically - SebastiaanZ
3fea325 Ignore non-staff messages for our duckpond - SebastiaanZ
9410194 Add channel blacklist for duckpond - SebastiaanZ
d68d6d2 Fix relay race condition in duckpond using a lock - SebastiaanZ
0c5c472 Remove unit tests for duck pond - SebastiaanZ
588213c Lower duckpond threshold to increase activity - SebastiaanZ
This PR brings several improvements to our duckpond, including those suggested in #673. It also does away with the over-complicated tests we'd written for the duckpond that only really served to slow down development. I suggest reviewing the PR commit by commit, as I tried to document the changes in each commit message. I've also summarized the changed below.
Changes
- The duckpond should now longer suffer from a relay race condition. Say goodbye to duplicate messages in our pond!
- ...
Build 20200920.1 succeeded
GitHub
00:03:00
Bot
Build 20200920.2 failed
GitHub
00:00:50
Bot
Code looks solid, very nice.
Build 20200920.3 failed
GitHub
00:02:53
Bot
Build 20200920.4 failed
GitHub
00:02:46
Bot
Build 20200920.5 succeeded
GitHub
00:02:47
Bot
Build 20200920.5 succeeded
GitHub
00:02:46
Seasonal Bot
Connected!
Thanks, looks excellent. I will test tomorrow before I merge but I think this is now ready.
Description
A new .wikiguess game, where you get points for guessing the correct article name.
This would be a typical game:
- Send
.wikigameor.wikigame startto start a new game. - Get an embed with instructions about the game (click green reaction tick box to start game)
- X (5?) rounds are done
- The user receives a score
This is how a normal round would look:
- Get the first few sentences from a not too uncommon Wikipedia article
- Get X (10?) seconds to answer what the arti...
Build 20200920.6 succeeded
GitHub
00:03:04
Bot
Description
Just like we can run !c r COG_NAME (!cog reload COG_NAME) to reload a cog with the Python bot, we should be able to do something similar with SeasonalBot.
While the entire suite of cog management commands would be nice to have, the reload one would be the most beneficial during development.
Reasoning
While developing the .emojify command, I've restarted the bot around 100 times already. Being able to simply reload the relevant cog would make life a lot easier.
...
Pushed in the new cached parser; it should overall have a smaller footprint and is only missing a way of clearing the cached results in case a lot of them pile up, can think of 4 different ways of doing this
-
Do thing: a lot of different pages would need to be fetched for this to become an issue with simple strings, but it is a possibility
-
Clear some amount of arbitrary items when over a certain limit
-
Keep track of how many times individual doc items were accessed and only clear f...
Sounds good! Feel free to start working on this if you haven't already. One more thing, maybe you could use the reload [implementation](https://www.github.com/python-discord/bot/tree/master/bot/cogs/extensions.py] in bot as a reference.
I would recommend just copying over the extensions manager from bot. The implementation there is already quite good, and no need to spend time creating a new solution when we already have one.
Maybe you could add a message on log.info? Something like log.info(f"Caught exception {e}, breaking out of retry loop")
in the near future if there's nobody against it.
Fine by me. As I said, I'm not against it. Haven't had input from anyone else unfortunately.
Should the sphinx license be handled like in #886 with the same file?
Yes, in my opinion. I haven't heard any negative feedback about this so far.
Returning an Optional[List[str]] in search_wikipedia seems redundant as you're able to return a list and check for its truthiness. Might be better to have this instead as iterating over an empty list does nothing:
async def search_wikipedia(self, search_term: str) -> Optional[List[str]]:
"""Search wikipedia and return the first page found."""
async with self.http_session.get(SEARCH_API.format(search_term=search_term)) as response:
data = ...
Yep! That's what I'm thinking as well.
Could you assign me to the issue? I'll have a look at it soon, when I get time.
"Do thing"
You mean do nothing? That doesn't seem viable. If the cache is never cleared, then it will get stale and outdated. Do you have any other provisions currently to prevent that? Is there a way to know when docs update without having to actually scrape the page? If yes, then I think periodically checking (like once per week?) and clearing caches for updates docs sounds good.
Keep track of how many times individual doc items were accessed and only clear from the ones that hav...
Using a decorator feels confusing (because it's less direct and relies on return values, which is kind of implicit). Furthermore, I think it's redundant. Is it really a worthwhile design to save a single function call?
I don't think that what's on master will work with the current seasonalbot extension layout because it contains nested extensions. I've rewritten it to support that in https://github.com/python-discord/bot/pull/1103. That being said, since this is going to be used across 3 bots now, we should start considering moving such features to a common repo, like we did for async-rediscache.
I'm for the staticmethod change, but the naming doesn't quite add up. You're typing titles as a string, but titles implies its a list of titles. formatted_wiki_urls & List[str] - also implies it returns a list, but you're just returning a string.
I'd rewrite this function to only handle creating one line, and using loops/comprehensions with it.
@staticmethod
def formatted_wiki_url(index: int, titles: str) -> str:
"""Making formatted wikipedia link.."""
...
Don't think you need this list at all, just do the replace in place on line 90 where you do
await ctx.send(WIKIPEDIA_URL.format(title=titles_no_underscore[response - 1]))
see suggestion
titles_len = len(titles) # getting length of list
Remove the title_no_underscore list, and just use the length of titles.. since that's what its based on anyways
Build 20200921.2 failed
GitHub
00:00:59
Seasonal Bot
Build 20200921.1 failed
GitHub
00:00:59
Seasonal Bot
s_desc = "\n".join(self.formatted_wiki_url(index, title) for index, title in enumerate(titles, start=1))
and don't forget to rename this.
"Do thing"
You mean do nothing? That doesn't seem viable. If the cache is never cleared, then it will get stale and outdated. Do you have any other provisions currently to prevent that? Is there a way to know when docs update without having to actually scrape the page? If yes, then I think periodically checking (like once per week?) and clearing caches for updates docs sounds good.
Yeah that was meant to be nothing. I'm not aware of a way to keep everything up to date automatically...
Postgres backup completed!
Optional is not being used anymore and flake8 errors out when pre-commit hooks are run.
@MarkKoz I agree. Maybe it's best to move the common things like pagination as well, so we have it all in the same place.
For now, I think copying over the command (possibly from your PR) and maybe altering it slightly to work with SeasonalBot would be the best method.
We could work on combining it to a single repo later. Maybe open an issue about it in the meta already?
Build 20200921.7 failed
GitHub
00:01:01
Seasonal Bot
Build 20200921.8 failed
GitHub
00:01:01
Seasonal Bot
Build 20200921.11 failed
GitHub
00:00:59
Seasonal Bot
Build 20200921.12 failed
GitHub
00:01:06
Seasonal Bot
Build 20200921.13 succeeded
GitHub
00:01:06
Seasonal Bot
async def search_wikipedia(self, search_term: str) -> List[str]:
"""Search wikipedia and return the first 10 pages found."""
async with self.http_session.get(SEARCH_API.format(search_term=search_term)) as response:
data = await response.json()
pages = []
search_results = data["query"]["search"]
# Ignore pages with "may refer to"
for search_result in search_results:
log.info("trying to appe...
def formatted_wiki_url(index: int, title: str) -> str:
"""Making formatted wikipedia link.."""
return f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})'
Titles is still plural
"""Making formatted wikipedia link."""
Nit-picking
Build 20200921.1 succeeded
GitHub
00:03:25
Bot
All aboard the merge train choo choo~
Build 20200921.2 succeeded
GitHub
00:05:45
Bot
Connected!
I don't mind it that much. I think it's easy enough to look this up to retain the documentation power of our function annotations.
Long overdue review, but the code looks solid. It does add some more complicated features to our bot, but I think the "this should only ever happen once so if something else tries it, it should just stop" behavior is something that come in handy with different features as well.
I tested the functionality, it all seems to work, although that obviously doesn't tell us everything, which a fairly complicated feature like this. I think the utilities introduced are a candidate to receive unit te...
Build 20200921.17 failed
GitHub
00:00:50
Seasonal Bot
Build 20200921.16 failed
GitHub
00:00:53
Seasonal Bot
Build 20200921.18 succeeded
GitHub
00:00:59
Seasonal Bot
Build 20200921.19 succeeded
GitHub
00:01:05
Seasonal Bot
Build 20200921.20 succeeded
GitHub
00:00:57
Seasonal Bot
Connected!
27d29c0 Prevent uwu output from pinging globally allowe... - scragly
Description
This PR introduces sanitisation of the uwu text before uwufication in order to prevent moderator roles being pinged unnecessarily.
I've just changed the str typehint to the clean_content converter to do this as simply as possible.
Reasoning
While we do have a global limit to allowed roles being pinged in the bot, all mod+ roles were still capable of being pinged through this method.
Screenshots
Before (role resolves)

This bypasses the clean_content converter (which is only applied to the ID/jumplink, not the message text that is fetched from it later).
Good point, thanks. I'll get that fixed up.
was this changed back to titles? It's a function that takes 1 title at the time, hence why I meant it shouldn't have a plural name for title. (titles).
@staticmethod
def formatted_wiki_url(index: int, title: str) -> str:
"""Formating wikipedia link with index and title."""
return f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})'
1c0afb8 Use clean_content when fetching linked msgs for... - scragly
Build 20200921.23 succeeded
GitHub
00:00:59
Seasonal Bot
OK, I should have resolved this now, along with also applying the cleaning to the mixed case command so mentions don't scramble the raw mention format, instead always using the resolved names.
Build 20200921.25 succeeded
GitHub
00:00:57
Seasonal Bot
Build 20200921.24 succeeded
GitHub
00:01:04
Seasonal Bot
Sorry I understood opposite, I have now committed the changes which u propose๐
Make sure you test it locally after all these changes.
Make sure you test it locally after all these changes.
Sure๐
Build 20200921.26 succeeded
GitHub
00:02:37
Seasonal Bot
Connected!
Closes #1119
Implementation
- [x] Refactor Code to support paginated response.
- [ ] Bulk Update Users whose properties have changed.
Build 20200921.27 succeeded
GitHub
00:00:59
Seasonal Bot
Build 20200921.3 failed
GitHub
00:02:53
Bot
This PR will be ready for review when the related site PR has been merged.
https://github.com/python-discord/site/pull/378
The !server command is now more compact, and has more information.
In a regular channel

In a moderation channel

For contrast, the old embed:

: Added imports, modifi... - ks129
fa6a0ae (Moderation Utils Tests): Created tests for ha... - ks129 [98f7a37](https://github.com/python-discord/bot/commit/98f7a3777152b32bfda24f9d5add938479827c85) (Moderation Utils Tests): Created tests for no... - ks129
4a746fc (Moderation Utils Tests): Created tests for `no... - ks129

