#dev-contrib
1 messages ยท Page 12 of 1
Doesn't matter
i feel like bot is too ambiguous but i want it to still obviously be a pydis bot repo
pydis-bot 
is it bad i did an underscoe?
^
kk. One last thing. where is the error handler in the pydis bot? does it use a global handler?
!src error_handler
Unable to convert 'error_handler' to valid command, tag, or Cog.
!src ErrorHandler
Handles errors emitted from commands.
There's a couple other ones too, but that's the main one
oh wait pydis bot doesnt use slash commands?
No
ah
wait a minute. couldnt someone just clone it and use it for their bot?
@static canyon
If you setup all the necessary config, sure
But the bot is heavily tied to this server's structure, so that's not a very feasible thing to do
Wouldnt i need to do that so that I could test what ive made before i make a PR?
Yeah
Well
Depends on the feature
For something like the issue you want to do you don't need the server structure
But there should be a server template somewhere you can use anyway
ye but if i try running those server structure commands, wouldnt i get an error?
oh fr?
its a template of this server?
A guide to setting up and configuring Bot.
Make sure to do the configuration too -- which is also detailed on that page
kk
Oh wait there is a contributors role?
I totally forgot, what did u contribute to to get it?
ah cool. did u contribute to pydis or lancebot
whats bot core
python-discord/bot-core#1
It's basically a repo for utils across all the bots
It also has a docs website: https://bot-core.pythondiscord.com/main/index.html
i c. what utils does it focus on?
You can view the contributions I've made here (keep pressing "show more activity") https://github.com/TizzySaurus
Anything that's used across all the bots
thats cool!
My bot contributions: https://github.com/python-discord/bot/pulls?q=is%3Apr+author%3ATizzySaurus+is%3Aclosed
My lancebot contributions: https://github.com/python-discord/sir-lancebot/pulls?q=is%3Apr+author%3ATizzySaurus+is%3Aclosed
etc.
Oh, just noticed the bot repo hit 1k stars, nice!
@timid sentinel @clever wraith bot-core 9.4.0 is what added the auto-syncing of commands, it's in sir-lance's main branch but the PR will need to rebase onto main to pull that in
Yeah, it works on my machine because I had installed the beta you released back then
Alright, rebased
I need to merge it, then I'll push the changes
Done ! ๐
@timid sentinel How does this look ?
But I'm not sure what to do about that "Sending command" message that hangs there :/
Looks great ๐
Alright, thanks.
Most of the comments are addressed, except for this one
Need one more review and the eval file system should be ready to merge, if anyone has time :3 bot#2326
Not all of it is needed though
Setup what you need first
Then gradually add all the rest
You also only have to do it once, and then it's all done
๐ฆ
ye
but i just wanna code ๐ฆ
Idk how ppl enjoy doing front end
Its painful
having to make the user like it
Its more fun to make the features

ik its unrelated but idk
For what you're working on, you shouldn't even need most of the config stuff
Just set the admin role and give yourself it and you're good to go
Some cogs will fail but you only need the bookmark one
Lol even with staff testing server with a preconfigured config file its still a pain
kk
Is there a time I have to finish it by.
Nope
We're all volunteers so there's no timeline
If it's taking months then we might ask for an update etc. but generally no timeline to worry about
ah kk. cause i wanna help, but i also gotta push out updates for my bot
@vale ibex thanks for merging that PR, netlify checks were just ignoring me 
hah yea it's annoying
I need to go make dinner now, if you wanted to play whack a mole with the green button on these PRs
Two left, I think they'll need a devopser to merge
ahh yea, since I committed the extra commit my review didn't count
hitting github api ratelimits now :P
all merged down
site#847 is another dependency pr
Hi, please don't post unapproved advertising.
Ok
Are resources added to the site repo?
We don't have the python org's tutorial linked in the resources
Nevermind, found it! site#852
@timid sentinel I'm thinking of closing site#839 so that dependabot re-opens when a version with the change is released
yeah that makes sense
Hello. As I posted yesterday I'm a self taught developer who wants to contribute to open source development. I'd be happy to help with anything anyone needs. ๐
Hello! Thanks for your willingness to help. Check out some of our repos and there are issues / PRs that could use some help. See what catches your eye
Awesome. Followed the GitHub. Being honest, I'm a little intimidated. What would you recommend that I should start with that's on the simpler side on the GitHub?
@dusky shore is a fun little utility bot we have fit for beginners to dive into the OSS world
@stable mountain is a bit more complex as it runs all our mission critical infrastructure tools (like moderation and help system)
Great I'll start with Sir Lancebot first to build experience and confidence.
So, unrelated but - should be perhaps test how well slash commands could work for our community by migrating !tags to a slash command?
I think it'd be a great candidate if we use autocomplete
The current implementation is completely incompatible with slash commands, correct?
We'd have to rethink how we do tags
Not sure what you mean by that
A lot of the logic will remain the same
(All the part where you actually fetch the tag from the database / wherever, for instance)
The parsing in the error handler
There will be no need for an error handler
Discord will force you to pick only a valid tag
Only the "frontend", as it were, would really need changing
We should be able to just hook into existing functions so the test suite won't be disrupted

i think it'd be great as a test run to see how people react to it
we are falling a bit behind tbh
The current implementation doesn't have registered commands for the tags, there's just handling in an on_command_error so when you invoke an unknown command, it'll do a tag lookup.
My understanding is that with slash commands you have to have everything as a preregistered command, which means rewriting that logic
bot/exts/backend/error_handler.py lines 66 to 71
if isinstance(e, errors.CommandNotFound) and not getattr(ctx, "invoked_from_error_handler", False):
if await self.try_silence(ctx):
return
if await self.try_run_eval(ctx):
return
await self.try_get_tag(ctx) # Try to look for a tag with the command's name```
!tags [tag_group] [tag_name]
Can also use: t, tag
Show all known tags, a single tag, or run a subcommand.
Subcommands:
!tags get [tag_group] [tag_name]
If a single argument matching a group name is given, list all accessible tags from that group
!tags search <keywords>
Search inside tags' contents for tags. Allow searching for multiple keywords separated by comma.
But wasn't there something else we started doing already?
Right, but if you made !tags a command (with the current implementation) you wouldn't get auto-complete and wouldn't be able to do /f-strings etc.
Shouldn't be too difficult to update though I guess, cause all the tags are stored in the tag cog
Why not? You decide how it auto-completes, and you can use the list of tags available in the cog
Oh you mean like that
No, like that it wouldn't work
But that part can remain the same
It can also be a hybrid command
Ah, didn't know that's how it worked. I was thinking something along the lines of /tags show f-string which is more idiomatic, so to speak
Oh I see what you mean now after it was explained
I thought we just had regular commands for tags
(Why don't we, btw?)
Parsing tags in the error handler seems strange
What, don't trust me or something??
I assumed it was just so we didn't have to register individual commands per tag
Oh no my peanut brain just didn't understand lol
I don't see why not
Unlike slash commands text commands don't have a limit
Just as dynamic
Someone has to make each one
It'd just be a giant series of duplicate commands changing nothing but the file name
!d discord.ext.commands.Bot.add_command
add_command(command, /)```
Adds a [`Command`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command") into the internal list of commands.
This is usually not called, instead the [`command()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.GroupMixin.command "discord.ext.commands.GroupMixin.command") or [`group()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.GroupMixin.group "discord.ext.commands.GroupMixin.group") shortcut decorators are used instead.
Changed in version 1.4: Raise [`CommandRegistrationError`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.CommandRegistrationError "discord.ext.commands.CommandRegistrationError") instead of generic [`ClientException`](https://discordpy.readthedocs.io/en/latest/api.html#discord.ClientException "discord.ClientException")
Changed in version 2.0: `command` parameter is now positional-only.
Sure, but we still have to create separate commands
Yeah just for loop over each tag
.add_command it
Easy as that
The parsing will then be done in the callback which we pass into add_command
Feels more idiomatic
we fuzzy match tags
so if a command isn't found, but a tag with a close name is, the tag is output
with a slash command, we could have /tag <tag_name> and fuzzy match the suggestion/autocomplete
Yeah I think that's what we want. For users to type what they think the tag should be and pick from the autocomplete options
Sir Lancebot's minesweeper is broken. In dms it says I should use command in #sir-lancebot-playground, in the channel it says I'm not allowed to do it. I played its minesweeper a few months ago without problem
Oh, I scrolled and it was more than "a few months" when I last played. It was in August 2021... So something between now and then broke the command.
Hey @sharp crag, your review on https://github.com/python-discord/bot/pull/2341 was addressed, could you check it out? ๐
hey, thanks for bringing it up ๐ I think it's the same issue as in https://github.com/python-discord/sir-lancebot/issues/1003
Will take a look once I'm home. Not getting those notifs for some reason. Thanks for the heads up!
Yep. It was after midnight for me, so I didn't look at github and just posted about it here.
It seems the error is over a year old ๐ฎ
For some reason a few threads opened between 00:00 and 01:00 UTC yesterday weren't closed. Might be a bug: #1065787709236457502 message
Bot seems to have been getting a bunch of 503's from discord around that time
very likely related
Yes discord had an API outage at that time
I forgot, how do I re-run only the tests that failed?
pyproject.toml lines 72 to 73
test = "pytest -n auto --cov-report= --cov --ff"
retest = "pytest -n auto --cov-report= --cov --lf"```
looks like it ๐
--ff runs the failed test from alst run first
--lf is only the ones that failed last run
poke
if you can't that's fine just let me know ๐
Oh shoot, completely forgot. My bad :P
Doing it right now
Is there a way to run site tests inside the container? running poetry run task test gives me Command not found: task
I guess it's because the Dockerfile does --without dev
yeah that was it
@sharp crag Can I ask you to review sir-lancebot#1176 ? :B
There were some comments brought up by wookie, especially the one where the first invocation of the command hangs
Would you happen to have an idea on why that might happen ?
Thank you ! ๐
I'll take a look, thanks!
@clever wraith soooo #roles
doesn't work for some reason... I swear it worked when I tested it ๐
Yeah seems to be working for me now too
Is there still something that needs to be fixed or can we just leave it?
!e
class MyClass:
var: int
def __init__(self, var: int) -> None:
self.var = var
cls1 = MyClass(10)
cls2 = MyClass(20)
print(f"{cls1.var}")
print(f"{cls2.var}")
@sharp crag :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 10
002 | 20
This seems to be expected hehaviour
hmmm
Doesn't look like any state is being mutated across instances
very weird
also TIL, it works different from how I remember
I remembered self.var would just refer to the class attr
As opposed to the newly-set instance attribute?
!e
class A:
a = 0
a = A()
print(a.a)
A.a = 1
print(a.a)
@cold island :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0
002 | 1
But apparently setting a.a will make it stop using A's value
That is expected, isn't it?
didn't remember the last part
The latter set variable would overwrite the previous one
I guess....?
Sort of weird behaviour if you ask me
Though this behaviour still seems to be constrained within the instance itself
I don't believe it should affect other instances
It seems to work and stop working intermittently
Do you have access to logs?
well now it just out and out failed lol
(tried removing lovefest role btw)
waited too long?
that's fine, it's set to expire after a few minutes
Looks to be working fine again
I suppose just leave it be and keep a close eye on logs
Not sure what the deal is there
I don't see any logs in the code that would be useful here
Should we PR some in? Just to debug the issue
try again adding/removing a role with the same view?
Works like a charm. Added and removed all 3 roles once
Seems to be working fine now
Wish I could repro it again
alright, let's just leave it at that for now
I don't even know if it's still a problem, might have just resolved it after a restart
With that being said.. if anyone comes across that bug do let us know :P
Wait so what was the issue that was happening?
For some reason it told us that we weren't the owners of the interaction (on the ephemeral message), but it only happened once each
Not my PR but would like to see this get merged. It's been around for a while now https://github.com/python-discord/bot/pull/2326 Anyone have time to look at this?
I might be able to later this week, although I don't know much about snekbox's API
Thanks. I do not think this will require much knowledge of the API as this is mostly focused on the "front end", but certainly feel free to ask if you need context on the API changes.
hallo, can i ask something about python project or we have other room discussion? Sorry i newbie in here
Hello!
Are you talking about the Python bot project?
If yes, then sure, this is the channel to do that (and all of our other open source projects)
If it's about a project of yours python written in python, you can use #1035199133436354600 for that!
Does bot not have access to messages in closed posts ?
It's either that, or I'm doing something wrong in my bookmark command here
#sir-lancebot-playground message
This is more of an issue for the d.py library not really our bots, since we just use a very thin wrapper
!docs discord.ext.commands.MessageConverter
class discord.ext.commands.MessageConverter(*args, **kwargs)```
Converts to a [`discord.Message`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Message "discord.Message").
New in version 1.1.
The lookup strategy is as follows (in order)...
I wonder if there's a workaround, it's a shame to not be able to do this
I'll have a look
We could use a partial message converter instead, so if the message isn't in the cache we still send the bookmark, just without the message text
Shall I open an issue for this one and yoink it?
Is anyone implementing bot#2360, or can I start making it?
Seems like it's not assigned to anyone, so you could state that you're interested into implementing it, and someone will assign you !
Yea sure
Already done
!d csv.DictWriter
class csv.DictWriter(f, fieldnames, restval='', extrasaction='raise', dialect='excel', *args, **kwds)```
The first paragraph is too long, and it only splits at tags that are directly under the description's tag
maybe it should truncate
for truncation
it was remade from simple truncation because it butchered the Markdown at the end, but it falls short in these cases
Did it work for you mina?
yup works great
Because we've had some issues the first time as we rolled it out
But now it seems to be fine
Still no idea what's the deal with that
But if it ain't broke don't fix it
dumb question, but is this logic actually correct?
https://github.com/python-discord/bot/blob/main/bot/exts/info/doc/_parsing.py#L159
it uses the html length rather than the markdown length for the length checks, hopefully html is always as long or longer, but still a bit off
bot/exts/info/doc/_parsing.py line 159
if rendered_length + element_length < max_length:```
I think the text attribute is without any markup, so it's for the length of the text that'd actually be shown to the user
if so won't applying the markup violate the length constraint then?
or is the limit lax enough that you have a bunch of margin?
it will intentionally violate the length constraint as it's just for the text the user sees and there technically could be a lot of markdown, but it also does a hard truncation if it wouldn't fit into the embed (like it did above, with only basic checks for markdown)
is this hard truncation also susceptible to break markdown?
I assume yes, otherwise just doing the hard truncation would work
I think it tries something basic to not be too horrible if it has to use it, but yes. IIRC the intention behind breaking at the tags was also to keep the context instead of cutting off at the start of some sentence etc.
Though if it cuts off the whole thing then it's not really better. I briefly looked into recursing into the tags but then there are tags for random formatting that aren't particularly relevant and probably didn't have much time at the time so it didn't go anywhere
Ahahahaha yeah it was strange, I even asked some friends of mine to test it and they had no issues with it on this server
Huh. Color me confused then
Same! :B
Anyone available to look over bot#2388
Hey @clever wraith !
@midnight jasper actually brought up a decent point here: <#python-discussion message>
Is there a reason that I'm not aware of why we didn't go with select menus over buttons?
(I'm not asking we change it right now, but just curious)
Thanks!
Connecting with this, I could implement that if you need, and I could make a PR ๐
Hey hey!
I wouldn't say there's a particular reason, no.
It has been brought up in the issue itself and we said let's keep it as is for now, but if someone else thinks it's a better idea to use drop-down then let's open up an issue and discuss it there
!remind 4h review new tag
Your reminder will arrive on <t:1674729614:F>!
Here's your reminder: review new tag
[Jump back to when you created the reminder](#dev-contrib message)
does a select menu support showing whether the role is already assigned to you or not IE if you're removing/adding the role, or if it's "locked" and can't be assigned?
If it does, seems fine to me as a suggestion, I'd like to see a demo though
This channel is for Python Discord project discussions. If you need help you can ask in #1035199133436354600
We don't allow recruitment on this server
Ok
@vale ibex Yo, what is devops?
A field of engineering primarily concerned with the deployment, management, monitoring, and updating of codebases
join us!!
Our devoops people are the ones responsible for actually keeping things running
Embrace the devoops!!
๐ถ
Keeping what running.
Oh, sorry, ๐ค
Everything
They manage our k8s stack
Whats that
Kubernetes
Pydis bot, lancebot, metrics, site, and the whole lotta infrastructure we have
Maintains the hosting and the deployments for the bots yeah, but also the databases and the reporting services and the website and other assorted stuff
It's all connected and runs smoothly thanks to devops
Isnt lancebot what u have projet lead for?
Nah
Or is that transferring to the .md
Im responsible for making common tags in @stable mountain now
The main chunk of the project is done
i c
then u will return back to a regular helper ๐ญ

I am looking for a few hands on that part, let me know if you're interested ๐
Totally! I'd love to help out.
Thanks! Let me put together some info and put out an official call for volunteers here
Kk. Also, seemed like Chris likes the idea of the select. Would it be fine if I worked on that as well?
Let's make an issue first
And then I got a preview for him?
๐
I'd hate to walk all over Bellaluma's work like that unless the replacement has those details mentioned
true 
Do make an issue first for discussions
If it's approved I or another staff member will assign you
๐ gotcha. keep me updated with that and ur project!
@odd hill Updated the PR according to your review, and added some details. Whenever you are free you can review it again.
Well that's annoying, I added this line just for safety but now test coverage complains there are no cases where it's False
So coverage encourages me to write worse code ๐
When contributing to @dusky shore, are you allowed to use UI's like buttons?
Yes of course, we already have those
Like the bookmark command
Alright, thanks! Do you know if there's any like page-system but with buttons already made? Like the one in the help command but with buttons.
Not that I recall.
We rely on the Paginator class to do that for us with the use of reactions
Anyone else have input on bot#2388
Seems a bit lengthy to me
Yeah, I tried to slim it a little but it didn't really give the effect I wanted to
example: #bot-commands message
i don't think it's horribly long, but it could definitely cover a screen
On mobile you have to scroll a little bit, which may be a problem
yeah, it wouldn't be nice if it floods the chat
perhaps collapsing the code blocks into one might do some good? not sure how much that'd hurt understandability.
I'll shrink it as much as I can without taking vital parts out, once im home
Your reminder will arrive on <t:1674860100:F>!
There's quite a bit of rewording that can be done here
The information looks good, but there are sentences which don't help relay it and can be removed
@bleak temple
Here's your reminder: shrink pr
[Jump back to when you created the reminder](#dev-contrib message)
Did some minimization commits with the limited time I had, looks better size when I tested it in an embed.
I can try and do some more tomorrow if you still have concerns
This might make the tag a bit too long, but a codeblock like this showing how to correctly use them could also help:
# Correct:
# Using in-place `list.sort()`
list_to_sort = [3, 1, 2]
list_to_sort.sort()
print(list_to_sort)
# Using out-of-place `sorted()`
unsorted_list = [3, 1, 2]
sorted_list = sorted(unsorted_list)
print(sorted_list)
Is there a specific way to make it print the response like that? https://github.com/python-discord/site/blob/main/pydis_site/apps/api/viewsets/bot/role.py#L18-L26
pydis_site/apps/api/viewsets/bot/role.py lines 18 to 26
>>> [
... {
... 'id': 267628507062992896,
... 'name': "Admins",
... 'colour': 1337,
... 'permissions': 8,
... 'position': 1
... }
... ]```
json.dumps(obj, indent=4)?
And where do the >>> and ... come from? it looks like a repl, but a repl doesn't print like that
I guess I could print it and then paste it back and copy
That's just formatting supported by DRF
It doesn't really have an automatic tool afaik
Your IDE may be able to automatically add them for you, otherwise you could probably just do it with multi-cursor
def fmt(obj):
print(">>>" + "\n".join("... "+l for l in json.dumps(obj, indent=4).split("\n"))[3:])
one step ahead ๐
lol ty
I wanted to take it one step above though and replace subsequent list elements with ...
ah lol
def fmt_lists(obj):
if isinstance(obj, list):
if len(obj) > 1:
return [fmt_lists(obj[0]), "replaceme"]
elif len(obj) == 1:
return [fmt_lists(obj[0])]
return []
if isinstance(obj, dict):
new_dict = {}
for key, value in obj.items():
new_dict[key] = fmt_lists(value)
return new_dict
return obj
def fmt(obj):
print(">>>" + "\n".join("... "+l for l in json.dumps(fmt_lists(obj), indent=4).replace('"replaceme"', "...").split("\n"))[3:])
Something like this I guess
some good website to draw a database scheme?
Are you asking for one?
I'm partial to PyCharm. The database features in the pro version includes a visual generator, which fills out all the details automatically, and can export into various formats, including Mermaid, which GitHub markup supports directly
What does declarative look like in this context?
A lot like mermaid now that you mention it
Table A {
โฆ
}
Ref A > B
โฆ
Then it renders it for you
icic
@cold island
Big ouf!
Kudos for the work already, I'll need to sit-down for this one ahahah
Can we have some sort of a "fallback converter" to discord messages ?
Meaning, we first try to resolve a message by using a MessageConverter, and if that fails, we try with a PartialMessageConverter
Isn't that the union of those two?
Then that means the partial converter failed as well
Whereas when I used the partial one by itself, I got an instance of PartialMessage
Ahaha, nope
What
AH, WAIT
I think i know what happened
Let me verify
Ok so the issue was that I had used it on 2 different threads
by mistake
An old one, which isn't in cache anymore --> That's normal
And a new one, that's cached
Which is why I got contradicting results
That's a shame
Because sir lance doesn't bm messages in old threads, which aren't cached
We thought that a PartialMEssage covnerter would solve it
But, apparently not
So we either keep it the way it is (e.g. not possible), or we fetch that message, but that's an API call so idk if we want to do that
I don't mind, it's not very spam-able, and most use cases won't require it
Alrighty then, I'll file a PR for it
doesn't MessageConverter already fetch the message if necessary?
Yes, but it needs to be able to resolve the channel first
But if that fails (like what's happening in my case), it'll throw
So it won't reach the code that fetches the message
Hmm, it seems like a fair argument that discord.py should change MessageConverter to try and fetch the channel if it wasn't found.
True
!remind 1h open dpy issue
Your reminder will arrive on <t:1675001149:F>!
Done, let's see if Danny approves it
Here's your reminder: open dpy issue
[Jump back to when you created the reminder](#dev-contrib message)
I'm having a problem with the GitHub website on Firefox. Hovering over links to issues or account pictures shows a box with more information, but that box gets "stuck" as being shown for a while after I stop hovering over it. Is anyone else experiencing this issue?
Yep
Thanks. Tried searching for it but I found it difficult to phrase, so I came up short.
Yeah same
@vocal prairie Resolved all your requested changes feel free to rereview the PR (bot#2388)
bot#2326 needs one more review if anyone has time, you'll need to use the https://github.com/python-discord/snekbox/tree/bytes-output branch if you want to test the interaction with the snekbox backend
feel free to ping me for questions on getting it running correctly
๐ฅบ If someone can review this I will trade for reviews
https://github.com/python-discord/sir-robin/pull/77
Hellooo. Well, I was conversating with the rust addict ||Robin|| and we both agree that even though migrating to app_commands isn't a big priority, migrating to them for tags is beneficial. Right now I can lay out one ground point: When referencing tags, it is easy to forget what the tag is called, even if you know just two letters. The autocomplete can refresh your memory, and that will help us help others more easily.
Another point which is helpful to be considered is helping members learn new things! With autocomplete, the will see many new tags they haven't seen before. In bot commands, they can try them out, and learn and research the new things they learn. I know that just that feature alone would have a real impact on the learning of others here.
I get what you're saying - but I think by "helping members learn you things" you probably mean more "increasing discover-ability of tags"
Currently users would have to go into #bot-commands , and type in !help tags or whatever the command is (even I don't remember the exact command, lol)
Even before that, they'd have to !help first and realize that we even have a tags command.
I think a /tags and then being able to see all the tags we have and fuzzy filtering as you type would be pretty helpful
I mean aren't they synonimous?
Depends on how one looks at it
It helps people find new tags to learn new things. I think it would be rlly helpful to migrate that command.
^ the one limit is 25 autocomplete.
ยป pathlib
ยป pep8
ยป positional-keyword
ยป precedence
ยป print-return
ยป quotes
ยป range-len
ยป regex
ยป relative-path
ยป repl
ยป return
ยป return-gif
ยป return-jif
ยป round
ยป scope
uh robin. that command didnt work.
it gave me interaction failed
!tags help
I mean, this only shows 14 at a time and you'd have to use the clunky reaction pagination
mhm
We could still use a /tags show subcommand to display this same embed
Is there anyone who can review / merge bot#2388
I don't believe anyone disagrees with you. I also thing having a slash command for tags would be good too.
are there any things pending with snekbox that need help? i was interested in helping implement File IO but I never got around to that and it seems like Ionite has that covered.
I see. So, do you need someone to get started on that project if migrating that command to an app_command?
It's the usual process of create an issue with the proposal, get it approved and then start working on it
Not sure if the issue has been made already though
python-discord/bot#2362
that issue doesn't seem to be specific to tags
I'd recommend keeping the scope much smaller. We wouldn't want to review a 8k line review to migrate all commands to slash commands.
Fair
So if someone wants to work on moving something to slash commands, make a specific issue that proposes an implementation, and we can discuss it until we're at a point that a suitable implementation is found, then someone can start working on it.
also, would you have an answer for this?
Yes, we limit rewrites to 7k
lol
The bot PR is still open I believe, and we always welcome reviews
snekbox#159
bot#2326
Should we keep track of all the individual commands being migrated in bot#2362
literally christmas
Why?
We're not migrating all commands to slash commands
so each change can be dealt with as individual enhancements
Ah, I see, makes sense
Gotcha ๐
I helped
What does that say about me?
Both of us live sad lives
Oh wait
That was @humble leaf
I read "Robin" and assumed @sharp crag
Hey that brain I ordered you -- Give it back
No takebacksies 

Ill make the issue
Do I need to layout my issue any way? @sharp crag
I don't believe we have a standard issue template
so this is fine? Migrating !tag to a slash command. Allowing for autocomplete, and a subcommand /tag help listing all tags.
Sounds alright
Also, I forgot. Can u have a group and make a main command of that group. so have /tag and also /tag help
Not sure on that
Anyone available to review / merge bot#2388 
Any fancy developers want to merge a one line typo that's already got it's approvals?
sir-lancebot#1202
Yeah just waiting on some help in reviewing bot#2326, (the snekbox side PR is already ready for merge). You can ping me if you need info on getting snekbox built to test it with bot. (the actual diff is not as scary as it looks, mostly just moving snekbox.py to a submodule folder along with the new component files)
Essentially you need to use the snekbox from this branch https://github.com/python-discord/snekbox/tree/bytes-output
If you have both repos in one root folder, you can just make this change in bot/docker-compose.yml to use the local snekbox
repos
|- snekbox
|- bot
snekbox-311:
<< : *logging
<< : *restart_policy
- image: ghcr.io/python-discord/snekbox:3.11-dev
+ build:
+ context: ../snekbox
+ dockerfile: Dockerfile
Then if you run bot it should just work. You can write / read files in !eval, or save files in the output folder for the bot to upload it back.
Monsieur @vale ibex, your comments for bot#2323 have been addressed ๐
And @sharp crag, sir-lancebot#1176 is still waiting for you.
Wookie & I have had noticed that the command hangs the first time and you can see it hang while displaying "Sending command", but I don't reproduce anymore
Thanks !
I'd appreciate some help in #1071806229623623852 from y'all who have been coding on @stable mountain (since the part i need help with is similar to a solution implemented in python's src code)
Sounds good. Will see what I can do.
Also I had another idea
I was thinking about the ability to run python code in different python implementations (CPython, PyPy, etc). But that does sound like something that would be a bit complicated to implement.
should be fairly straight forward, we just need to install those in the nsjail env
currently we call python3, could be anything else
ah ok
perhaps through the eval command it could be controlled through an impl arg (defaults to python3 of course)
like !e impl=IMPL
@hybrid pumice what are you trying to test?
bot autoclose message
Why? We can tell you what it is.
there was a report that it wasn't being sent.
@tired wolf How does this relate to the channel topic?
Hmm okay
I deleted your message as it's off-topic for this channel. (Unless you were interested in adding this to one of the bots in some form.)
should I make an issue for this?
sure yeah, don't see why not
will have to see what mark and devops think though
ye
python-discord/snekbox#168
we could just install pyenv on the nsjail container or something, and then send different commands for versions
currently we run 2 entire snekbox servers for 3.10 / 3.11
seems inefficient
does pyenv support other implementations?
or was that just a general suggestion for an improvement
seems like that could be part of python-discord/snekbox#158
LOOKING FOR HELP 
The #discord-bots pin migration project's specifications have been updated!
We want tags that primarily go over common pitfalls or gotchas in relation to discord.py bot development.
I'm looking for either hands to help add these tags, or more ideas on what tags we can add.
The tags themselves are quite easy, involving mostly markdown and little technical knowledge of the library.
Feel free to ping me either here or on GitHub if you want to help with anything or have ideas.
Thanks!
Link to the updated spec: https://github.com/python-discord/site/issues/695
Can I do the one on subclassing Bot?
@fossil veldt going over your snekbox bot PR, I'm wondering whether we should allow the output to be a file that users can't normally upload here
We filter text using the filtering cog, but that setup doesn't handle files
what does our current filter cover again?
it looks like we currently disallow text files as well?
that might be a common case to demonstrate write / read examples
or like zips I guess?
hmm.. this actually creates a pretty interesting issue. Once my rewrite is merged it will filter file outputs from snekbox out of the box. Which is just me assuming that snekbox output will only ever be text
So it will have to be addressed in at least one of our PRs
like filter file attachments?
mhm
It merges the antimalware cog into the main filtering cog, so sending the snekbox output message to it will cause it to also filter attachments
you could filter only the text extensions that discord will embed probably
otherwise it'd be filtering binaries like .png .jpg as well
it won't, since those are whitelisted
to be clear, it doesn't filter file contents, it filters file names (the extensions specifically)
I guess you're right that demonstrating file writing might be a common use case, but the goal of filtering snekbox output is to prevent users from bypassing our filters through eval (for example assembling the n-word without writing it explicitly). So it's a bit of a head scratcher
do we currently filter file contents?
we could add the filter to run on the content of text file extensions which discord will embed I think
though that might be expensive
Do we get the contents of the file out of snekbox?
or is it stored in some way that requires downloading it
yes, in base64 from the post
what is the file size limit?
currently the snekbox temporary volume is limited to 48MiB
on the bot side there's also a 8MiB per-file limit (which is normally the max a bot can upload), and up to 10 files
but we can technically raise it to 50MiB per-file since our server is boosted
I guess I could make an exception for specifically text files coming out of snekbox...
But I also don't want my PR to block yours...
what does it currently do?
Which sends the output to be filtered
Currently it doesn't filter attachments because the part that does that is in a separate cog
My rewrite merges that extra cog into the main one, so that means that sending the output to be filtered will filter the attachments
text files are not whitelisted, so the output will be blocked
wait which part? the link didn't have a line
oh the filter_cog.filter_snekbox_output(msg, ctx.message)?
though...
currently the attachments aren't added at the time this call is made
does that still filter the eventual attachments?
bot/exts/utils/snekbox/_cog.py lines 311 to 319
filter_triggered = await filter_cog.filter_snekbox_output(msg, ctx.message)
if filter_triggered:
response = await ctx.send("Attempt to circumvent filter detected. Moderator team has been alerted.")
else:
allowed_mentions = AllowedMentions(everyone=False, roles=False, users=[ctx.author])
view = self.build_python_version_switcher_view(job.version, ctx, job)
# Attach files if provided
files = [f.to_file() for f in result.files]```
I mean like, the files are attached after the filter call, so the ctx.message should have no attachments when the call is made
Then if we decide to filter attachments this would need an update
Like a list of file names as another argument
would it be better if it was called during the parsing files stage
currently it can show the name of files it failed to upload and such
just showing Attempt to circumvent filter detected. Moderator team has been alerted. for a user that tries to upload a example.bin seems a little confusing
The output of the function can be modified to say why it was allowed of course. Although, triggering an extension filter (in the rewrite) will send them a DM like the one in #dev-contrib message
does it also send a public message?
Not at the moment
It could do both
As in, DM and also give a reason in the snekbox output
does the new filter_snekbox_output for extensions take into account the user that invoked the eval?
not currently no
well, discord "inline" shows image attachments
but it's not a bot embed
that's ok then.. I might need to exempt it as well just in case
is there going to be some way to check the file extensions only besides the other filters
bot/exts/utils/snekbox/_cog.py lines 310 to 313
if filter_cog:
filter_triggered = await filter_cog.filter_snekbox_output(msg, ctx.message)
if filter_triggered:
response = await ctx.send("Attempt to circumvent filter detected. Moderator team has been alerted.")```
since currently it doesn't seem possible to tell that the filter was triggered due to extensions
I can make it return the blocked extensions
If you want to wait until the rewrite is merged, I can make the necessary adjustments on my end. I don't think you'll have to do any changes then. Otherwise you might need to do some work to make it work with the Antimalware cog which I'll have to overwrite anyway
where is the current filter for file extensions?
You could always help review the rewrite to speed things up ๐
Were you there?
I joined like halfway through? 
hm, ok. I went mostly over the site PR. I can do another session focusing on the bot PR
bot/exts/filtering/filtering.py line 264
ctx = FilterContext.from_message(Event.MESSAGE, msg).replace(content=snekbox_result)```
where does it check the sender of the eval here, within FilterContext.from_message?
on the next line
I think for now I can add a file extension filter using AntiMalware._get_whitelisted_file_formats(), and an inline-message regarding allowed file format, and then send the final message to filter_snekbox_output?
Won't be enough, since the on_message does a bunch of validations before calling that function
so file extension exclusions will still be able to send the eval message without those files + the allowed formats message. And any positive from filter_snekbox_output will still not send the entire message
yeah but currently it excludes bots right?
https://github.com/python-discord/bot/blob/snekbox-files/bot/exts/filters/antimalware.py#L55-L57
bot/exts/filters/antimalware.py lines 55 to 57
# Ignore webhook and bot messages
if message.webhook_id or message.author.bot:
return```
the only issue now would be there is no file extension filter for eval output
Bots, staff, specific categories
yeah I'm ok with that
Not sure what you mean here
like currently without any modifications and before the new filtering PR, the only issue is we don't have a file extension filter for eval?
it shouldn't be removing snekbox outputs since on_message excludes bots
no yeah, I'm saying that if you want to filter the attachments based on something in the AntiMalware cog, you'll still need to check for staff and categories
Generally speaking what you want is actually _get_disallowed_extensions + the validations in on_message
would staff be enough?
I don't think the other ones really apply for eval
there's just the codejam channel override but I don't see why eval restrictions should be different in codejam
I currently have this
async def _filter_files(self, ctx: Context, files: list[FileAttachment]) -> FilteredFiles:
"""Filter to restrict files to allowed extensions. Return a named tuple of allowed and blocked files lists."""
# Check if user is staff, if is, return
# Since we only care that roles exist to iterate over, check for the attr rather than a User/Member instance
if hasattr(ctx.author, "roles") and any(role.id in Filter.role_whitelist for role in ctx.author.roles):
return FilteredFiles(files, [])
# Ignore code jam channels
if getattr(ctx.channel, "category", None) and ctx.channel.category.name == JAM_CATEGORY_NAME:
return FilteredFiles(files, [])
# Get whitelisted extensions
whitelist = set(self.bot.filter_list_cache['FILE_FORMAT.True'].keys()) | TXT_LIKE_FILES
# Filter files into allowed and blocked
blocked = []
allowed = []
for file in files:
if file.suffix in whitelist:
allowed.append(file)
else:
blocked.append(file)
if blocked:
blocked_str = ", ".join(f.suffix for f in blocked)
log.info(
f"User '{ctx.author}' ({ctx.author.id}) uploaded blacklisted file(s) in eval: {blocked_str}",
extra={"attachment_list": [f.path for f in files]}
)
return FilteredFiles(allowed, blocked)
^ as a function on Snekbox(Cog)
actually maybe I'll just return a tuple of both allowed and blocked
Validations need to remain the same save for it being a bot. There's no extensions filtering on code jam team channels
lgtm
do you know of some way to bypass this if hasattr(ctx.author, "roles") and any(role.id in Filter.role_whitelist for role in ctx.author.roles): for testing purposes
oh or I guess I can remove my roles minus superuser
Yes, I think it is.
Let's not include the list of allowed extensions. We can revisit this if users give feedback about wanting that information at hand.
example with both failures due to file size and extensions
yeah I think that's sensible
so
together with successful files
That looks good. On a similar note, there is room for improvement in the future for that message to be explicit about the file name and number of files. Basically like what the file size limit error does.
we could yeah, currently it is:
# Filter file extensions
allowed, blocked = self._filter_files(ctx, result.files)
# Add notice if any files were blocked
if blocked:
msg += (
f"\nSome file(s) were not uploaded due to disallowed extensions: "
f"**{', '.join(f.suffix for f in blocked)}**"
)
But I suspect just listing the blocked extension will clue users in on which files failed. So I think it's fine as is too
We'll see what feedback we get
yeah I don't think you really need to know which file failed, unlike the size one
maybe we could add the number at least
I'll leave that up to you. I am happy with how it is.
@cold island added in https://github.com/python-discord/bot/pull/2326/commits/bebd241756cc4ec35839a3abdc20ffdf18b1b463, I'll keep hosting the bot in test server with this branch if you want to test it
really nifty stuff, amazing
Looks really nice. Can you match the wording on the last two lines though? ๐
"Failed to upload 1 file" vs "1 file was not uploaded"
hm, not sure, what would it be
I thought it would look weirder if it matched
Failed to upload 1 file (test.bin). File sizes should each not exceed 8 MiB.
Failed to upload 1 file due to disallowed extensions: .exe
maybe we can bullet point it...?
Easier to read if it's in a pattern I think. I know where to expect info such as number of files, file names, and the error
oo actually
failmail emoji maybe?
Hmm maybe
currently seems like they're referring to the same failed file though
I feel like removing the number of files for extension disallow makes it more distinctive that they're 2 separate things
Ok, then how about a warning instead: "some files had disallowed extensions and can't be uploaded:..."
Got to go, but will catch up later
kk cya
I swear the message phrasing is harder than the coding itself ๐
or everything together (stdout, successful files, failed files due to size, failed files due to extension)
as of https://github.com/python-discord/bot/pull/2326/commits/3d5fa6c3f38c2bd7fd5f79030643ab4fb438879d
How about
1 file upload (x.y) failed because its file size exceeds 8 MiB.
1 file upload failed because it has a disallowed extension: .exe
For plural
2 file uploads (a.b, c.d) failed because each file's size exceeds 8 MiB.
3 file uploads failed because they have disallowed extensions: .exe, .abc
Is that too too verbose?
I think that resolves the feedback about consistency but it's also clear that each error is for separate files
Could use a new custom emoji if you wanna be fancy
what kind ๐
I could put a
I guess
Could be like failmail but with a file icon instead of a envelope. Though if you want just failmail seems okay too
these looks good I think
Yeah, that's what I had in mind
But the :doggo: idea is cute toooo
maybe
2 file uploads (a.b, c.d) failed because each file's size exceeds 8 MiB.
3 file uploads failed because they have disallowed extensions: .exe, .abc
Maybe red is too strong of a colour or it's just me
they're from flaticon https://www.flaticon.com/free-icon/corrupt-file_4380586
so free for commercial use with attribution of the author I think?
How would we attribute? A link in our read me?
Someone in #dev-branding possibly can make something similar from scratch
The issue raised earlier is that the same file might cause both failures, and the message like the one you wrote makes it seem like there were two files. So a more generic message for extensions seems better to me here like "some files will not be uploaded for having these disallowed extensions:"
I was assuming it would not report all reasons for failure, just the first check that fails
We could do that, but I imagine that'll be a bit more annoying if it happens
Since you'll have to run it a second time to find out it was never going to work anyway
We could prioritize the extensions over something like file size if we wanted to keep it at one error per file
I'm happy with this as well. Don't have a strong opinion
@fossil veldt does it make sense to you or do you think it should say all reasons
currently it will fail on file sizes before extensions
an invalid extension-ed file over 8MiB will only show as the file size failure
since it happens earlier at the POST response where we skip parsing files with size parameters larger than the threshold
we still know the names of the files that failed due to size though, when we do the extension check
hm.. maybe we can show the total number of all failed files for any reason, then list the reasons with names?
Right, so if we wanted to only show one error per file, we could prioritize the extension message to make it clear that there's no point uploading such a file at all, instead of potentially telling them they need to make it smaller
though to be honest I suspect it's a pretty rare case anyways
you can see in the server example I even had to do chunked writing to get 8MiBs out in the time limit
oh nvm I think I was thinking of 48MiB on snekbox
8MiB is pretty easy to do with a string
I don't mind keeping the currently committed message, but if we want numbers for every error this seems the least confusing to me so far
maybe keep the some form and we'll make the extensions message scan the size-failed files as well?
hm, also, are we going to allow files with no extensions?
if not I wonder what it should say
currently does this which is a bit weird
Could be replaced with "files with no extensions" or something of that sort
That's fine by me
as a side note it looks like our current antimalware doesn't format it too nicely either
not sure if your PR will change it

slightly darker !

_
2 file uploads (a.b, c.d) failed because each file's size exceeds 8 MiB.
3 file uploads failed because they have disallowed extensions: .exe, .abc
file count limit + extension
1 failed size, 1 fail ext
single no ext
normal
single ext
mixed disallowed and no ext
yo i'm following the contrib guide
now im tryna run the bot
i installed all the dependencies with poetry
there was still some dependicies missing
like coloredlogs for example
then when i tried to run the bot
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\\Downloads\bot-main\bot-main\bot\__main__.py", line 78, in <module>
asyncio.run(main())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\\Downloads\bot-main\bot-main\bot\__main__.py", line 59, in main
redis_session=await _create_redis_session(),
File "C:\Users\\Downloads\bot-main\bot-main\bot\__main__.py", line 32, in _create_redis_session
return await redis_session.connect()
File "C:\Users\\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\async_rediscache\session.py", line 136, in connect
pool_constructor = aioredis.create_redis_pool(**self._session_kwargs)
AttributeError: module 'aioredis' has no attribute 'create_redis_pool'
It sounds like your dependencies arenโt in sync with the actual codebase, one is older than the other
Did you download and install dependencies today?
yeah
how are you running the bot?
python -m bot
The errors in that traceback doesn't sound like it's running under a poetry venv
run poetry run python -m bot instead
ill try poetry run task start
Yea that works too, it's an alias to the above command
poetry : The term 'poetry' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
did you get that error when you were running poetry install?
nah i just did python -m poetry install
now i just did python -m poetry run task start
and got a diff error
ah, installing poetry like that isn't recommended by Poetry devs.
The "proper" installation steps are on their website, which we link to at the start of the guide
hm ok
While you do that, could you post the new error
gonna need to do that in chunks
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
works too
forgot about that
Very nice. Can you send me the image file?
Thatโs good, it means you got through most of the setup process
At least with dependencies
i did docker as well
The error is due to not having the redis database running
Ah yeah
Did you update the address?
Itโs pointing to our production server address
Thatโll fix this error too
there it is
now its doing site connections
raise ResponseCodeError(response=response, response_json=response_json)
pydis_core.site_api.ResponseCodeError: Status: 401 Response: {'detail': 'Invalid token.'}
Iโm guessing that variable isnโt set either in your config
i dont know tbh
i made .env with my bot token
and im following this
i did exactly what it says
i didnt go through the hastle of setting up my own server so i just coppied the template
The guide and setup is rather tedious, but itโs a pretty complex project
Follow the bullet points Chris linked, those should resolve your connection errors
ah i see
ok i think it works now ?
no errors but that is worrying me ๐
Startup takes a few seconds, but you should be able to run commands if it worked
Try !ping
oh yeah i forgot to invite the bot
Could you paste the full output of the bot here?
all the way back to when you ran the start command
Found `config.yml` file, loading constants from it.
2023-02-09 12:01:31 | pydis_core.utils._monkey_patches | DEBUG | Patching send_typing, which should fix things breaking when Discord disables typing events. Stay safe!
2023-02-09 12:01:31 | discord.client | WARNING | PyNaCl is not installed, voice will NOT be supported
2023-02-09 12:01:32 | bot | INFO | Attempting site connection: 1/3
2023-02-09 12:09:39 | discord.ext.commands.bot | ERROR | Ignoring exception in command None
discord.ext.commands.errors.CommandNotFound: Command "ping" is not found
bot-main-web-1 | "GET /api/healthcheck HTTP/1.1" 200 15
bot-main-web-1 | "GET /api/bot/filter-lists HTTP/1.1" 200 19160
I would have expected far more output if it connected to the bot
That's strange
Could you kill the bot and start it again?
yep
when it wants to exit
nothing changed
why aint it working damn
i think its getting stuck in __main__.py
Yea, that's what it looks like
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\\Downloads\bot-main\bot-main\bot\__main__.py", line 78, in <module>
asyncio.run(main())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 636, in run_until_complete
self.run_forever()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 1868, in _run_once
event_list = self._selector.select(timeout)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\selectors.py", line 324, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\selectors.py", line 315, in _select
r, w, x = select.select(r, w, w, timeout)
KeyboardInterrupt
when i ctrl c it takes a while
before it exits
yea, that'll just be the async loop being killed
Are you familiar with running debuggers?
not quiet
The next thing I'd suggest doing is stepping through the code and seeing at what point it gets stuck
if you goto bot.py and in the setup_hook
add some log lines before/after each line, to see where it gets stuck
I am going to imagine it'll run line 73 and then get stuck in line 77
something deadlocking in there for some reason
not sure why it's effecting you and no one else though
where is load_extensions
so i can log the extensions being loaded
and see where it stops
ah
nope
there it is
now it worksi think
Nice
Yea, the firs thing that load_extensions does is wait for the guild to be available
so if the guild id isn't set correctly that'll never pass
yup makes sense
that was my issue
i just ignored this
that is a lot of configuration i must say
Yea, there is a lot of configuration with our bot and it's quite complex
Mostly because there are so many cogs that need specific information about the guild
hm i think the first thing im gonna work on is a automatic setup for local development
people that want to work on the python bot without having to go through the hastle
There is autoguild that Hemlock made that bootstraps a server for you to make it easier

wait where should I add it to use it like Emojis.name
In the config and constants.py
so I commit to config-default.yml?
Yep
are the yaml modifications reloadable with cog reload?
unfortunately not
you'll have to restart the bot
๐
I think we can merge snekbox#159 first? It's backwards compatible with our current eval
lmao #dev-log
you can dm me for details
directly, modmail won't work
lmk here before you dm tho
I'm guessing support for the gif sticker type hasn't been released to d.py yet?
i'm thinking that's not something to say in a public channel
but sure, if you want to say that
rip lol
its every single bot that runs dpy that be crashed with a single gif sticker.
can we bump to main? or monkeypatch?
Yea, pinning to a github zip is probably best for now
What's the issue with stickers?
7 bots to pin... lol
its a gateway parse error
Discord changed their format for payloads?
so the bot receives what it believes to be a gateway error and hard crashes because it made some assumptions
nah they just added gif stickers
Similar to the emoji incident a while ago? Lol
like that's not a gif
but if i were to send a gif it would error and crash every bot here
payload is the same, just dpy doesn't expect them
disnake doesn't crash on these since v2.6 which was released in october ๐
We do a lil copy pasting
no idea, hasn't been an issue for me for months as I use and maintain disnake
Mm. Are these gif stickers a new feature?
yeah
don't forget modmail lol
I'm sure discordpy will have it fixed soon enough then
Oh alrighty
https://github.com/Rapptz/discord.py/commit/24495e5505c6285f337da2d93378eb578d3e5d73 this was the commit that fixed it
seems a little weird to have a dict containing all options within the enum that contains all options
@vale ibex yknow
you don't actually have to patch the bots ahead of time
just turn off external stickers until they get patched 
it probably is just switching the toggle for the everyone role
This is a good point
just modmail honestly
true, especially with it's ~5min startup time

They just did
nice, all looks good
@gleaming jay I'm on my way home I can assist further then if you don't mind
Yep, sounds good
Give me 15
Alright, gonna go out for some lunch then in the meantime
no worries take your time
this is not a bing chilling moment
Oh well
What was your plan for how it was going to work?
What did you do 
Recontextualization
Ah yes
Big word solve problem
Excuse me while I finish writing something I should've done ages ago
Lol ๐
Feel free to request a review from me when you're done
mmmyep. Now I gotta go fix my environment since the whole shit is bonked




