#dev-log

1 messages ยท Page 86 of 1

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
#

Yeah @TizzySaurus, I have the TIMEOUT = 60.0 just below the imports and the await statement right before the class definition. Is that ok?

The TIMEOUT placement seems good, but I don't understand the seemingly random placement of the wait_for. Where it is right now won't work at all since it needs to be inside an async function -- presumably the command function or something (wherever you need the message input).

regal archBOT
#

Issues can have empty bodies, in this case GitHub doesn't include the key in the API response

Relevant Issues

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

Description

Used a .get() in order to fill in the issue body.

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 disc...
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Relevant Issues

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

Description

This is for the trivia night event, and will be the implementation of it into sir lancebot.
There are a few main commands:
.trivianight load (file)
This will load the JSON file attached as the questions for the cog to handle for when the event starts.

.trivianight start
This will begin the event (this could possibly send an embed regard...

odd spireBOT
regal archBOT
#

Description

A community costume catalogue would allow users to

  1. Look through and use a catalogue of "costumes"
  2. Rank those costumes using a simple upvote/downvote system
  3. Contribute their own costumes to the catalogue

Each "costume" would be a .png of the "costume", as well as the costume name and author

For looking through a catalogue, a simple paginator could be set up, displaying the title costume name, the costume, how many points it has. It'll also have an opti...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-6T

AttributeError: 'NoneType' object has no attribute 'replace'
  File "bot/exts/utilities/challenges.py", line 168, in main_embed
    color=MAPPING_OF_KYU[int(kata_information["rank"]["name"].replace(" kyu", ""))],
  File "bot/exts/utilities/challenges.py", line 310, in challenge
    kata_embed = self.main_embed(kata_information)
  File "discord/ext/commands/core.p...
regal archBOT
#

If you're just doing pass here, then the if statement can be removed (it's bad practice to have an empty if-statement in production).

NB: Removing will likely mean you have to edit the elif statement to be accurate and only run when you want it to. If I'm understanding the code correctly, it would become

if all((
    not language,  # would be better to do `language is None` or whatever the falsey value here is
    query,  # would be better to do `query is not None` or whateve...
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: experiments/isort
#
[python-discord/bot] New branch created: modlog\-ingore\-channels\-mods\-can't\-view
#

Preface

PLEASE DO NOT MERGE MAIN INTO THIS PR. YES THAT MEANS YOU!

This is based on top of #1815, so will need rebasing and retargeting onto main once that is merged, before merging this PR.

Description

The main purpose of this is so that we don't need to keep adding to the modlog_blacklist for every new channel we want to ignore, since it now implicitly ignores channels mods don't have read perms to.

This is done by making use of Discord.py 2.0's updated behaviour of Channel....

odd spireBOT
regal archBOT
#

What is Isort?

[PyCQA/ISORT] (https://github.com/PyCQA/isort) is a fantastic hyper configurable tool that will magically sort your imports so you don't have to care about them.

It also comes with a precommit hook. Quite an awesome tool in my opinion.

What is this PR?

This is an experiment PR, we may want to merge it, we may not want to. I set up Isort with a style that matches our current one as much as possible, and generated a quite minimal diff (https://github.com/python-discor...

odd spireBOT
regal archBOT
#

Problem

Currently, our watch channels, such as bigbrother use embed footer to display additional information about the person being watched. Due to using footer, some things don't get formatted, things such as time formatted strings, hyperlinks, etc.
Example:
image

Proposed Solution

I think simplest, and most future-proof solution would be simply moving the text from footer ...

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

Connected!

odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: solve\-bot\-1852
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: watch\-output
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-infract\-then\-dm
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
#
[python-discord/bot] branch deleted: defcon\-redirect\-fix
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
#
[python-discord/bot] branch deleted: contributing\-tag
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: custom\-logger\-class
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: fix\-pascal\-triangle\-image
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

It seems like the reason that this fails is that even though the mentions are converted to mentions: t.Iterable[Mentionable] if a user id is passed into the command, it gets converted to a User object within the iterable, which fails the isinstance(mention, discord.Member) condition.

Right, that makes sense. I guess the isinstance should be updated to isinstance(mention, (discord.User, discord.Member))?

#
[python-discord/bot] New branch created: fix\-bot\-1869
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-bot\-1869
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/quackstack] New branch created: vcokltfre/fix/misc\-fixes
#
[python-discord/quackstack] New branch created: vcokltfre/chore/remove\-flake8\-import\-order
#
[python-discord/quackstack] branch deleted: vcokltfre/chore/remove\-flake8\-import\-order
odd spireBOT
regal archBOT
#
[python-discord/quackstack] branch deleted: vcokltfre/fix/misc\-fixes
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

FWIW I think we shouldn't be stripping the tzinfo from timestamps from discord, but instead should be using arrow.utcnow() instead of datetime.utcnow() in those cases since arrow.utcnow() is aware

Would there be a difference between the two?

No functional difference with just this change, but rather since Discord.py now uses aware, it's probably better we use aware too, rather than changing Discord.py's to naive, this also encourages the use of arrow with our contribs, which has...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: ks123/bugfix/reapply\-infraction
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: experiments/isort
oak estuaryBOT
odd spireBOT
regal archBOT
#

The reason I wrote it like this is because I'm mirroring the type check handling that was added to converters.py ( #1731 ). The aliases above the condition are used as short-hands in function declarations, while here it's used to appease the type checkers in IDE's.

Whether or not it makes sense to have them together is something I'm not sure of, but it made sense to me to keep them apart for semantic reasons.

regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: ks123/bugfix/reapply\-infraction
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-help\-description\-spacing
odd spireBOT
regal archBOT
#
    @checks.has_permissions(PermissionLevel.SUPPORTER)
    @appeal_category_management.command(name="get")
    async def get_categories(self, ctx: commands.Context) -> None:
        """Get the list of appeal categories of commands for managing appeal categories."""
        await self.init_task
        category_str = ", ".join(map(str, self.appeal_categories)) if self.appeal_categories else "None"

        await ctx.send(f"Currently configured appeal categories are: {cate...
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

I am not sure which comment you are talking about. But here is my comments on that:

I would like to keep the order it is in right now or rather even move the text.count(" ") above len(lines) > 3. Because say we get a case of 3 lines 500 characters 20 words. Now, if it is less than 300 characters in the first 3 lines it would be an "extra" function running where checking the lines has already reduced the number of characters to less than 300.

Now, lets take another example, if we ha...

regal archBOT
#
[python-discord/modmail-plugins] New branch created: readme
regal archBOT
#
[python-discord/bot] branch deleted: discord\-2\.0
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Sentry Issue: BOT-1NW

TypeError: can't compare offset-naive and offset-aware datetimes
  File "discord/client.py", line 351, in _run_event
    await coro(*args, **kwargs)
  File "bot/exts/moderation/modlog.py", line 408, in on_member_join
    difference = abs(relativedelta(now, member.created_at))
  File "dateutil/relativedelta.py", line 154, in __init__
    if dt1 < dt2:

Unhandled exception...
odd spireBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: modlog\-ingore\-channels\-mods\-can't\-view
#

1a1d7c7 Ignore channels mod team can't view in modlog - ChrisLovering
db7857d Refactor: Update modlog ignore function name - ChrisLovering
457cd6e Use modlog ignore function for voice events too - ChrisLovering
2b8807b Remove unneeded config entries - ChrisLovering
432b571 Merge pull request #1871 from python-discord/mo... - ChrisLovering

oak estuaryBOT
odd spireBOT
regal archBOT
#
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-help\-description\-spacing
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: filters/dotgg\-boundary
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix\-delayed\-logs
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

857468c create a helper function to get the redis key o... - Numerlor
48b1a7b Prevent erroneous symbols from always raising s... - Numerlor
727ef75 Delete stale item counters when clearing doc cache - Numerlor
23a3e5e Raise for status to prevent parsing of invalid ... - Numerlor
662c9a6 Merge branch 'main' into doc-repetitive-outdate... - wookie184

oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/modmail-plugins] branch deleted: readme
#

This proposal is to create an endpoint to allow many duckies to be generated at once, rather than requiring a large number of requests for someone (me) who sometimes wants a large(ish) quantity of ducks at once.

How the endpoint would work

Seeded

POST /ducky/bulk
Content-Type: application/json

{
  "seeds": [
    1234,
    5678
  ]
}

Unseeded

GET /ducky/bulk?amount=5

Return value

The return value would be an array of obje...

#
[python-discord/modmail-plugins] New branch created: tagging
#
[python-discord/modmail-plugins] branch deleted: configurable\-appeal\-categories
#
[python-discord/modmail-plugins] branch deleted: add\-ping\-manager
#
[python-discord/sir-lancebot] New branch created: issue\-command\-fixes
#

Snekbox is pretty cool, we could use it to run a bunch of cool commands. https://github.com/python-discord/snekbox/pull/108 allows us to pass in custom arguments, so we should be able to do things like python -m black -c "code" fairly easily. An example of this is the timeit command https://github.com/python-discord/bot/pull/1602

We could use this to create a bunch of utility commands to run useful python command line tools (each tool would need to be tested to ensure it works under snek...

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

Black

I think this would be great to have in snekbox, and with a specific command, so that we can make code readable when helping. That said, I'm not sure how widely useful it would be in the server (not that I'm saying we shouldn't add this at all, I personally would love this). Perhaps if we're adding black we should also add autopep8 to get a more to-PEP8 formatter for those who aren't fond of black's style.

MyPy

With the new type hinting channel I think this would be a ...

#
[python-discord/sir-lancebot] branch deleted: issue\-command\-fixes
#
[python-discord/bot] New branch created: fix\-attr\-error
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: fix\-issue\-898
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: mbaruh\-patch\-1
#
[python-discord/site] branch deleted: mbaruh\-patch\-1
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: new\-ban\-appeals\-process
#
[python-discord/bot] branch deleted: new\-appeals\-process
#

3846da7 Direct users to the appeals server when banned - ChrisLovering
a958852 Update infraction DM tests to reflect new output - ChrisLovering
0231712 Merge branch 'main' into new-appeals-process - ChrisLovering
81754e6 Merge pull request #1844 from python-discord/ne... - Akarys42

odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
#

All of these sound fine to add.

Maybe a good idea to do like the help channels cog and have multiple files, one for each major part

Most of the implementation here is made up of minor changes (snekbox: adding the module to the module list if it isnโ€™t already there, testing. bot: any wrappers, call the API), it probably wouldnโ€™t make sense to break it up into multiple PRs or files, as I imagine there will be overlap in a majority of the work.

#
[python-discord/modmail-plugins] New branch created: don't\-ping\-off\-duty\-mods
#
[python-discord/modmail-plugins] branch deleted: tagging
odd spireBOT
regal archBOT
#
[python-discord/modmail-plugins] branch deleted: don't\-ping\-off\-duty\-mods
#
  • ./pydis_site/apps/resources/resources/tools/ides/thonny.yaml:1: specifically
  • ./pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md:115: considered
  • ./pydis_site/apps/content/resources/guides/pydis-guides/contributing/issues.md:59 labels
  • ./pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md:99: recommend
  • ./pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md:111: particularly
  • `./pydis_site/apps/...
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-files\-being\-sent\-in\-webhooks
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: fix\-tests\-on\-windows
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: Add\-border\-around\-bat
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-guild\-attr\-error
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
#

I'm fairly sure separated is the only correct spelling, and google seems to agree (although now that i've stared at both spellings for a bit of course they both look weird ๐Ÿ˜„ )

Haha 'label' looked soo like 'lah-belle' for me yesterday.

I use seperated if I don't have spellcheck on because in american accent the 'per' has more curl to it than e.g. in australian accent... generally.

Guess I'll fix those 'seperated's then.

odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: ks123/bugfix/server\-guild\-icon
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Description

Everything works fine when spinning up a fresh new workspace with gitpod. This is because the init part in .gitpod.yml is run.

However, on workspace restarts (such as closing the tab and then reopening that workspace after some time), poetry install would show ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv. for every single package.

Steps to Reproduce

  1. Click the open in gitpod button in the README (or just...
regal archBOT
#
[python-discord/modmail-plugins] New branch created: ignore\-all\-messages\-from\-the\-bot
#

If we only ever have a templates key (no other base-level keys exist) then it's probably better to change the structure of this JSON file to be list[dict[str, str | list[str]]] rather than dict[str, list[dict[str, str | list[str]]]] (make the json file a list of templates rather than a json file where the sole key gives the list of templates).

This would also mean changing some code with what you do after loading the JSON into python (since will already be a list of templates now...

regal archBOT
#

Well, that is actually exactly what I want, for filtered_blanks because if it is True, then I want to just continue. If it's False, then I want to throw an error embed. What I want my program to do is I want the user to be able to enter .madlibs and then a range of numbers between 5 and 15, ex. .madlibs 5 7.
The point of filtered_blanks is to make sure that the arguments that the user entered are valid. Does that make sense?

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

Connected!

regal archBOT
#

Description

.dictionary command for sir-lance bot, This would be going to give the word's definition
Using Dictionary API, it's free at all

Reasoning

This will be get the quick access to the definition of new words
While chatting with others, It will definitely going to help to them who heard the word first time
Also this will improve English literacy

Additional Details

The command will get the Word's definition, its few synonymous....

#

Do we want to add maybe a few tests for these changes?

I don't know how it works test side of things so I am not sure.

There's also some conflics to be resolved @Numerlor

I don't think tags are really critical and complex enough to introduce tests for them if they're not present already.
I'm also not really planning on resolving the conflicts unless I know someone will review the PR soonish or it'll just require a merge before or after that anyway. The functionality of the...

odd spireBOT
odd spireBOT
regal archBOT
#

There's still duplicated code here, would something like this work instead? Also we should make sure to include comments on why we're doing things, so the next person who reads this code can understand it.

                # If there is a scheme (https://) in the url then `.netloc` will have the FQDN we want, otherwise it's in `.path`
                blacklisted_url = urllib.parse.urlparse(url)
                blacklisted_url = blacklisted_url.netloc or blacklisted_url.path...
regal archBOT
#
[python-discord/bot] New branch created: Migrate\-to\-socket\_event\_type
#

Discord.py 2.0 (Namely this commit https://github.com/Rapptz/discord.py/commit/e2250d402e8ad035b2653eb411c8e744cc9eb3bf) removed the socket_response event, and replaced it with the socket_event_type event, which just sends the type of event triggered on the websocket.

Since this event was removed, no socket stats were being incremented, as the event never triggered.

I have looked through the rest of the bot, and we do not use the socket_response event type anywhere else.

odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: Migrate\-to\-socket\_event\_type
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

Currently, we check people's usernames when they send a message on the server, to ensure it isn't inappropriate. I think we should actually check in member join and member update events, as people can still have their nickname be visible on server without ever sending a message. They can also update their usernames after sending a message.

If we do that, we'll also no longer need the check in the message event, just the other two. It should be a relatively straightforward swap I hope.

I...

regal archBOT
#
[python-discord/bot] New branch created: Update\-Username\-Checks
#

Closes #1891

Currently, we check people's usernames when they send a message on the server, to ensure it isn't inappropriate. To get more coverage, we should actually be checking member join and member update events, as people can still have their nickname be visible on server without ever sending a message. They can also update their usernames after sending a message.

As a consequence of doing it with these events, we no longer need to check on message too.

I have also added confusa...

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

It does go through the scheduler. So basically scheduler takes a task and timing and it would be running that task when that time has passed. Since there is no support for repetitive tasks by the scheduler yet, we would need to insert the task again once the task is finished. So it schedules the adding role task where it would add the mod role to them, then sleep until their work-time period is over and then remove the mod role from them. Once it removes the role, it would reschedule the addi...

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

Description

There would be a way to remove a bookmark. This would be useful while mistakenly creating a bookmark or if you have many of bookmarks and don't want to have them there anymore.

Reasoning

If you happen to create a bookmark for a wrong message, you could delete that bookmark. Or if you just have a old bookmark that you don't anymore need. It would keep the bookmarks clear.

Proposed Implementation

Possibly creating a tag for each bookmark, as example #4321. Wit...

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

e082596 Add handling for when message.author is a di... - TizzySaurus [b2e8bfd](https://github.com/python-discord/bot/commit/b2e8bfdc47339714ec014a13e2018e03c0931fe4) Invert isinstance check as per review - TizzySaurus [5b7d8c4](https://github.com/python-discord/bot/commit/5b7d8c41c88d3d0333f16dabd45efa770da87c82) Update log message for when author isn't disco... - TizzySaurus
5ce6017 Merge branch 'main' into fix-sentry-BOT-1N6 - TizzySaurus
e2bf284 Merge pull request #1845 from python-discord/fi... - Akarys42

#
[python-discord/bot] branch deleted: fix\-sentry\-BOT\-1N6
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

I had a bit more of a look into the string normalisation stuff, so I just want to outline my findings.

  1. Just as a note, we should definitely not use confusables.normalize on the whole string, it has... problems. For some letters it seems to have multiple possible confusable characters, and instead of choosing one, it returns a list of all the possible combinations. If somebody sent 100 ๏ผณ characters to the bot (it seems to think it could be an f or an s ๐Ÿคท), it would have tried to gene...
#
[python-discord/bot] New branch created: filters/autoban
odd spireBOT
regal archBOT
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
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: modlog\-soft\-colors
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: modlog\-soft\-colors
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: tz\_awareness
#

With the shift of the discord.py library to timezone aware datetimes, this PR changes datetimes throughout the bot to be in the UTC timezone accordingly.

This has several advantages:

  • There's no need to discard the TZ every time the datetime of a Discord object is fetched.
  • Using TZ aware datetimes reduces the likelihood of silently adding bugs into the codebase (can't compare an aware datetime with a naive one).
  • Our DB already stores datetimes in UTC, but we've been discarding the ...
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: reorder\-hacktoberfest\-commands
#

Relevant Issues

Closes #861.

Description

  • Moved all hacktoberfest commands into _cog.py
  • Moved all hacktoberfest util functions into _utils.py
  • Deleted the three hacktoberfest command files (since merged into _cog.py and _utils)
  • Migrated all hacktoberfest commands to be under the Hacktoberfest cog and .hacktoberfest command (alias .hacktober)
  • Renamed some commands (.hackstats --> .hacktoberfest stats, .hacktoberissues --> .hacktoberfest issues a...
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: modlog/correct\-color\-names
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

I'm generally not a fan of a single utils.py file with many functions and variables from different sections and topics. I know many projects do this but a single utils.py name doesn't really say much as to what kind of utility functions one would find in there (apart from them being related to Hacktoberfest in general).

Hacktober-stats has quite a lot of utility functions, prehaps we could have them in a separate file such as _hacktoberstats.py? This is just a suggestion and it's ent...

regal archBOT
regal archBOT
#

@TizzySaurus is this PR only focused on migrating the code as-is and the restructuring or are you wanting to refactor the three commands as well? Many of Jason's suggestions are on (mostly ๐Ÿ˜ƒ) copied original implementations (from #7, #46, #296, #466, #475, 047902d5, possibly more). IMO it should just copy the functions over for now plus many adjustments (which you've done) and then refactor them later in separate PRs since this is only about putting the three subcommands under a single `hackt...

night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
oak estuaryBOT
regal archBOT
#

This is a command for Sir Lancebot to send a funny gif from tenor.
There can be a cooldown on the command. The cooldown will be decided by other people, I think 5sec cooldown for the command is good.

I can alone work on this project but I just need some people to help me a bit.

Name of the command - .funny
Who is working? - Giant#5070 (Discord)
Cooldown- about 5 sec

It may take time to complete it but I will complete it for sure ๐Ÿ˜‰

#

I'm generally not a fan of a single utils.py file with many functions and variables from different sections and topics.

This was discussed extensively in #dev-contrib and the current system is what was decided on as "acceptable" by the most people. The general concept of namespacing utils to their command was strongly contested by multiple users so didn't do that in the end, albeit my original plan.

a single utils.py name doesn't really say much as to what kind of utility functions ...

#

@TizzySaurus is this PR only focused on migrating the code as-is and the restructuring or are you wanting to refactor the three commands as well? Many of Jason's suggestions are on (mostly ๐Ÿ˜ƒ) copied original implementations (from #7, #46, #296, #466, #475, 047902d, possibly more). IMO it should just copy the functions over for now plus many adjustments (which you've done) and then refactor them...

regal archBOT
#

After rethinking about it I decided it should include two types of issues:

  1. Python repo, has hacktoberfest as an issue label. Doesn't matter if it has hacktoberfest in the repo topics.
  2. Python repo, must have hacktoberfest in the issue's repo topics

This is because they accept PRs where the repo doesn't have the hacktoberfest topic but has the hacktoberfest-accepted label in the PR itself. If an issue has the hacktoberfest label (for type 1), maintainers would probably ...

oak estuaryBOT
odd spireBOT
regal archBOT
#

Description

Discord's message components and interaction based pagination would be better for the help command.

Reasoning

Since @Sir Lancebot is running on discord.py v2.0 , it would be cool and better to have help command pagination using buttons and interactions instead of reaction based pagination. It takes a little bit of extra time for the current help command session to add reaction to the embedded message, but message components can load instantly without any rate-limi...

regal archBOT
#
[python-discord/sir-lancebot] New branch created: ks123/bugfix/display\_avatar
#

Relevant Issues

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

Description

Discord.py 2.0 returns None for avatar if a user has default avatar. display_avatar returns always Asset.

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 ...
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: ks123/bugfix/display\_avatar
night lilyBOT
#
Sir Lancebot

Connected!

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

Description

Change all instances of discord.Colour.blurple() to discord.Colour.og_blurple().

Reasoning

Discord.py V2.0 changes discord.Colour.blurple to discord's new blurple colour, but we decided to stick to the og blurple for our branding. The bots should reflect this decision.

Proposed Implementation

Just a matter of updating all of occurences of discord.Colour.blurple() to discord.Colour.og_blurple()

Would you like to implement this yourself?

...

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

Hello! Thanks for the PR!

I don't think copy pasting is a good way of handling this. We won't ever think about modifying the other version when modifying one of them. I can think of two solutions, feel free to also suggest your own:

  1. Create a symlink? I don't know if this is something Git will like, or at least that will be cross-platform, but I think it is worth a try
  2. Having a special syntax in the file saying has the same content as X, which I believe should be made feasible by ht...
regal archBOT
#
[python-discord/sir-lancebot] New branch created: og\_blurple\-migration
#

Relevant Issues

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

Description

Migration from discord.Colour.blurple() to discord.Colour.og_blurple().

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 guidelines](...
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: og\_blurple\-migration
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT