#dev-log

1 messages ยท Page 84 of 1

regal archBOT
#
[python-discord/bot] New branch created: fetch\-guild\-members\-on\-boot
odd spireBOT
regal archBOT
#

We're in the Discord Beta for Role Icons! Let's make some role icons~

Constraints/Guidelines:

  • Must be a png/jpg or emoji from the server
  • Cannot be animated
  • Be under 256kb
  • Should be at least 64x64 pixels

Roles we'll be looking at:

  • Patrons & Discord Boosters
  • Moderators
  • Helpers
  • Media Team
  • Help Cooldown
  • Project Leads?
  • Contributors?

I'd love some help with feedback and brainstorming~

#

Because of how long this event takes to run, it could have problems with where that event is waited for. In addition, that event is called every time this guild comes up after an outage. This could be problematic because it would be calling await guild.chunk() multiple times while the other ones are still running. I think this pr could be a major source of problems and should be investigated further

odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
#
[python-discord/bot] branch deleted: fetch\-guild\-members\-on\-boot
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#

We currently have two tags, which both refer to virtual environments. These are !environments and !venv.

However, these two tags serve difference purposes (what a venv is and how to use one, respectively), so deleting one isn't really an option and they're too long to merge into a single tag.

The proposed solution for this (suggested by @Akarys42 which I agree with), is to wait for tag groups (#1663) is merged and then put these within a virtual environments tag.

#
[python-discord/bot] New branch created: tags\-revision
odd spireBOT
oak estuaryBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: add\-get\-or\-fetch\-util
odd spireBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-6E

TypeError: can't compare offset-naive and offset-aware datetimes
  File "dateutil/relativedelta.py", line 154, in __init__
    if dt1 < dt2:
  File "bot/utils/time.py", line 80, in time_since
    delta = abs(relativedelta(now, past_datetime))
  File "bot/exts/utilities/emoji.py", line 110, in info_command
    **Created:** {time_since(emoji.created_at, precision="...
#

Sentry Issue: SIR-LANCEBOT-6E

TypeError: can't compare offset-naive and offset-aware datetimes
  File "discord/ext/commands/core.py", line 167, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/utilities/emoji.py", line 110, in info_command
    **Created:** {time_since(emoji.created_at, precision="hours")}
  File "bot/utils/time.py", line 80, in time_since
    delta = abs(rela...
#
[python-discord/sir-lancebot] New branch created: bug/875/emoji\-offet\-naive
odd spireBOT
regal archBOT
#

So! I haven't done my formal review yet but here's my feedback so far. Overall, thank you for doing work on this command! My comments will be mostly about how the output looks and to have it be consistent with existing styling.

Currently, the output looks like:
image

I'd prefer it if it matched the overall leaderboard look:
![image](https://user-images.githubusercontent.com/206411...

regal archBOT
#

So! I haven't done my formal review yet but here's my feedback so far. Overall, thank you for doing work on this command! My comments will be mostly about how the output looks and to have it be consistent with existing styling.

Currently, the output looks like:
image

I'd prefer it if it matched the overall leaderboard look:
![image](https://user-images.githubusercont...

regal archBOT
#
[python-discord/bot] New branch created: remove\-coveralls
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

I am currently getting an error when trying to run this. It seems to be here:

 first_kata_div = await to_thread(soup.find_all("div", class_="item-title px-0"))

to_thread takes a function as the argument for what to run, this is instead running soup.find_all and passing the result to to_thread, which causes an error. Looking at the docs, https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread,
it seems something like

first_kata_div = await ...
#

I am currently getting an error when trying to run this. It seems to be here:

 first_kata_div = await to_thread(soup.find_all("div", class_="item-title px-0"))

to_thread takes a function as the argument for what to run, this is instead running soup.find_all and passing the result to to_thread, which causes an error. Looking at the docs, https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread,
it seems something like

...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

@D0rs4n So my concern there is that if you want to view drastically different days (like day 2 and day 23) that's going to be a lot of clicking. I also wonder if a dropdown to select from the current available days wouldn't be better than clicking continually.

I'm also curious if this would only react to the person who invoked it or multiple people, but that's a minor implementation detail.

I think people would also like to view both days side by side, as it would be neat to see the dif...

#

@D0rs4n So my concern there is that if you want to view drastically different days (like day 2 and day 23) that's going to be a lot of clicking. I also wonder if a dropdown to select from the current available days wouldn't be better than clicking continually.

I'm also curious if this would only react to the person who invoked it or multiple people, but that's a minor implementation detail.

I think people would also like to view both days side by side, as it would be neat to s...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: new\-guides
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

I also like the idea of contribs getting an icon. I think if we do, we should also have a core dev icon that looks like an "upgraded" version of the contrib icon.

I like this idea! What about a single green cog for contrib and two light blue gears for core dev?

Possibly :D
I'm bad at imagining what things may look like, so I have no opinions until I see the images lol

regal archBOT
odd spireBOT
regal archBOT
#

Just noticed it for the hacktoberissues bit it also needs to be changed here, line 89

            if option == "beginner":
                self.cache_beginner = data
                self.cache_timer_beginner = ctx.message.created_at
            else:
                self.cache_normal = data
                self.cache_timer_normal = ctx.message.created_at

Tested after that change and seems to work so that should be all. Alternatively I guess the original datetime set...

regal archBOT
regal archBOT
#

There's a possible missed migration here (L143 of bot/exts/utils/reminders.py).
I purposefully skipped that since it's an generator, so I'd need to convert it to an async generator, so that cna be done in a different PR.

Also not sure but should the converter instead catch discord.ext.commands.MemberNotFound (the actual error rather than a parent class)?
This isn't a convertor, this is called fetch_member, which doesn't raise that error afaik.

#

I purposefully skipped that since it's an generator, so I'd need to convert it to an async generator, so that cna be done in a different PR.

This isn't a convertor, this is calling Guild.fetch_member, which doesn't raise that error afaik.

Looks good then. There's also the fact that the equivalent util for channels is called try_get_channel rather than get_or_fetch. Do we want to change one of these for consistency's sake or just leave it?

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Closes #574
Restructures the bot guide to focus on getting users "through the door" first, and slowly adding additional information and options.
The guide is built in terms of showing ways to run the bot and how to achieve it, rather than listing all of the information for each configuration and environment variable right away.
That said, the attempt was to still present the reader with the full information they need, and to still be able to use as a quick reference for contributors who a...

odd spireBOT
regal archBOT
#

Thinking about this, I think it would be nice if this command accepted some sort of indication of tz. So it would have a converter and accept both:

  • Timezone (i.e. EST, EDT, IST)
  • UTC offset

For timezones, since some of them can be ambiguous, if there's more than one option that fits this, you can use the Discord Button components to have the user select the correct timezone.

I believe this all can be accomplished with the help of arrow.

odd spireBOT
regal archBOT
#

Have you considered making the helper a bot instance method, having the guild argument optional and defaulting to pydis? In some cases, caller code could then have:

bot.get_or_fetch_member(1234)

Instead of:

import guild id
import get_or_fetch_member

guild = self.bot.get_guild(guild id)
get_or_fetch_member(guild, member id)

I haven't thought about it much, maybe this is a bad idea.

odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

I'm not sure how necessary this example is. I think it's enough to say that "if something is present on the config.yml, it will override what is in the default-config.yml for that entry".

This example just separates the two options of:

  1. Create new file, copy and paste the provided template
  2. Duplicate default-config.yml and change values

so upon reading it seems like there's only 1 option.

#
[python-discord/bot] branch deleted: mbaruh\-patch\-1
oak estuaryBOT
regal archBOT
#

What does the anagrams.json file consist of?
If it is English words, I heavily recommend nltk for getting English words.

This is quite a large list, rather it could use nltk, a library that stands for natural language toolkit

There is a module within that library that contains a list of words, nltk.corpus.words, where the function to get the list of english words is nltk.corpus.words.words()

Though, I cannot see the anagrams.json as the load diff is too big, so if you ar...

odd spireBOT
regal archBOT
#

As for showing days side by side.. I'm not sure, I could imagine it as a distinct command. Like.: .aoc days 1 3 and that would show the stats for day 1, and 3, and both of the stars for each of those days, with a dropdown similar to the one mentioned. It could send codeblocks separated from each other (for example in this case the first codeblock would show stats for day 1, and the second one would show the stats for day 3) for the sake of consistency and edit them as the user chooses a...

#

What does the anagrams.json file consist of?
If it is English words, I heavily recommend nltk for getting English words.

This is quite a large list, rather it could use nltk, a library that stands for natural language toolkit

There is a module within that library that contains a list of words, nltk.corpus.words, where the function to get the list of english words is nltk.corpus.words.words()

Though, I cannot see the anagrams.json as the load diff is too b...

odd spireBOT
regal archBOT
#

Ah, I missed it in the above paragraph. Maybe change it to: "The site has to have been started beforehand, see the above paragraph for the site contributing guide."

Also, for that above paragraph I would maybe change it to:
"You can run additional services on the host. This guide won't go over how to install and start the other dependencies on the host. If possible, prefer to start the services through Docker to replicate the production environment as much as possible.

The site, howeve...

regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: allow\-helpers\-to\-edit\-their\-own\-nomination\-reason
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Reading this back, I don't think I follow exactly what issue you're referencing. The brief is the first line in the docstring, so if you can change the docstring to fit enough information in one line then that will work.

Otherwise override the brief (assuming that line is the brief from discord.py).

I was talking about the signature specifically which is a property on the class object, but after reading through the source it became apparent that specifying usage does work on g...

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Perhaps add a brief explanation of what these are, possibly noting that Sir Lancebot is designed for people new to OSS.
e.g.

โ€ข [Sir Lancebot](https://github.com/python-discord/sir-lancebot) - our fun, beginner-friendly bot.
โ€ข [Python](https://github.com/python-discord/bot) - our utility & moderation bot.

I'd probably have one for site too if you took this approach, but not quite sure what descriptor to use there.

regal archBOT
#

I think it takes up a whole lot of vertical space for very little benefit when we put these regexes inbetween the helper functions instead of grouping them all together at the top. Yeah yeah, it has better locality, but it just makes this file so much more bloated.

I suggest we move all of these regexes and subst variables up below the constants, all together in a block. I don't think that will really make this harder to work with, but it'll make the file look better.

regal archBOT
#

As for showing days side by side.. I'm not sure, I could imagine it as a distinct command. Like.: .aoc days 1 3 and that would show the stats for day 1, and 3, and both of the stars for each of those days, with a dropdown similar to the one mentioned. It could send codeblocks separated from each other (for example in this case the first codeblock would show stats for day 1, and the second one would show the stats for day 3) for the sake of consistency and edit them as the user cho...

#
[python-discord/site] New branch created: Relock\-poetry
#
[python-discord/site] New branch created: lock\_update
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: lock\_update
#
[python-discord/site] branch deleted: Relock\-poetry
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

I get this error from running the .challenges command.

Traceback (most recent call last):
 File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 167, in wrapped
    ret = await coro(*args, **kwargs)
  File "/bot/bot/exts/utilities/challenges.py", line 298, in challenge
    kata_embed = self.main_embed(kata_information)
  File "/bot/bot/exts/utilities/challenges.py", line 167, in main_embed
    color=int(MAPPING_OF_KYU[int(kata_information['rank']...
regal archBOT
odd spireBOT
regal archBOT
#

The code seems really nice from when we looked through it together. My only complaint is the word list though, there can be somewhat inappropriate words in it, the rest I don't know because I don't know what they mean.

Do you know what "conspue" means?

It is pretty unsatisfactory to get these long words you have no idea what they mean. It is also impossible for me to look through the 133 K file to see what words we should remove, how did you get this file?

odd spireBOT
regal archBOT
#

@lemonsaurus I'm pretty attached to the emojis, how about we turn down the weight and maybe get rid of some of the more noisy ones?

@lemonsaurus I'm pretty attached to the emojis, how about we turn down the weight and maybe get rid of some of the more noisy ones?

Here's the emojification based on punctuation and newlines and turned way down, what do you think?

<img width="1166" alt="image" src="https://user-images.githubusercontent.com/53479485/134398925-61d049b4-52f3-409a-bc32-42b...

odd spireBOT
regal archBOT
#

I don't think any discussion spawned from the last one-

You should add an attribute to the cog: last_fetched which will be a datetime of when this was last updated.
Then, when you use the command and self.last_fetched + datetime.timedelta(hour=1) < datetime.datetime.now() you can use asyncio.create_task(self.fetch_readme) (don't await it) to start a task fetching it in the background.

We still want to keep the response time good, so by using a task we don't need to wait for its...

regal archBOT
regal archBOT
#

The implementation looks good on the technical side, but I find the command structure confusing.

It's not clear to me semantically why the command group is the one which accepts the narrower option for a target. In other commands, when a group accepts arguments, it's the opposite - meaning, it accepts the wider definition of a certain argument (e.g infraction search).

While this is easier to write as code, technically speaking it's not much more problematic to replicate the same behav...

odd spireBOT
regal archBOT
#

I'm not particularly sure if this is the proper place to ask but I'm having issues running snekbox. It works fine on my local PC (Windows) but when I try and run it on my VPS (Linux, Debian) I get a PermissionError while trying to run code. It seems to have something to do with cgroup but I'm not particularly experienced with that so I can't figure out how to fix it. Traceback that happens each time I try and run code on it:

Traceback (most recent call last):
  File "/snekbox/snekbox...
odd spireBOT
regal archBOT
regal archBOT
#

It was pointed out by a user via ModMail that the bot is inconsistent when sending the paste-site url.

!paste uses https://paste.pydis.com (short), whereas the message sent when you upload a python/text file uses https://paste.pythondiscord.com (full).

In fact, from the looks of it all messages (other than !paste) which share the paste-site (such as !e when output is too long) use the longer form. Due to this, I think !paste should be the one changed (since only requires on...

#
[python-discord/bot] New branch created: fix\-paste\-site\-inconsistency
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-paste\-site\-inconsistency
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Yes, sorry. The class names were generated that way, there is a naming convention of some sort.

No need to be sorry at all ๐Ÿ™‚ I realized there was some convention. Thanks for updating it!

Also, how does the overall picture looks like? It had some problems with the messages module, but I fixed it, I believe.

With overall picture, do you mean whether this can un-drafted? From a quick view, it looks good to me, I can give it a thorough review once it's ready to go.

#

Yes, sorry. The class names were generated that way, there is a naming convention of some sort.

No need to be sorry at all ๐Ÿ™‚ I realized there was some convention. Thanks for updating it!

Of course, it was a bit inconsistent with this prefix.

Also, how does the overall picture looks like? It had some problems with the messages module, but I fixed it, I believe.

With overall picture, do you mean whether this can un-drafted? From a quick view, it looks good to me, I c...

odd spireBOT
odd spireBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: new\-appeals\-process
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: new\-ban\-appeals\-process
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Yeah I'm getting stuck on this one. I haven't used asyncio yet so maybe that is what is tripping me up.
Also, how can I get the "last" time the cog was loaded instead of just calling it immediately?

Here is what I have so far:

class WTFPython(commands.Cog):
    """Cog that allows getting WTF Python entries from the WTF Python repository."""

    def __init__(self, bot: Bot):
        self.bot = bot
        self.headers: dict[str, str] = dict()
        self.last_fetched =...
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: topic\-command\-cooldown
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

After doing a load of testing, it seems the believed cause of the issue isn't actually the case.

There's two possibilities as to what happened here that I can think of:

  • The user was banned (which is the case), meaning they left the server just after the message was sent, but before the actual discord.Message object was created by dpy, causing the message.author to be a discord.User.

  • Some sort of weird cache issue where the member wasn't in the cache, so dpy thought the user...

regal archBOT
#

Sorry, I totally forgot I'd commented here. (I need to read my emails more often ๐Ÿ˜…)

After some diving into the source code of bisect.bisect() and playing around with LOVE_DATA I found that tuple comparison was the bug. The fix I came up with was to pull the love percent thresholds out and bisect there instead of a half-arsed - 1 and a bad comment. I also force-pushed my branch to address the file restructuring.

Yes, this is roughly what I was going to suggest. That is, separati...

#
[python-discord/bot] New branch created: fix\-sentry\-BOT\-1N6
#

Closes #1839.

Adds an isinstance check before trying to add cooldown role and DM, to see if the message.author is a discord.User/discord.Member.

Will cause a sentry warning when message.author is a discord.User, in hopes of helping debug the issue in future (cause of message.author being a discord.User is unknown -- some theories are posted in #1839. As @ChrisLovering said on discord, the level can be lowered if it becomes too noisy.

odd spireBOT
regal archBOT
regal archBOT
#

Consider creating typing.NamedTuple classes for the different colour modes. Eg

class RGB(NamedTuple):
    r: int
    g: int
    b: int

Then you could make the required colour conversions methods of these classes, rather than static methods of the cog or nested functions of get_color_fields. I certainly think it would make more sense for the conversions to all be pure functions.

I've yet to test this, so I may be back with more comments ๐Ÿ‘€

regal archBOT
#
[python-discord/bot] New branch created: supress\-notfound\-messages\-on\-delete
#
[python-discord/bot] New branch created: suppress\-notfound\-messages\-on\-delete
#

I will copy my comment from the code, as it explains why we want this:

In the rare case where we found messages matching the spam filter across
multiple channels, it is possible that a single channel will only
contain a single message to delete. If that should be the case,
discord.py will use the "delete single message" endpoint instead of the
bulk delete endpoint, and the single message deletion endpoint will
complain if you give it that does not exist. As this means that we have
n...

#

Traceback found via pod logs:

2021-09-24 16:34:34 | bot | ERROR | Unhandled exception in on_message.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/bot/bot/exts/filters/antispam.py", line 220, in on_message
    await self.maybe_delete_messages(relevant_messages)
  File "/bot/bot/exts/filters/antispam.py", line 253, in maybe_delete_messages
    await channel.de...
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

Were you planning to handle this format:
.colour hsl(241, 47, 58)
(No space between mode and parameters.)
Similarly:
.colour #6563C7

I was not prepared to handle those types of inputs, but I believe I could handle that in the if / elif statements.

Right. But that makes me think: might it be better to parse the arguments to this command yourself, rather than relying on discord.py to separate the mode?

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
#

Did you go over other possible failure points for this in the cog? It is actually documented that discord.Message.author might be a discord.User if they left the guild. Maybe start by looking for other uses of that attribute in the help system. Are there any other member attributes that could be a user too?

There isn't any other cases where we rely on message.author being a discord.Member. Other cases just get the .id, which will exist regardless. Only exception is L593 of `_co...

regal archBOT
regal archBOT
#

I am thinking something more like this:


README_REFRESH = 60  # Amount of minutes

class WTFPython(commands.Cog):
    """Cog that allows getting WTF Python entries from the WTF Python repository."""

    def __init__(self, bot: Bot):
        self.bot = bot
        self.headers: dict[str, str] = dict()
        self.last_fetched = datetime.datetime.now()
        log.debug(f"{self.last_fetched = }")

        asyncio.create_task(self.fetch_readme)  # Start a first task

...
#
[python-discord/bot] branch deleted: suppress\-notfound\-messages\-on\-delete
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

Relevant Issues

Closes #866

Description

Found flights are no longer displayed in the message content above the board image. Instead a new embed message is sent below the board and its text is edited with the flights.

Did you:

  • [x] Join the Python Discord Community?
  • [x] Read all the comments in this template?
  • [x] Ensure there is an issue open, or link relevant discord discussions?
  • [x] Read and agree to the [contributing guidel...
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

I don't think so, no. This check is meant to check whether in the current interaction in the very moment when this button is pushed there is one value chosen from both of the dropdowns, since when the user pushes the fetch button, the interaction will revert itself to its original form. (This way we ensure that the placeholder will be shown every time they want to interact with the view). If I were to use those variables in this check, the view would just fetch the same view that was fetched...

regal archBOT
odd spireBOT
regal archBOT
#

However it's not the scope of this PR, would it mean a problem if I added PostgreSQL to the docker-compose file, and the drivers to the poetry environment? @jchristgit

No, not at all, go PostgreSQL!!! ๐Ÿ˜

Alright! ๐Ÿ‘
Apart from the linting errors(Should we change the max-line-length to 120?) , I believe it's done. I have tested out few of the checks and relationships, they seem to work just fine.

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Can we reach a consensus on this before moving forward please @Bluenix2 @brad90four @CyberCitizen01

I am completely okay with what you suggested here, subcommands was simply the first idea that came to mind but this will work out as well.

Ah right. My thought was that it wouldn't be very user friendly to try doing .color hsl(241, 47, 58) and get a response saying that there is no hsl(241, sub-command.

regal archBOT
regal archBOT
regal archBOT
#

Hi! Cool that you're doing this, I remember seeing a couple really minor typos in the tags before, if I can find them I'll let you know

Sounds good! It's probably best to send anything you find in #1836 (the PR making the changes) rather than here, and would be helpful if you just double check I haven't already made the change on the PR (by checking the "Files changed" tab).

regal archBOT
#

There has been a number of instances recently where users have been getting auto-muted by the bot for "spamming" bot commands / messages in response to commands.

This had lead to multiple discussions of reducing the strictness of our filters within the two bot command channels, and it seems no one is strongly against this.

In terms of what exactly should be done, I think the duplicates filter max should be increased to say 6 messages (from 3), and the newlines filter increased to say 12...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

But you have self.star_select no?

I do, I did not realize the obvious.. thank you for pointing out. I'll patch my code.

This doesn't even work, I can select one of the dropdowns and fetch. I think it is unneccessary.

Actually, it does on the first interaction, however I did not take it into account, that the dropdown values will never be reverted to zero. I've found a workaround with the day and star variables.

regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Description

running .help quote sends no response

Steps to Reproduce

run .help quote

Expected Behaviour

Bot either gives help message or errors since it is not valid.

Actual Behaviour

No response is provided.

Known Impacted Platforms

  • [ ] Web
  • [ ] Desktop
  • [ ] Android App
  • [ ] iOS App

Possible Solutions

I have no idea what the error is internally.

Would you like to implement a fix?

***Note: For high-priority or critical ...

odd spireBOT
regal archBOT
#

copying this from discord so its easier to reference:

It's highly worth removing them. Internally buttons and their names are referred to with a custom ID, which fwiw, should be manually set instead of setting the library decide--this will be useful in the end and I can explain why later.

When the bot receives an interaction over the gateway, it only receives the message and the button ID. this means that we'd be getting a lot of old requests if a user used an old button. It's n...

regal archBOT
#

Can we reach a consensus on this before moving forward please @Bluenix2 @brad90four @CyberCitizen01

Well I guess this looks great, but I have something to ask:
So now, the cog will handle .color <mode> <color> (explicit space between mode and color) via subcommands and inputs like .color rgb(255,255,255) via the main method, right?


I also think you should move the functions that perform the actual colour conversions out of the cog class and into the module.

Yeah I think, ...

regal archBOT
#

Hey @Xithrius,

Unfortunately I haven't been getting enough time to mention the reviews due to my exams going on, if this is PR is on a high priority (or any of my other PRs), someone else can take them up as I won't be able to mention them until 15th October at-least. Otherwise, I would get them mentioned as soon a I am back from the break. And thanks bluenix and zig for the reviews!

You would probably forgot, I had pinged you in #dev-contrib with the same before I went off into a break...

regal archBOT
#

Something to be though about here as well potentially is: do we apply these constraints to current members who haven't completed these requirements? maybe a period where new joins gets this applied, and then at the end of that, we do a mass apply to server members?

also, if a member loses the requirements by deleting messages or getting infracted, should they get given the new members role again?

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Well I guess this looks great, but I have something to ask:
So now, the cog will handle .color <mode> <color> (explicit space between mode and color) via subcommands and inputs like .color rgb(255,255,255) via the main method, right?

That's not correct. The invocations .color rgb(255,255,255) (without space) and .color rgb (255,255,255) (with space) would both be handled by the base command .color <color>. You would just define <color> to be flexible regarding whitespace...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: fix\-issue\-863
#

Relevant Issues

<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #863

Description

Fixed the traceback caused by process.extract returning 3 items when dict() can only take 2.

Ended up changing the data-structure of the argument sent to HelpQueryNotFound to list[str]` since only the keys where ever used anyway.

Also noticed there was some inconsistency within the file in regards to commands.Command so fixed that too...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: add\-more\-supported\-symbols\-to\-otn
#
[python-discord/site] New branch created: add\-more\-supported\-symbols\-to\-otn
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Description

Currently, avatar commands use the user's avatar, and not the guild specific avatar.

Steps to Reproduce

run any avatar command

Expected Behaviour

the displayed avatar is used to make the images.

Actual Behaviour

the user's global avatar is used to make the images.

Known Impacted Platforms

  • [x] Web
  • [x] Desktop
  • [x] Android App
  • [x] iOS App

Possible Solutions

Change to the documented display_avatar() method in discord.py 2...

regal archBOT
regal archBOT
#

I'm not up to date on whether we are already using threads with Sir Lancebot. Is this issue currently blocked?

So, here's the thing: we can technically use threads manually, but that's not going to be very effective for this game, right? So what we are waiting on is the full release of d.py 2.0, after which we can upgrade the main Python bot so it can manage threads (there is a PR for it in the bot repo), and only after that could someone start working on this. So yes, you are right, t...

#

I have 2 alternative implementations that don't really require the use of threads.

  1. What we could do is, instead of opening threads when the multiplayer game command is run, (I'm not even sure if this is possible) unlock a special channel where anyone can join the person who ran the command. This one has some problems, which I'm not sure if it's obvious or not so I'll say it anyway. Other people could join the new channel and spam it.

  2. We could also do it like this: whenever someone run...

odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: add\-more\-supported\-symbols\-to\-otn
#
[python-discord/bot] branch deleted: add\-more\-supported\-symbols\-to\-otn
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

The r'' actually stands for raw, it is mainly useful with backslashes. r'\n' becomes the actual string '\n' while '\n' in the code becomes a new-line character. It is pretty common to think r is for regex but this is not correct.

The reason I say this is because you double-backslash in the subtitute strings, and always use raw strings in the regex compilation.

Side note: these should be all-caps for CONSTANTS.

#
sir-lancebot  | 09/28/21 18:18:55 - bot.exts.core.error_handler ERROR: Unhandled command error: sleep() got an unexpected keyword argument 'seconds'
sir-lancebot  | Traceback (most recent call last):
sir-lancebot  |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", 
line 167, in wrapped
sir-lancebot  |     ret = await coro(*args, **kwargs)
sir-lancebot  |   File "/bot/bot/exts/fun/anagram.py", line 77, in anagram_command
sir-lancebot  |     await a...
#
sir-lancebot  | 09/28/21 18:18:55 - bot.exts.core.error_handler ERROR: Unhandled command error: sleep() got an unexpected keyword argument 'seconds'
sir-lancebot  | Traceback (most recent call last):
sir-lancebot  |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", 
line 167, in wrapped
sir-lancebot  |     ret = await coro(*args, **kwargs)
sir-lancebot  |   File "/bot/bot/exts/fun/anagram.py", line 77, in anagram_command
sir...
#

I'm not up to date on whether we are already using threads with Sir Lancebot. Is this issue currently blocked?

Yes @lxnn we need to wait for Python bot's usage of discord.py to use threads anywhere. Even though Sir Lancebot does support threads.

I have 2 alternative implementations that don't really require the use of threads.

  1. What we could do is, instead of opening threads when the multiplayer game command is run, (I'm not even sure if this is possible) unlock a special...
#

I'm not up to date on whether we are already using threads with Sir Lancebot. Is this issue currently blocked?

Yes @lxnn we need to wait for Python bot's usage of discord.py to use threads anywhere. Even though Sir Lancebot does support threads.

I have 2 alternative implementations that don't really require the use of threads.

  1. What we could do is, instead of opening threads when the multiplayer game command is run, (I'm not even sure if this is possible) unlock ...
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

Recently we've been having a problem with people joining and leaving the voice chat over and over and over. I'm wanting to have a new command made that will not only prevent them from being verified (for as long as the join ban is active) as well as prevent them from rejoining the channel.

In addition to that, we'd need to rename the current voiceban command as voicemute to better reflect what they do.

The implementation would likely be similar to how we have the mute command.

regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-pynews\-markdown
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
sir-lancebot  | In components.0.components.1: The specified component exceeds the maximum width
sir-lancebot  | Traceback (most recent call last):
sir-lancebot  |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 167, in wrapped
sir-lancebot  |     ret = await coro(*args, **kwargs)
sir-lancebot  |   File "/bot/bot/exts/utilities/challenges.py", line 331, in challenge
sir-lancebot  |     await original_message.edit(embed=kata_embed, view=kata_vi...
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: fix\-pascal\-triangle\-image
odd spireBOT
regal archBOT
#

It seems like this issue has been abandoned. I would like to implement it if there are no objections.

@WillDaSilva

If @ToxicKidz isn't interested in continuing their PR that sounds fine, although I think part of the reason that PR stalled is because there wasn't much of a conclusion on what the implementation should be.

Do you have a plan for implementation? Do you want to continue @ToxicKidz's PR (in which case do you have a plan for addressing Numerlor's comment there) ...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Currently, when creating a mod alert, the bot will not create a log of the messages if there is only one message involved, and will display it in the alert embed directly instead.

That should not be the case when there are attachements. If there are any, it should always create a new log and link to it instead of trying to display the contents of the message (which might not exist).

Example of an alert with no content (because it's a single message with only attachments):
![image](http...

regal archBOT
#
[python-discord/sir-lancebot] branch deleted: bug/875/emoji\-offet\-naive
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: better\-bookmark\-error\-message
#

Relevant Issues

<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #819

Description

Added some further information in the error message as to what is accepted as a target message to bookmark.

Did you:

  • [x] Join the Python Discord Community?
  • [x] Read all the comments in this template?
  • [x] Ensure there is an issue open, or link relevant discord discussions?
  • [x] Read and agree to t...
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: spooky\-ignore\-bots
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: add\-get\-or\-fetch\-util
#

b9f41c5 Add get_or_fetch_member util - ChrisLovering
15a8e7e Migrate all Guild.get_member calls to get_or_fe... - ChrisLovering
7a9828b Mock fetch_member in tests that user get_or_fet... - ChrisLovering
6cf9f54 Rename channel helper to be consistent with oth... - ChrisLovering
e52db75 Add new poetry tasks for pytest - ChrisLovering

#
[python-discord/sir-lancebot] branch deleted: spooky\-ignore\-bots
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-hasattr\-check
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: better\-bookmark\-error\-message
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
jb3

We've had a chat in admins and decided the roles to target for now are just the champion roles, we won't have an icon for moderators, helpers, media/forms team, help cooldown or lead roles. We'll discuss a contributor icon for a later date.

I'll update the issue text appropriately.

#
jb3

What's the reasoning for no help cooldown icon

We felt that people will just open channels to get an icon and the cost of moderating that sort of thing outweighs the benefit of having people assigned an icon for opening a help channel, especially since it's carried across the whole server, not just the currently active help channel for that user.

and the contributors icon for a later date?

We're discussing with the Core Devs about whether they would like a Core Dev icon (Core De...

#
[python-discord/quackstack] New branch created: vcokltfre/fix/item\-ordering
#
[python-discord/quackstack] branch deleted: vcokltfre/fix/item\-ordering
regal archBOT
#
[python-discord/quackstack] New branch created: vcokltfre/chore/docker\-improvement
#
[python-discord/quackstack] branch deleted: vcokltfre/chore/docker\-improvement
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-hasattr\-check
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: allow\-helpers\-to\-edit\-their\-own\-nomination\-reason
#

eeb70ef Allow helpers to edit their own nomination reason - ChrisLovering
77f76cb Force kwargs when calling helper util - ChrisLovering
0bd2f1e Block helpers from editing nomination reasons i... - ChrisLovering
d444ebd Check cache for Members and Users - ChrisLovering
bf8a52f Merge branch 'main' into allow-helpers-to-edit-... - mbaruh

odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

Currently, when you try to edit the duration of a note/warning, it will give the error message ":x: Cannot edit the expiration of an expired infraction.".

This issue proposes that there should be detection for whether the infraction is a note/warning, and if so, then return a different error message stating something like ":x: Cannot edit the expiration of a note/warning."

Should just be a case of checking the infraction type before [here](https://github.com/python-discord/bot/blob/...

regal archBOT
#

This is my idea for now:

  • FastAPI microservice
  • Bot posts every message in a help channel to this service
    • This service manages storing to a database
  • opt-out command in the bot, which posts to an opt out endpoint in the api, which erases all data on that user
  • users opted out still have their message posted to the API by the bot, the API manages whether to store them in the DB or not
    • This removes the need for any logic in the bot itself
  • controlled access to the data...
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

This PR looks good to me now. Two small points:

  • Could you look into fixing CI for our tests to pass?
  • Since we now have the model definition in two projects, it would be great to maybe add some form of reminder to the site pull requests about whether they update the model definitions in a way that requires an update here. I do not think we should put a freeze to model changes on the old site, at all. First off, it's hard to implement, and second we still want to be able to make mod...
#

This PR looks good to me now. Two small points:

* Could you look into fixing CI for our tests to pass?

* Since we now have the model definition in two projects, it would be great to maybe add some form of reminder to the site pull requests about whether they update the model definitions in a way that requires an update here. I **do not** think we should put a freeze to model changes on the old site, at all. First off, it's hard to implement, and second we still want to...
#
[python-discord/bot] New branch created: catch\-403\-from\-Typing\-calls
odd spireBOT
odd spireBOT