#dev-log

1 messages ยท Page 88 of 1

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: feature/1903/fix\-pin\-inconsistency
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

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

A short-term solution seems like it would require making channel-specific overrides for the antispam config, which sounds kind of complicated for something that'll get removed soon anyway. If the new filter system will subsume the antispam functionality and can adequately cover this use case, we should mark this issue as stalled waiting for it to be implemented.

I spoke to @mbaruh about this yesterday and he confirmed this will be possible with the rewrite. Will add the "stalled" label :+1:

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: dynamic\-views
#

Adds views for commands to navigate groups.
For subcommands, a button is added to show the parent's help embed.
For groups, buttons are added for each subcommand to show their help embeds.

The views are not generated when help is invoked in the context of an error.

The code has gone through several iterations of design, and this is what I arrived at.
Because conversion of callbacks to buttons is done in subclass_init of the view baseclass, I had to create Button subclasses.
Beca...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: test
regal archBOT
regal archBOT
#

If they're unpinned when the channel becomes available, then why even bother unpinning when it goes dormant?

This allows us to get rid of the message cache with no known disadvantages.

Getting pinned messages requires an API call to Discord. With the cache, this is avoided. That is basically the only advantage. That being said, this sort of optimisation is not necessary; it was nice to have but it's not worth keeping if it's causing consistency issues.

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

Description & Reasoning

In a few commands like hacktoberissues, we've hardcoded . as the prefix which won't make sense if a user is using a different prefix for the bot.

Expected Behaviour

The correct prefix should be displayed, by fetching the correct prefix through the constants module.

Would you like to implement a fix?

  • [x] I'd like to implement the bug fix
  • [ ] Anyone can implement the bug fix
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: test
regal archBOT
#

If they're unpinned when the channel becomes available, then why even bother unpinning when it goes dormant?

Apparently, it's the API itself that bugs out occasionally, and making two passes will decrease the likelihood that there are pins remaining by the time the channel becomes available.

Getting pinned messages requires an API call to Discord. With the cache, this is avoided. That is basically the only advantage.

That is true.

it was nice to have but it's not worth keepi...

odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: feature/1903/sync\-cooldown\-roles
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: save\-reminders
#
[python-discord/sir-lancebot] branch deleted: Add\-border\-around\-bat
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: feature/1903/fix\-channel\-inconsistencies
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Would this help with the issue? I imagine if the count drops the admins will be notified sooner than the one hour period in most cases

I used the one-hour interval mentioned in the original issue, but perhaps that was referring to actually reloading the cog and not just checking the available channel count. Since getting the category channels in this manner doesn't seem to require an API call, I guess we could do it much more frequently at no cost.

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

mm, @Bluenix2, you make a fair point, but we shouldn't block this merge over this small amount of git blame. It's fine to lose a little git blame in a refactor like this, and cleaning this up now after the fact is going to be quite annoying. I don't want this PR getting closed or abandoned over a technicality that might never have any real practical use for us, especially after all these wonderful people spent time reviewing it.

regal archBOT
#

Currently when messages are deleted by the anti-spam filter or by the clean command, a message log is created with info of of the user who sent it, at what time, and the contents of each message.

With recent developments, these two features now work across multiple channels, but the logs don't include that information making them sometimes hard to follow.

Including the channel ID for each message seems to make sense, but at the same time we navigate channels using their names. Perhaps ...

regal archBOT
regal archBOT
regal archBOT
#

When trying to send a link to a deleted message I got the following exception:

python-discord-bot-bot-1        | 2021-11-08 20:36:51 | bot | ERROR | Unhandled exception in on_message.
python-discord-bot-bot-1        | Traceback (most recent call last):
python-discord-bot-bot-1        |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/converter.py", line 397, in convert
python-discord-bot-bot-1        |     return await channel.fetch_message(message_id)
pytho...
odd spireBOT
regal archBOT
#
# Tuple of tuples, where each inner tuple is a role id and a month number.
# The month number signifies what month the role should be assignable,
# use None for the month number if it should always be active.
ASSIGNABLE_ROLES: tuple[tuple[int, Optional[int]], ...] = (

note: also requires from typing import Optional

Maybe add an annotation like the comments beautifully describes it?

regal archBOT
regal archBOT
#

Says what it does on the tin. Best used as a black box, without looking too deep into the cursed inner workings.

Takes a URL that's presumably behind some redirection, and unfurls it until it reaches the actual redirect hidden at the end of the rainbow (or dies trying). See bot#1933 for the intended usage of this worker.

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

@SavagePastaMan

A few first-glance alterations:

I don't like that we're calling the variable sum, thus overriding the built-in sum() function. The type hint here also doesn't particularly make sense. Inline assignment type hints like this should only be done when the type isn't obvious from the variables / other type hints.

There's also some small rewording I've done here.

Current proposal:
![image](https://user-images.githubusercontent.com/47674925/140834641-b75814fd-4d0d-4...

#

The type hint here also doesn't particularly make sense.

I wanted to include it to show that you can typehints normal variables too, maybe we can find another place to show that? I agree with not naming it sum though.

We should probably link to some further resources on type hints (perhaps a PEP?) and also mention static type checkers like mypy which can be used to "enforce" type hints.

Yes, I agree.

@TizzySaurus

odd spireBOT
regal archBOT
#
        if "#" not in hex_code:
            hex_code = f"#{hex_code}"
        if len(hex_code) not in (4, 5, 7, 9) or any(_ not in string.hexdigits+"#" for _ in hex_code):
            raise commands.BadArgument(
                message=f"HEX values must take the form **#RRGGBB(AA)** or **#RGB(A)**. User input was: `{hex_code}`.")

        hex_tuple = ImageColor.getrgb(hex_code)
        if len(hex_tuple) == 4:
            hex_tuple = hex_tuple[:-1]  # color must be RGB. ...
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: ignore\-bot
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: refactor\-modlog
odd spireBOT
regal archBOT
regal archBOT
#

Is the status of this still WIP?

Sorta stalled on what to do with the color names. Currently it uses rapidfuzz to match the name if it is close, or the actual hex code. Since even one character off for the hex code can throw a non-match, currently the color can look the same but not have a name. Current ideas are to use difflib instead, or to create an RGB: color name mapping and try to use an RGB point distance calculation to determine the closest RGB color, then use that for ...

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: refactor\-modlog
oak estuaryBOT
odd spireBOT
regal archBOT
#

You're right, we can't handle alpha. I convert it to RGBA and remove the alpha if there is one. I don't think it's helpful to not convert the color just because there's an alpha included. Instead, we should convert the rest of the color and ignore the alpha, showing a message that transparency will not be shown. We could even put an indicator for transparency as a percentage, separate to the color preview

regal archBOT
#

Current ideas are to use difflib instead, or to create an RGB: color name mapping and try to use an RGB point distance calculation to determine the closest RGB color, then use that for a name.

The latter seems better but out of all things it's probably more code and logic for you (in the grand scheme of things it probably requires the least amount of code - but that is abstracted away).

As long as rapidfuzz doesn't give annoyingly wrong results I see this as a non-critical feature th...

regal archBOT
#

Is there anything I need to do to test this? I have both rebuilt the container with docker-compose build and removed it using docker-compose rm.

I added this logging to make sure changes were applied:

def setup() -> None:
    ...  # Setup of all the loggers

    coloredlogs.install(level=logging.TRACE, logger=root_logger, stream=sys.stdout)
    root_logger.info('Installed coloredlogs')

Yet still there's no colours like the other bot has, you can see that Docker ...

regal archBOT
regal archBOT
#

Is there anything I need to do to test this? I have both rebuilt the container with docker-compose build and removed it using docker-compose rm.

I added this logging to make sure changes were applied:

def setup() -> None:
    ...  # Setup of all the loggers

    coloredlogs.install(level=logging.TRACE, logger=root_logger, stream=sys.stdout)
    root_logger.info('Installed coloredlogs')

Yet still there's no colours like the other bot h...

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

Connected!

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

So basically, a member can only get a maximum of MAX_PER_GAME_PER_DAY_POINTS points in a day, say I have 95 points now and I win a coinflip game, so I should get 105points but since the max points are 100, I can only earn 5 more points. Therefore I only get 5 more points, so in the total leaderboard, I get 5 more points which is basically MAX_PER_GAME_PER_DAY_POINTS - current_points_today as the docstring says.

Now, say I have 80 points, then I would get a total of 90 point...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Tested it out as written above, it did not work. Keeping the code as below:

    @commands.group(aliases=("color",), invoke_without_command=True)
    async def colour(self, ctx: commands.Context, *, extra: str) -> None:
        """User initiated command to create an embed that displays colour information."""
        if ctx.invoked_subcommand is None:
            try:
                extra_colour = ImageColor.getrgb(extra)
                await self.send_colour_response(ctx, extra...
#

Tested it out as written above, it did not work. Keeping the code as below:

    @commands.group(aliases=("color",), invoke_without_command=True)
    async def colour(self, ctx: commands.Context, *, extra: str) -> None:
        """User initiated command to create an embed that displays colour information."""
        if ctx.invoked_subcommand is None:
            try:
                extra_colour = ImageColor.getrgb(extra)
                await self.send_colour_response(ctx, extra...
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

I really like this feature! The code looks good, I just have a few things to mention in terms of the UX. Apart from the comments below...

  1. I think it's a bit redundant for all the subcommand help texts to start with "Command to create an embed for" (or at least "Command to" since we all know the list is about its sub commands).
  2. For the help for the top level .colour command, how about something like "Display an embed with information about a given colo[u]r"? I'm not sure if "User i...
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: infractions\-by\-command
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

Since the BadArgument is raised in the function match_colour_name, would this now need to be an async function so that it can return an embed directly?

    def match_colour_name(self, input_colour_name: str) -> str:
        """Convert a colour name to HEX code."""
        try:
            match, certainty, _ = rapidfuzz.process.extractOne(
                query=input_colour_name,
                choices=self.colour_mapping.keys(),
                score_cutoff=80
            )...
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
            hex_error_embed = discord.Embed(
                title="The input hex code is not valid.",
                description=f"Cannot convert `{hex_code}` to a recognizable Hex format. "
                "Hex values must be hexadecimal and take the form *#RRGGBB* or *#RGB*.",
                colour=discord.Colour.dark_red()
            )
            await ctx.send(embed=hex_error_embed)

change on line 151 should also be made on 250. Will the other color modes h...

#

It should be raised by the BadArguments, with the details of the accepted ranges for the other commands.

This is what I have locally for the match_colour_name:

    async def match_colour_name(self, ctx: commands.Context, input_colour_name: str) -> Union[str, None]:
        """Convert a colour name to HEX code."""
        try:
            match, certainty, _ = rapidfuzz.process.extractOne(
                query=input_colour_name,
                choices=self.colour_mapping.k...
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: infractions\-by\-command
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: infractions\-by\-command
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: add\-dm\_sent\-field
#
[python-discord/api] New branch created: add\-dm\_sent\-field
odd spireBOT
regal archBOT
regal archBOT
#

Thanks for the PR! We do not need to merge it with the API as they don't rely on each other.
Will update that :+1:

What we do need though is to either add bot side code to handle it at the same time, or have a sensible default value. Based on what you have so far, we should just set the default to null (do we even need to?).
Yep, the default value will be null. I looked through the docs and after a while of figuring out the structure etc. I found out that the default value for `B...

odd spireBOT
odd spireBOT
regal archBOT
#

Thanks for all your work, we're almost there! I really like that there's a .colo[u]r color_input shortcut as well as .colo[u]r providing information about random colors if no subcommand or argument is given -- super useful if someone would like to design something that doesn't take into account color palettes (ooh that sounds like a nice feature request in the future).

Just some miscellaneous things here, most likely my last non-approving review :)

#

UnboundLocalError: local variable 'match' referenced before assignment on the next line if the color name matched isn't found.

If we return here though, there would be an error about None not having len() on line 163. I feel like the neatest solution here is to simply return None and send the error embed in self.name there, if the return value of this is None.

Or if you still like to keep this async and have it send the error embed, you could return on line 162 if the return v...

regal archBOT
#

Currently, when you try to add an invite link to the invites whitelist, it is rejected if the given link begins with https://, http://, etc.

For example:

!whitelist add guild_invite https://discord.gg/aMZJ7NAr R Programming language

Fixing this should just be a matter of adding the prefix to the regex pattern.

Relevant parts of the code:

regal archBOT
regal archBOT
#

Could we take this as an opportunity to clean up the regex a bit, and possibly add a couple of regression tests?

I find the re.VERBOSE flag can make the structure of a regex clearer (and permits comments in the pattern). I haven't tested this, but to illustrate:

INVITE_RE = re.compile(
    """
        (
            (https?://)?
            (discordapp|discord|dis)
            (.|dot)
            (com|gg|me|li|io)
            (/|slash)
            (invite)?
        )
  ...
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: TizzySaurus\-patch\-1
odd spireBOT
regal archBOT
#
[python-discord/api] New branch created: async\-sqlalch
#

This PR moves our migrations to asyncpg, adds a docker volume for migrations and adds a helper task for generating those migrations.

Simply by running poetry run task revision "Migration message here." while the docker containers are running, a migration will be generated.

Something to keep in mind is that, now that we are using asyncpg, no database validation can be run within Pydantic models. This now needs to be deferred to the routes that need that validation instead.

regal archBOT
#
[python-discord/site] New branch created: easy\-docker\-migrations
#

This PR adds two things

  1. An easy way to generate migrations running under a pure docker setup
    • Simply run poetry run task dockermigrations and all the migrations will be created
    • Under the hood this calls docker exec and then through the magic of volumes it appears in the local system
  2. Add a persistent volume for postgres data
    • This means docker-compose down won't lose your db data anymore.
    • If needed you can still do docker-compose down --volumes
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/site] New branch created: edit\-on\-github
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: file\-log\-debug
#

Description

The most recent changes to the logging setup were crashing the bot on startup in prod, as /logs was read-only. This PR prevents any file logs from being written in prod, since we don't use them anyways.

This PR also moves the sentry setup into the init, so we can catch any errors that happen before we get to main (such as the one behind this bug). It's not best practice for the __init__ to have side-effects, but it really doesn't matter in this case.

Did you:

...

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: file\-log\-debug
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: content/update\-help\-channel\-timing
odd spireBOT
regal archBOT
#

...will be moved down to the Python Help: Occupied category.

We've renamed the category to "Occupied Help Channels". We've also changed Python Help: Available on L39 etc. to Available Help Channels (as per the image) (Python Help: Dormant wasn't changed so that's still good).

Another minor thing is the fact we've now added emojis to the topics, so we may want to update the images?

regal archBOT
#
[python-discord/snekbox] New branch created: fix\-tests\-protobuf
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: add\-dm\_sent\-field
#

Closes #1864.

The !infraction embed now show whether or not a DM was sent when an infraction was made.

Possible values:

  • Yes: the DM was sent
  • No: the DM wasn't sent (triggers for "hidden" infractions too)
  • N/A: the infraction was made before database change so we don't know if DM was sent or not

NOTE: I've not been able to test that the N/A actually works since I didn't have any prior infractions in the database, but it should be fine.

**To be merged with [site#...

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

This is what invoke_without_command=True does, the group command is only called if there is no subcommand so this check is extraneous.

Indicates if the group callback should begin parsing and invocation only if no subcommand was found. Useful for making it an error handling function to tell the user that no subcommand was found or to have different functionality in case no subcommand was found. If this is False, then the group callback will always be invoked first. This means that th...

regal archBOT
#

I don't think this description reflects what information is actually provided in the embed.

Name information for Black
Hex information for Red

In all cases above where the command succeeds, all six values for the color is shown (RGB, HEX, name, HSL, etc). Whereas the description implies only the name or hex values (in the examples above) is in the embed.

How about:

Colo(u)r information for HEX #71653e
Colo(u)r information for RGB (1, 2, 3)
Colo(u)r information for...

regal archBOT
#

As per rule 5:

Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

The current tag says you should not assist with questions related to ytdl. People might ask a simple question about general Python coding within a project breaking YouTube's Terms of Service, and other members provide support for the user, which breaks the rule 5.

odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
jb3
[python-discord/bot] New branch created: jb3/guild\-features\-channels
odd spireBOT
regal archBOT
regal archBOT
#

@TizzySaurus What's the status of this PR?

Thanks!

I ended up going down a massive rabbit hole in this PR. I tried to get some help from @Bluenix2 but in the end I just kept going deeper and deeper and couldn't get it working, and in the end kinda just gave up.

I may start again and have another go but keeping it simpler for the time being. Hopefully I'll either have this done by next weekend or will mark as up-for-grabs.

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

Connected!

odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: Don't\-log\-threads\-in\-admin\-channels
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: reorder\-ot\-embed
#
[python-discord/bot] branch deleted: reorder\-ot\-embed
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

The current YTDL tag says that, as per rule 5, we should not provide with questions related to YTDL. However, the rule 5 says we should not help with projects that breach Terms of Services (in that case, YouTube).

An example where you are against the rule 5 but not against the YTDL tag:

Someone asking a general question not related to YTDL in a project that contains YTDL and therefore breaches YouTube's terms of service.

In that example people will help as the question is not relat...

regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Well, this is interesting. It seems changing the generated config file from its default name now breaks sneakbox. I'm struggling to investigate this much, especially because I can't reproduce locally. I've tested it here in actions (if you couldn't already tell from the 10 force pushes), and it seems that no combination of nsjail config name and final config name works besides the default config_pb2.

I haven't had a chance to investigate yet, but it seems everything is working with the ren...

regal archBOT
#

Description

#677 Was recently merged, while we focused on the main functionality on that as described in the issue, this issue proposes a few util commands which help when you are working with colours!

  • lighten/darken subcommand
    • .colour lighten #3f6d2a 40 would lighten the colour 3f6d2a by 40 percent i.e. mixing 40% white colour
    • .colour darken rgb(1, 92, 23) 50 would darken the colour rgb(1, 92, 23) by 50 percent i.e. mixing 50% black colour
    • Basic implementatio...
regal archBOT
regal archBOT
#

I'm not sure how it ever worked to begin with, but even as far back as 2016 there was a report of this same error when the prefix was removed (so it's not something introduced by a new protoc version). See https://github.com/tgalal/python-axolotl/issues/14 Even the generated file in the main branch has the original module name hard-coded at the end of the file.

There isn't a way to tell protoc to use a different file name: https://github.com/protocolbuffers/protobuf/issues/2283; https://gi...

regal archBOT
regal archBOT
#

Changing the name of the config.proto file used to generate our config changes the __module__ constant. I've tested various combinations of __module__ and file names, and it seemed nothing besides config_pb2 works for this.

These are all the combinations I've tried besides the current one, and they all failed with the same exception:

Snekbox config & nsjail config:

odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: allow\-reply\-in\-remind
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: Don't\-log\-threads\-in\-admin\-channels
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/.github] New branch created: tagger\-workflow
#

This workflow will automatically apply any labels, as defined in the auto_tagger_config.yaml config file. This runs on PR open, reopen and synchronize, which is triggered when a commit is pushed to the PR branch.

If the label doesn't exist in the repo, it will be created automatically.

This allows us to enforce the removal of a "needs testing" tag before any PRs are merged, as reminder for us that PRs should be tested by at least one person before merging.

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

This issue consists of two parts:

  1. I believe we can improve helpdm's embeds by making changes such as:

    • Adding a mention to the claimant
    • Setting their profile picture as the thumbnail
    • Adding the condensed text that the claimant themselves receive
    • Updating the embed when the help channel has been closed
  2. While helpdm sometimes comes in handy when juggling between multiple help channels, what I would like more is to have the option to be notified for message...

regal archBOT
odd spireBOT
regal archBOT
#

Closes #1933.
Blocked by python-discord/workers#20.
Blocked by python-discord/site#625.

Description

This PR implements the URL unfurling filter feature described in #1933. It adds a service to do so (which will further be wrapped by a command in a future PR, to avoid delaying this one), and the filtering logic. To prevent the filtering logic from being slow, and to handle the fact that this filter calls another filter, I've had to make modifications to the core filtering logic to allo...

odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/bot] New branch created: see\-what\-black\-would\-change
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

Isn't this equivalent?

            serialized_json[idx] = {"description": self.unicodeify(question["description"]), **question}

I see now, by doing this the description is overriden.

I must say I am not a huge fan of all mutations that happens with the questions so easily, my gut-feeling tells me that there's a lot of room for subtle bugs. Besides, it also limits us because you have a few places where you need to un-unicodeify the descriptons (code duplication...

odd spireBOT
regal archBOT
#
jb3
[python-discord/bot] branch deleted: jb3/guild\-features\-channels
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

So if someone presses a button the instant Discord receives it they will still have taken 0.5 seconds according to us?

Isn't that just ping? I don't think we should be on relying on this - we aren't measuring exactly how fast people are to answer so that we can see who's the fastest, we just need to be able to give someone who clicked after 5 seconds more points than someone who clicked after 20.

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Thanks for including my suggestions!

Maybe we should come up with a standardized and user-friendly way to represent color values. I can think of three ways this can be done if we're implementing a mini parser to let users specify more than one color (especially for color schemes feature, or even the ability to show information on multiple colors at the same time):

Single argument
If it was a single argument (so no space allowed unless we use or implement a .split() that respects ...

regal archBOT
#

Description

Migrating the .quiz command to threads for when it is called and deleting the thread once the quiz is over.

In addition, adding more questions to some of the most played categories, such as the python category.

Reasoning

The .quiz python currently will take over the entire channel when you run it, and with the new Discord threads also supported in DPY 2.0,, the quiz command could be migrated to threads. When it is called, a new thread could be created und...

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/modmail-plugins] branch deleted: ignore\-all\-messages\-from\-the\-bot
regal archBOT
#

Relevant Issues

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

Description

  • The AoC day and star browser has been separated from the leaderboard command, from now on it's a separate command
  • The leaderboard command has a new self_placement_name option, that shows the personal stats for the specified profile name.

Did you:

odd spireBOT
regal archBOT
#

Small typo. Apart from that, very clean code, as always from you!

Maybe a minor suggestion: possibly we could make the code in _format_leaderboard a tiny bit cleaner by moving out the line formatting into a separate function. Specifically this bit:

                AOC_TABLE_TEMPLATE.format(
                     rank=rank,
                     name=f"(You) {data['name']}",
                     score=str(data["score"]),
                     stars=f"({data['star_1']}, {data[...
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

Please don't review this yet :grin:

PR body

Supersedes #623 and #506
Closes #459

This PR adds an 'Edit on GitHub' button on the top right of content articles which links to the corresponding page source URL on the site repository on GitHub. This only shows up on articles (and those with sub-articles) and not categories. Apart from that this differs to the original implementation (in #506) in that it uses the relative path URL, and replaces the prefix (/pages/ part) with t...

odd spireBOT
regal archBOT
#

e9c2bcc Send webhook embed containing information about... - Shivansh-007
a2958fb Add incidents webhook to default config template - Shivansh-007
c32aee3 Send multiple webhook messages in case of more ... - Shivansh-007
7c4fdba Use MessageConverter to find messages - Shivansh-007
d521273 Use str() when checking for message.content - Shivansh-007

oak estuaryBOT
odd spireBOT
regal archBOT
#

In #1446 we made the bot unfurl and message links found in reported incidents. This sends a webhook with details on the message referenced.

This is incredibly useful, especially for people on Android, where Discord links are completely broken.

I would like to request that this feature is extended to at least all staff channels, with the option to whitelist additional channels/categories if needed.

As a brief spec, the bot should look for Discord links in all messages in staff cha...

sullen whaleBOT
#
Sir Threadevere

Connected!

oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: ChrisLovering\-patch\-1
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: ChrisLovering\-patch\-1
oak estuaryBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: filter\-redirects
odd spireBOT
regal archBOT
#

I ran into an error when trying to archive

pythondiscord-bot-1        | 2021-11-20 17:07:28 | bot | ERROR | Unhandled exception in on_raw_reaction_add.
pythondiscord-bot-1        | Traceback (most recent call last):
pythondiscord-bot-1        |   File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 351, in _run_event
pythondiscord-bot-1        |     await coro(*args, **kwargs)
pythondiscord-bot-1        |   File "/bot/bot/exts/recruitment/talentpool/_cog.py", line 5...
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
jb3
[python-discord/workers] branch deleted: unfurl
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/modmail-plugins] New branch created: notify
#
[python-discord/modmail-plugins] branch deleted: notify
night lilyBOT
#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/bot] New branch created: disable\-file\-logs
#
[python-discord/sir-lancebot] New branch created: file\_logging
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

After a vote on discord, it appears almost no one uses file logging, except in exceptional circumstances. I changed the settings so file logging would be disabled by default, and remove the volume from the docker-compose to avoid any problems, and reduce the maintenance burden. I added an environment variable to enable it.

If someone really wants to use file logging, they still can, but it will no longer be the default, nor particularly convenient.

#
jb3
[python-discord/king-arthur] branch deleted: edit\-interaction\-message\-on\-interaction
#

Relevant Issues

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

Approved by me.

Description

Decoupled file logging from the environment variable, and moved it behind it's own variable.

See python-discord/bot#1966 for details behind this change.

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 ...
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT