#dev-contrib
1 messages · Page 102 of 1
pydis markup language when
and I always manage to mess up the indentation
YAML is evil. It's such a complicated standard than almost no one can (or wants to) correctly implement it all https://matrix.yaml.io/
yea Im probably not familiar with even half of it and its still confusing and complex to me
Many test cases you look through you'll discover something new about YAML's capabilities
idk, I used to struggle to read it
Maybe some basic subset of it.
yes, a majestic lizard
I really like the idea of relaxed json with comments & trailing commas
a well indented json looks good to me
important question: 4 or 2 spaces
I probably find it easier to read than yaml
at some point maybe me and dragory will revisit mdvml (mad dragory vcokltfre markup language) and we'll have good lists 
oh god
:)
@patent pivot continued from #bot-commands
i think it would just be in this regex?
yeah, should be as simple as adding to there
INVITE_RE = re.compile(
r"(?:discord(?:[\.,]|dot)gg|" # Could be discord.gg/
r"discord(?:[\.,]|dot)com(?:\/|slash)invite|" # or discord.com/invite/
r"discordapp(?:[\.,]|dot)com(?:\/|slash)invite|" # or discordapp.com/invite/
r"discord(?:[\.,]|dot)me|" # or discord.me
r"discord(?:[\.,]|dot)io" # or discord.io.
r")(?:[\/]|slash)" # / or 'slash'
r"([a-zA-Z0-9\-]+)", # the invite code itself
flags=re.IGNORECASE
)```
wait huh
how does r"([a-zA-Z0-9-]+)", work?
doesn't seem to get invites
yeah
ohhhhh
nvm i understand
wouldnt that match a lot of things?
Yep
it would match every word in this sentence
yes
oh wait
you need the rest of the regex
i didnt notice all of those regexes are one string
i trimmed it down to work in regex101 tho
i thought it was a list lmao
and it isn't working
Same
https://airhorn.solutions kinda is
(?:discord(?:[\.,]|dot)gg|discord(?:[\.,]|dot)com(?:\/|slash)invite|discordapp(?:[\.,]|dot)com(?:\/|slash)invite|discord(?:[\.,]|dot)me|discord(?:[\.,]|dot)io)(?:[\/]|slash)([a-zA-Z0-9\-]+)
This is just for support
damn
that is nice
yes sorry if staff get pinged for every invite i post 😂
lmk if you do
we do
i dont, but im not high role enough
ok i think i've tested the filter as much as i need
I think so.
it's better for testing to be done in a testing environment
i mostly use arm
i haven't tried to set up sir-lancebot on arm yet, i can't imagine setting up python on arm
why?
python is quite easy to set up on arm
wait
the bot or the lang?
i might be too tired to be here....
bot
but uh
setting up python was no easy feat either
NEWSFLASH: with pyenv, you don't need to build from source
did i learn that the hard way? YES
am i missing any others?
the moderators: 💢
nah that one wasn't deleted so it doesn't ping
only when its blacklisted
or
not whitelisted
we could probably try search all day for discord redirects
there are certainly more
but let's go with those for now
we can add others when there is an actual problem
That's where I got discord.co lol. Same comment.
there are certainly more than that
but we don't need to combat every possible discord domain out of the many that they own
yeah lol
we need to combat the vast majority that people might use and then when people find others and use them we update accordingly
^ No one knows most of the others
And if they do, that can be dealt with later
I know quite a few that aren't on that list
yeah, exactly
I'm frankly not sure we need a PR for this
no, I'm saying we don't need one
I'm all for some level of proactive enforcement of such rules, but this is overkill
what are they
lol
curious because i want to troll some friends 😛
please share
I think that defeats the whole point that I am making of not being overkill with our enforcement because once those are more prominent it needs implementing
ah
Yep
Nice
I used someone else's id on Lance's spookify. But it used my old pfp. (I changed it 10-20 minutes ago)
2 bugs in one lol
mhm
But probably due to the same issue.
Also, normal spookify just failed.
Lancebot started typing, then stopped.
waiting on discord to fix event dispatching here for the using the wrong pfp thing
Oh, that large guild infrastructure thing?
mhm
i had mentioned this bug on chris' PR on lance, he has mentioned this change
lol, i only had to do the typing stuff, rest all libs are already working without any breaking changes
all pkgs? should i add tick mark to yours?
Paginator
Not any breaking changes
you don't need to [WIP] the title
just mark it as a draft pr
yeah ik
@sleek steppe could get the changelog link for https://github.com/python-discord/sir-lancebot/commit/c8e18f088356fca97e668b2b34b99318724bbecd ?
i can't find it in the whats new in python3.9 changelog
and i can still see loop.run_in_executor in python3.9, here: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor
@short snow out of curiosity did you black everything while you're at it?
black formatter?
because there's like 48 files that black edits if you accidentally run it on the whole repo
that's the one that it uses i think
sir lancebot has no black formatter
then what does it format with?
pre-commit?
i mean
what formatter does pre-commit use
or does it not use any formatter
!src
just flake8
@harsh path Greetings. Will you be finishing this off, or should I hand this PR off to someone else?
lol
I updated the branch.
Oh
@tough imp beautiful PR, very in-depth.
If you know regex, this PR needs some reviews.
lel
@clever wraith is it possible for you to do this PR, or should I pass it off to another human?
!remind 30m continue reviewing bot#1028
Your reminder will arrive in 2 years and 6 months!
lmao
lmfao
well uh, guess im reviewing it in 2 and a half years :)
now i know how kutiekat feels 
Oops I didn't realise that PR was waiting for my review
!otn a m is months M is minutes

And yes, that will work because of cryllic substitution
why is the little letter the bigger time period aaaaa
I sent it to #community-meta
I think that's how it is on strftime formats https://strftime.org
A quick reference for Python's strftime formatting directives.
they're wrong
I don't like it either
yes we do
Damn that makes everything easier I should switch a bot to that
why objects.inv file does not have full data
What do you mean?
probably not
maybe it helped keep something on 1 line
yea no reason
probably just copied over including the imports
can you point out - what is "this" here?
it seems like one of those mobile things™️
Yea, It's a mobile issue with embeds
So I raised this issue long back
It was abt a rock-paper-scissor command and a toss command
I've made it but I never really understood what to do next
I made it long ago in fact
@fervent sage can i change the structure of the request a bit, to make the eye, eye_wing, etc inside colors
so i can directly put the options into the namedtuple
rather than putting them one by one
like this
and there is no option to pass options into manduck, i will open a pr for that too
next time reply, rather than reactions, i almost missed them
ok i have found batteries
yes i prefer to reply but my keyboard died which is very annoying
only put new batteries in a week ago 
ah np
https://github.com/python-discord/quackstack/pull/31/commits/f2000a7c19d88e32188c5bab3decebef8f23c812 commit pushed, is the description good?
it's generally recommended you hard wrap lines in commit messages
a common threshold is 72 chars
ends up being much easier to read than like this; and you don't risk getting an awkward soft wrap in some other interface
didn't i do that? in the commit box of pycharm if you leave a line it comes inside the 3 dots
ig, atleast that's what i noticed
it probably soft wraps in the editor
the contrib guidelines refer to this resource https://chris.beams.io/posts/git-commit/
although I personally think that limiting the summary line to 50 chars is too harsh
GitHub displays up to 72 on the summary line, so I use that.
yea same
no summary is the first line
ohk
its what you get when you browse the log in --oneline mode
so that should summarize what the commit does
yeah, so leaving a line does put it into the commit description
Ah. This is new in 3.7
ah, i didn't put any reasoning on the pr, could write it and i would update it on the PR.
How do I do that lol
just put it here, i would update it on the pr
asyncio.create_task is a higher level function, as it is more readable and it's preferred over asyncio.ensure_future
!raw #dev-contrib message
You are not allowed to use that command here. Please use the #bot-commands channel instead.
pass it off
ive pointed this issue out before, its a mobile only bug so....
Mobile doesn't like \n
strange
looks fine enough on my phone
!src guild
Returns an embed full of server information.
!guild
Created: 4 years, 3 months and 7 days ago
Voice region: europe
Features: DISCOVERABLE, BANNER, VANITY_URL, WELCOME_SCREEN_ENABLED, NEWS, ANIMATED_ICON, VIP_REGIONS, RELAY_ENABLED, PARTNERED, PREVIEW_ENABLED, INVITE_SPLASH, COMMUNITY, MEMBER_VERIFICATION_GATE_ENABLED
Roles: 79
Member status:
46137
131791
Helpers: 99
Moderators: 30
Admins: 13
Owners: 3
Contributors: 36
Category: 27
News: 11
Staff: 59
Text: 106
Voice: 11
nope android
also the reason i sent the embed here is because if ctx.channel.id in (constants.Channels.dev_contrib) 
so what will happen when 2.0 releases for discord.py?
Probably someone will make a PR to upgrade?
i cry and start over with my tutorial
that too ^
for slash commands im just gonna happily ignore them entirely :)
for now, anyhow
i prefer slash commands over webhook anyway
Why?
tldr every single reply even through a bot account has permissions to mention all members
That was just a glitch.
there is no way to turn that off from a permissions standpoint
^
it's the same as webhook permissions /shrug
dont add bots you dont trust, that should be a given
this
There is. allowed_mentions had screwed up, that was fixed.
no i mean settings wise
within server
bots can turn it off, but servers can't
yeah but they can ping everyone is still the sad part
essentially if the bot does ping everyone at this point it was intentional, so there should be no reason to worry about it
because again, why would you add bots you dont trust?
Oh that. Discord will eventually add that, but the feature is still rather new.
also if you do want to add a bot you dont trust you can just not allow the slash commands scope and all is good in the world
so while the permissions are by no means perfect yet, as long as you're being sensible I see no reason to really worry about that
i thought they already were lol
slash commands are cool
I wrote this yesterday running entirely at the EDGE it's so webscale holy smokes
I honestly like slash commands now that I have a barebones running
I use the discord-interactions.py library and it's great honestly since it's entirely webhook based and I can use flask
no d.py required~
Slash commands are nice because you don't have to make your user remember commands.
It's all listed there.
Which is wonderful UX.
ephemeral messages are golden as well
Yeah. Those are nice for seeing things like your infractions without showing anybody.
https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/evergreen/emoji.py#L106 This emoji info command type hints to Emoji, which means it can only use emojis that @dusky shore can see. Would it be fine to make a PR to make it type hint to PartialEmoji?
i saw thers a lib/framework for cf worker slash commands
wait that lib is based on flask?
No, but it is built for flask essentially. It fits in perfectly with it
yeah, that's what I'm using. https://seph.club/workers-slash
one word for both replies
neat
i feel like making a url shortener using fauna and workers because i'm not tired enough already today 
fauna is great
fauna? (btw i have mentioned your changes alec)
its a database made by some twitter engineers
if i had time i would make a sharex uploader on the edge
ah thanks
@short snow you need to edit the pydantic model as well to meet your colour changes else the schema validation will fail
could you link the pydantic docs, never worked with it
file is https://github.com/python-discord/quackstack/blob/main/src/models.py it's literally as simple as just putting the variable and it's type, i'm sure you'll understand from the file
colors: typing.Dict[PartOption, PartOption, PartOption, PartOption, PartOption]
just guessing, would it be this?
you'd probably create a new model called Colours and that would have the 5 part option variables
class Colours(BaseModel):
body: PartOption
...
# and then
class DuckRequest(BaseModel):
colors: Colours
accessories: Accessories
right, like you did for PartOption
yup
sorry about the wait, I just finished it
bump
The info command handles server-related emojis, what is the use case you're thinking about?
The emoji info command uses the attributes a PartialEmoji would have. so I don't see why not use PartialEmoji
What would be the benefit of using a PartialEmoji?
That it doesn't error on an emoji that sir-lancebot doesn't see
Right, so what I'm getting at is that you're proposing that the command should work for off-server emojis
Yeah that's what I meant
But is it possible to get off server emoji information?
On the one hand I don't really mind, on the other hand the command displays information such as how long ago the emoji was added, which I feel is there because it applies to the server's emojis
.emoji info 
!d discord.PartialEmoji
class discord.PartialEmoji```
Represents a “partial” emoji.
This model will be given in two scenarios:
• “Raw” data events such as [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add")
• Custom emoji that the bot cannot see from e.g. [`Message.reactions`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Message.reactions "discord.Message.reactions")...
The only info that embed requires is the name and id which are of course both given in the internal representation of an emoji anyway
All the time stuff can be derived from the snowflake
Yeah, then I would say yes, it would be a good enhancement.
It's ingrained to the ID
Oh and the CDN URL but that's also based on the id
That's not what I'm getting at
What then
Everything in this embed can be gained from a partial emoji object
I mean that it's interesting to know when emojis were added to the server, and I'm not sure that's interesting for off-server emojis
everything is pulled from the <(a?):name:id>
Eh, if the wording was specifically 'added' I'd probably agree, but since it's created I feel like that's just interesting to know, in the same way the age of any other snowflake is
I mean, if you're running the command you probably want the emoji info including the creation date
My enlgiush good
Once dawn finishes his changes for update to python3.9, could we get the PR to high priority and get it merged/reviewed fast, since for every change we would need to rebase and mention the changes and then get that reviewed again
Cc: @vocal wolf
I can try to finish that up tmrw.
No worries, you can finish it of at your own speed, the only major thing is testing, I don’t think there are any breaking changes in your libs
Yeah, just one thing. In the standard library, what exactly changed in 3.9?
Deprecated a lot of typing stuff mostly
You can check out the pr, I have explained it in the description (with toxic’s help)
Okie
I still need to have a final look at the python3.9 chalngelog
In case I missed out something
🙃
Uhh, I don’t see those, weird, lemme see
I saw that too
Ahh yes
Hmm, wondering how they keep duplicating, 🪄
Ahh yes, I missed out the last line while copy pasting from markdown formatter
Lol @vocal prairie no changes required for those libs, I went through their change log, they had no breaking changes
Is it normal that running docker-compose up on lancebot has taken 1100s and is still going?
Still going at 1600s.
no.
hey, @patent pivot ik its a dupe feature but it also isn't. The timed command, possible to copy to @stable mountain?
aye my command is popular 
I like this commit a lot: https://github.com/python-discord/bot/commit/6a875a0b0a6aca8dd33e711d00d5e9b92095918e

What would be useful to time on Python?
Nothing really, but it is a more "fun" command and has more ops that take longer like the image manipulation
and some commands take longer than others in sir-lancebot
That was sped up quite a but
pypi is pretty fast i thought
using the timing for web requests looks meh to me
!pypi dontimport
Yeah it's fast enough
sometimes i just wanna be able to it looks like your indentation is a bit off, see {!indent} but somehow i get the impression that invoking commands mid sentence like that wont happen lol
It was discussed a few times
nah !rules in the middle is too easy for the bot to accidentally resolve
it'd need to be more like {!command}
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
Yeah, that was just an example.
ngl i do quite like the syntax of {!timed 8bitify} in the middle of a sentence, maybe i'll make a thing for that for my own bots
Maybe would should have that for tags
It seems like a nice feature.
And maybe if people want to avoid it they can do \{!some_tag}
the backslashes won't show ({!some_tag})
aight i hate to
be the person
but that thing seems like it should be on @dusky shore
it seems odd to put it on python
because bot#1028 is handled by sir-lancebot
what bot did the repo used to use?
i mean now that its deleted but
im curious anyhow
It was a custom github app, we didn't need it in the end
but what was the name 
you're going to love this one
it's revolutionary
python-discord-bot
lol
what do you mean
https://github.com/python-discord/bot/pull/1517
This needs more reviews.
it opened a bunch of issues back in 2018 when we migrated from gitlab --> github
Why was GitLab used first?
how can you see that
¯_(ツ)_/¯
was just a choice that we made at the time lol
I'm also confused what the needs two approvals label is for
Something that needs two more approvals?
before they made the thingy they had the thongy
we were on GH and then migrated to GL after the MSFT acquisition (as many did) and then migrated back when we realised it was dope (which many also did)
lmao
that sounds
like
well, imagine if msft bought discord
what would you do?
No official announcement yet
migrate to guilded and then realize that discord was dope and then return to discord 😛
^
But they put the label before any approval happens?
Slack
we aren't using that label anymore
i can certify that python discord will never be on slack
well no duh
It's Python Discord, not Python Slack.
I can't even imagine. PySlack.
lol look at sir-lancebot#281
IRC chats...
oof
u should comment and say u duped it
and it was merged
lel
.help timed
I SWEAR WHY IS @stable mountain SO MUCH MORE FORGIVING
that's a different time command
Wdym forgiving?
you can run most of @stable mountain's commands in this channel
not @dusky shore
like
imho .issue should be allowed in every channel
.issue 281
sir-lancebot#281
issue being allowed here was (probably accidentally) reverted
i just took that screenshots
pain
sir-lancebot#684 needs an approval from a core developer
Actually I'm not sure is this change good
I'm not 100% about this one, since we had some users with some veeerrryyy bad emoji names (like using the n-word)
Do we really want to allow that? I don't think we do
Does @stable mountain catch bad emoji names?
Yep, we do get a ping
Then this is not too bad
Yeah but the bot will repeat it
Do we really want an embed with our bot saying "sadn****" (yes, it is a common emoji name)
You can make the bot say that with multiple commands
Hmm true
Aren't core dev approvals required for PRs?
Well since you should always have an issue opened, this isn't really a problem
@fervent sage custom command check tag PR merged.
(nobody saw that French word)
What French word?
Oh just noticed Xith is admin too
no wonder the list is so long now
lmfao
lol
all these BEAUTIFUL admins
I think we still have more just mods than admins? Xith and Chris might have just tipped it the other way though
!role 267629731250176001
267629731250176001
#ff9f1b
0.10 0.89 255
30
74
1342046150
3 owners, 12 admins, 15 moderators
Wait
many admins/owners are mods though
Why are they 30 mods
griff & LX, it's correct
wait ur right
Oh are you counting top level?
yea
Fair
that doesn't add up
== 30
30 people have the moderator role
lemon does not have the moderator role
31 people.
wait joe did you count the first or second moderator role
I'm not even sure who has the new role and who doesn't
some people don't have it
although i have no fucking idea if that's the old or new role
which is the main reason why i think they should be different names
We won't have both at the same time though I think
yeah you will
I don't think there is a reason why people need to know which role is which, frankly
i don't see a reason that they should have the same name
Why... does it matter to a server member if it's the new role or not? It doesn't really impact the usage
That'll screw some int e, can't wait
it looks like an oversight on the member list
or that discord is glithcing
its not normal.
But I legit wonder in which group you counted me in Joe haha
you could make them different colors even
You're the only one to raise the concern so far, and as I've mentioned we don't tend to action things based off one members, or even one staff members thoughts on a matter. We'll talk about it internally but I think it's a very minor implementation detail.
It's not like we can't edit the role later
The only thing is pinging will be complicated
You would be mod, since your highest role among "owner" "admin" and "mod" is mod
One will be pingable and one won't
Only. Lol.
#dev-contrib message
#community-meta message
Well I mean, what about internal channels where we can ping any role? Or even for admins?
Maybe like we could add a [!] or something to the on duty ones
just guess
alright, 3 people, my point still stands. we'll discuss it internally because those internally are the ones who will actually be affected by it, but still it's a small implementation detail.
you could do a few things
change name
change color (noticible)
basically the names could be same if you really don't want to change them
my main concern is them being the same
yeah, there are several ideas, we'll talk about it
cool
from a regular user pov, there is no concern to be held about the naming of the roles. it only really matters when there are situations internally, as mentioned such as pinging roles.
i mean, people keep bring it up
of 7 total instances for two moderator in the discord search 2 of them from today
now eight and three
Would it be fine to improve this code https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/halloween/spookyavatar.py? It doesn't even get the avatar of the user you mention, it gets the avatar of the person who invokes the command.
I'm not saying that people bringing it up isn't happening but bringing it up is not implying that there is something wrong. think back to when we removed the developer role or renamed metricity to dave, people asked questions there
no, but naming it Mod Team and Moderators would make sense to people
imo it won't, no
.savatar 506618674921340958
then the question switches from "why are there two moderator roles" to "what is the difference between the roles"
lol
Do the other avatar commands allow it to be called on someone else's avatar?
Well I don't see why it would take a user argument if not
I don't have that flag!
This bug had been discussed earlier though I think?
if you see at the top of the message, it has been called on a user and did show a different user
I don't think they do
I definitely remember pointing out the code that was faulty here
Probably something we would like to uniform when moving to the executors
just please consider a change because its really really weird to see two identical looking roles. I keep thinking my client is bugged.
I, in general, would only like those types of commands to be used on the user who invokes it. Like I think it would be weird for people to be in bot commands running that on other people's avatars.
well, if you notice it does both
it is called on a different user and takes that other user and shows that other user but works on the authors avatar
we'll consider it, I've made that clear, I think that the proposal of renaming it needs to add clarity, not just switch the question to something else.
Right... I'm saying that's a bit weird to be able to use it one another user's avatar.
but no matter what its a bug
This is me stating on how I think it should operate, not me stating how it currently operates
Ah in chris' PR he fixed it
sir-lancebot#594 I think
597
sir-lancebot#597
I was asking not about the spookify specifically, because I can see it's supposed to take another user. But I was curious about how our other avatar commands work, like the pride avatar. The Pride avatar one only allows it to be used on the user invoking it. Which is how I think it should be for all the avatar commands.
I feel like we should get member intents for sir-lancebot instead of relying on api calls when we need updated info on a member
Yeah, I should make an issue for that or bring it up to the devops team. It would be nice for some of the other commands to operate as they were first written
why were they turned off again?
They resulted in a lot of resource usage and on our old infra we were limited in memory. With our new infra we don't quite have those constraints, although I imagine joe will have some opinions.
okay so
there are a few reasons
a) we don't need member stuff
b) we should have a better cache than we do, but there is a bug with this server specifically that is preventing us from getting USER_UPDATE or TYPING_START
but yeah primarily because it's a resource drag and it's way more performant to not have those intents
let's head to the dev-ops channel
This is interesting bot.constants.proxy_user
it's just a hack to normalise the code when a user isn't available
saves a bunch of if not isinstance later on

good question lol
the original didn't form a real mention and didn't use display_name
To be honest you're being unnecessarily abrasive about it. Suggestions are welcome, but when we say things are still being set up and discussed, there's no reason to make such a fuss about it and push so hard against it.
Especially when it's something as minor as having two roles with the same name
but then there's a second version that came from watchchannel that's like the above
so i guess it's intentional based on the log output
not entirely sure though, but the pr didn't technically change it, it just moved it
the FetchedUser converter makes 2 calls to the api too
If it's invalid
Or I guess it's outdated
not sure what you're referring to. if it's current code, feel free to send a proper github link to the lines of code that you're referring to
the two roles of the same name are really hard to look at, i keep thinking its a discord bug...
and i wanted joe to have the other two references which are both staff
str!r 🙃
right, but I've told you several times that we'll discuss it internally. thinking it's a discord bug is... fairly solvable by just going "do mods have two roles?" and someone going "yeah they do" and then that's that.
it still bothers me, but you've said you're gonna bring it up so
i only mentioned it again cause zig mentioned me
Source for the season daemons?
It does stuff with both Lance and @stable mountain , I think?
there are no seasons on lancebot
we removed them
lancebot used to handle branding and load season specific cogs
but that sucked because we want our features to be used all year round
so we removed those locks
But now it's all cogs all year
yea
we just didn't standardise it ¯_(ツ)_/¯
Ex !src vs .src
feel free to open some PRs
🥺
let's not do an issue per command but you could also make a large issue summarising any major ones
colour aliased to color

Your converter should subclass ColourConverter which in dpy 1.7 supports rgb(a, b, c)
I'll open it to commits by contributors and you can change it
¯\_(ツ)_/¯
Yeah true who wants to be an american
Or UK either
Spell it colur
BTW do you think Lance would be hard to run on arm?
I have a x64 server that I can use if I need to but id like to run it on arm
uhhhhhhh
I wouldn't think so
depends on whether our native deps compile on arm, there likely won't be a wheel for those
Or uh
I don't know our dep tree so I couldn't tell you
What are native deps 
compiled extensions, written in C or another language
so uhhh
Yep I can probably get through that
okay so take aiodns, under the hood that uses pycares which in turn depends on c-ares
so it depends on whether stuff like cares compiles on ARM
which I'd like.... assume it does? but I've never tested it
Dependency-installation hell is right up my alley
worth looking into GH codespaces if you want a x86_64 env with a VS Code editor out of the bbox
Wut
yeah, github codespaces essentially spins you up a server and runs vscode on it, all in your browser
yep
- limited beta
- cost
I thought they rolled it out to more people, I forget
- it's lancebot
😂
uses the arm64 linux I have instead which is arguably better
The only reason I didn't want to use it is because it's fucked up with docker
I use a codespaces for most of my pydis work so I don't have to install Docker on this MacBook
.gh
I find those two commands so ironic
Issue and gh lol, we have automatic issue linking guild wide now!
Basically I have a really janky thing that I'm eventually rewriting that someone else made that runs code within docker as a safety thing and not ns_jail
Wanna go to #ot2-never-nester’s-nightmare?
I could
Is !ENV BOT_TOKEN in the yml for @stable mountain part of the yml spec?
Or is it how the constants file reads the yml file?
!src
@paper portal
Thanks for helping me on this earlier! I'm so proud of how this looks, fuckin' sick.
Wut is this about
Oh
BTW this channel is mostly about the bots and projects of this server
Oh! That's my bad!
Hey @tawdry vapor, so I've been trying to implement what you suggested with splitting the check, and am a bit unsure on how to do that. dpy takes the checks and adds them to a list to be run one by one, so I can't take the classic approach of writing a decorator that wraps the function with a try-except (at least not in a way that I can see). On the other hand I can't defer raising the exception to the override check, because I don't know if it's being used (well I can technically find out, but that's a whole other rabbit hole). At the same time a solution to this will probably mean that the two decorators need to be written in a specific order, one below the other, so I'm not sure how much of an improvement that is.
#dev-log message For this, it depends on what parser you're using. Some implement things differently.
One way would be to add a boolean attribute to the function saying whether to suppress, and then have the blacklist check check that attribute, but it's....
Yeah I forgot checks dont behave like normal decorators so forget about it
You can work around it in several ways, I'm just not sure it's worth the trouble and the underlying complexity
I'm not sure what mark was wanting there though
sir-lancebot#683 is now ready for review!
kinda made it for the lolz
For pr bot#1446
@cold island I had commented on few changes you requested, would be good if you could have a look at it once you would have some time.
@cold moon I had mentioned your requested changes, would be great if you could give it another review if you get some time off.
yeah, apologies, was preoccupied with catching up with a few other things
no worries, just thought of reminding you in case you have forgotten
@short snow @sleek steppe I've blocked your PR for now. This is the dependency hell I was talking about, and the same thing that has blocked me from bumping @stable mountain for so long. I've been personally following up with different creators for different packages, but as it stands, a lot of our dependencies do not support 3.9 yet, and we can not upgrade.
all the dependencies which are currently in use, are supported by python3.9, i have tested them.
atleast mine
Try with the docker command
Currently, at the very least pycares isn't
(and probably won't be for a long time)
pycares? we don't use that in sir lance
pycares is a dependency of aiodns
(https://pypi.org/project/aiodns/ only officially claims to support 3.7 btw)
ah, ok
Not even supporting 3.8 is really eeehhhh
hmm, how did sir lance use python3.8 then 
We need to get that Nebraska people on the work!
lol, wonder how many people get this reference
Haha
These packages are completely unmaintained though so
the question is, does docker-compose up --build work without errors from installing deps?
i can have a look in a while
👍
The assumption is it won't, since some of these packages don't publish wheels, and we don't want to have build tools in the docker image
yes, it fails on pycares, lemme see if it fails on any other deps
this is the only DNS speedup
the other speedup is brotli encoding iirc
We don’t strictly need it
But maybe let’s explore other avenues first
Someone opened an issue 11 days ago
Still waiting to see if that goes anywhere
I think we should avoid not using it really, considering aiohttp themselves highly recommend aiodns
May have wheels on some other public package index
from a glance the lib doesn't looks like it'd be incompatible with the version change
It is not, it works if you have build tools
I still need to finish mine, right? I was going to finish it up today because I'm free.
Hey @fervent sage, I am a bit late about it, although I still wanted to mention it. For the .timed feature, you opened the PR before having a core dev approve it. While it was fine here, the feature wasn’t too controversial, we would appreciate if you could make sure that the tag is added before working on it.

oop yeah
tbh probably wont do anything more on the bots for a while
my motivation to do stuff has gone from 'many' to 'im too miserable to even go outside' again as it does sometimes
there were no changes required in the deps assigned to you, so I marked it as Ready For Review.
You can still look if there are any changes which I missed out if you want to 🙂
Yikes, I know this feeling
I'll take a look at the changelogs again, but thank you!
sure, thanks!
I'd say we put a hold on all dep upgrades until we can certify there are wheels for python 3.9
I think that’s the best course of action, yeah
we're on 3.8
i thought something was 3.7
not that I know of
aiodns doesnt have an official release for 3.8 but it does have wheels for it
edit: one of its deps
The site perhaps? (nope)
!src
aiodns is only officially supported for 3.7, but there are wheels for 3.8
ah it was meta
Also worth noting that the poetry PR introduces 3.9, and more in depth than the dependency bump PR does.
whoops, wrong one >_> still waking up
aiodns does not though
This PR doesn't amend any of the CI scripts
it's stuck on 3.7
!pypi aiodns
why is that needed?
mine or your poetry one?
yours
it does, i have updated the dockerfile
that's not the only place
(The CI scripts for the github actions)
we specify versions in some of the actions scripts yeah
Tbh, probably not, but neither is getting merged because of the dep issues
at least, not yet
yeah
the five top public repos are all 3.8
yeah
tbh it's not like there's a massive hurry to update, there arent that many new features in 3.9 that are useful enough to justify rapidly trying to update now imo
should we close either one of them then? or merge the two?
Merging the two sounds like a conflict nightmare
the poetry one will remain open since it does more than just bumping a version
Sebastiaan explained in the issue that it would be nice to stay updated, and it cleans up the code a little.
it'll need to be redone to update new dependencies/documentation/etc.
Yup, but not worth the tradeoff we are discussing making
that's true, but the compromise here is that we're either going to have to bring build tools into our dockerfile or host our own wheels, which we'd need to talk about internally probably
Fwiw, I would block any changes that introduce build-tools, and I'll die on that hill if need be
Makes sense. It just depends on what you want to do.
it would, but there is no other option.
yeah, same
there is, we merge the poetry PR and then make the amendments for 3.9, then we can investigate dependency upgrades where appropriate
why? (#ot2-never-nester’s-nightmare if need be)
It’s fine here
docker image sizes 📈
Yeah, it shouldn't take too much to set up again with poetry and test again, should it.
For me, the ethos of sir-lance it is being able to contribute to it as your first OSS project
I frankly don't see the reason that all of our dependencies need to be bumped
For windows, and certain Linux distributions, build tools don’t come pre-included
And aren’t easy to install/require a lot of effort
That’s not a trade off I’m willing to make for 3.9
They aren't that hard to install on win if you follow the steps, but they certainly are huge an an obstacle to development
Makes sense. Since Lance is supposed to be easy, we shouldn't force people to set up too much.
that's basicall what i said, we merge our pr into yours with resolving the conflicts
conflcits won't be much, just update the poetry file with our deps and relock
I frankly don't see the reason that all of our dependencies need to be bumped
the reason for bumping most devs is to get python3.9 "official" support
Also same
They can be, if you're new to all of this stuff. PyDis contribution is quite the crash course.
.src
It just multiply the build time by 10 or 15
sir-lancebot#1
Speaking of build times
Anything happen with dropping ffmpeg
I think Joe was looking into that
The spookysound command stops working
One of the major upgrades this offers for us is that we can now use
list[dict[str, str]]rather than importing typing module and then doing those uglytyping.List[Typing.Dict[str, str]]annotations.
wait what does this do? help
Or maybe not lol
Dunno if we still even have it
.spookysound
.help spookysound
On main, I believe we do
Oh the command
Nvm
Yeah
I don’t think we even want to keep it tbh
But i’d be for removing ffmpeg as much as possible
Ffmpeg is huge (esp with the apt update) so i don’t mind dropping it
that's a lot of spooky
You need like 130 apt packages to install it haha
could we have the latex fix I PRed temporarily 👉 👈
@patent pivot 🏓
I don't understand
I think some people talked about not doing manual memory management
But, the other things are fine
wait, no, I definitely don't want to do that
that's for ffmpeg
Sounds about right
a pipenv -> poetry migration, 3.9 migration and dep bumps in one PR is not okay
it's just one gc.collect 😔
Wasn’t @gritty wind investigating moving latex to another process?
ok joe
yeah, that's why the temporarily
interesting
what is this even used for
staff staff staff, attention needed
since few staff are here, there is something which needs your opinion: #dev-log message
Mark was saying possibly even use normal LaTeX
for full latex we'd also have to sandbox it 😔
Will ask the mods
even I do
i had asked here earlier, and was said to keep for just in case
lemme get the link
Do we even use ffmpeg anymore
along with the voice extra of d.py
I think both can be removed
Alright, looked at the latex fixes, and I concur with everything chris is saying
Actually, I did push my changes yesterday lol
Have to figure one more thing out, but then it's just PRing it
ok i can't find it 
Anyone familiar with subprocess want to have a look at my branch? I can't quite figure out why it uses so much memory
from what i understand the memory issues are to do with it leaving dangling references that dont get garbage collected
# Convert to bytes
mem_limit *= 1E6
```smhmhmhmhmh
wait what
when did chris review the PR and why didn't i see it
Hmm, no I'm more asking why the process takes 400mb to just exist
aaaa so sorry 🙏
damn thats a lot
I'm definitely doing something wrong, but I don't know what
maybe this lol?
is that conversion incorrect
I pulled it from https://www.google.com/search?q=mb+to+bytes
It isn’t correct but that should be okay
It is importing a bunch of useless stuff
Can you try to make the subprocess only import what it needs?
oh, yeah I can try that
maybe have a separate py file just for the renderer?
Like asyncio is super heavy, d.py also is, same for hashlib..
I think it should be another file, yeah
that shouldn't be too bad
I'd also suggest setting a high nice value for that process
just to lower it's priority
I think parent processes can set the nice value of a subprocess
Ok, I still need to import discord.commands because the render function uses it
importing discord.commands imports discord as well right?
Hmmm why do you need it?
it's probably worth just raising your own error there and adding a case to the error handler
Do we need commands though, is it just using it to get to the badargument error?
since a bad argument error is the only thing requiring it
Good point
if so, just error return codes would be good enough
btw could someone explain this?
you dont need to use typing import for it anymore
you can just use the actual types
In python 3.9 you no longer need to use typing. for annotations
def test(x: list[str]) -> dict[str, str]```
i mean what was typing used for
I never have come across a use for this yet
I am probably blind but I don’t see where you need BadArgument in the if __name__ == "__main__" block
that function isn't only used in the main
it's also used directly if resource is not available

that block would currently be:
def test(x: typing.List[str]) -> typing.Dict[str, str]```


