#dev-contrib
1 messages ยท Page 104 of 1
how do i activate it?
py -m pipenv shell
ok ty
C:\Users\VIncas\Desktop\sir-lancebot>py -m pipenv shell
Loading .env environment variables...
Launching subshell in virtual environment...
Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.
(sir-lancebot-1zef5-9i) C:\Users\VIncas\Desktop\sir-lancebot>git add .
(sir-lancebot-1zef5-9i) C:\Users\VIncas\Desktop\sir-lancebot>pipenv run pre-commit
'pipenv' is not recognized as an internal or external command,
operable program or batch file.``` still unrecognized
oh, look like pipenv deps weren't installed on your pipenv shell
ok, so with your pipenv she;l active run these commands:
python -m pip install pipenv
pipenv sync --dev
pipenv run precommit
ok
that will setup your pipenv shell
thanks for helping
ok so all those commands worked
no errors
should i do git add . and then commit?
oh ok
you should be able to do pipenv run pre-commit
There's two precommit is for setting it up pre-commit is for running
you only need to do precommit once
i got some errors from my cog
but they're not really errors
its like D204 1 blank line required after class docstring
should i patch them all up right now?
Yea, those are our styling requirements
ok
fix them all up, run git add . and then run the pre-commit again
after the -> its the return type?
def join_images(imgs: list) -> Image:```
this func returns Image so i put that, dont know if its correct tho
Nice, everything passed?
yep
Loading .env environment variables...
Check for merge conflicts................................................Passed
Check Toml...........................................(no files to check)Skipped
Check Yaml...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
Flake8...................................................................Passed```
Cool! now you can commit your local code to your branch
If you do ```
git commit -m "commit title here
commit summary here
over some lines if needed"
Yea, the title should be limited to 72 characters
the summary can be as long as you like
is it enough to just say: Adding new cog - splitify?
We usually prefer a little more information that than in the commit
oh ok
The commit title could be that, but the commit should have a summary
We've got a writeup here https://pythondiscord.com/pages/contributing/contributing-guidelines/supplemental-information/#writing-good-commit-messages
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
We also link to Chris Beam's How to Write a Git Commit Message blog post too, which is some good reading
yeah im looking at it right now
i-
i think i messed it up a bit
i was trying to write from new line and i think i accidentally commited
You can always do git reset HEAD^
It just takes away the last commit
i was trying to follow this
Just don't end the quote
yeah i didnt
Check for merge conflicts................................................Passed
Check Toml...........................................(no files to check)Skipped
Check Yaml...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
Flake8...................................................................Passed
[splitify b76aef0] Adding new cog - splitify
1 file changed, 131 insertions(+)
create mode 100644 bot/exts/evergreen/splitify.py```
you see i didnt there and it still did all of this
Hmm
i could just do git commit -m "Adding new cog - splitify. Summary: Merged splitifer and a discord command for it together, added neat descriptions for each function and the discord command, fixed all the styling errors."
in 1 line i mean
That's too long for the commit title
You should try without the -m option
ok
It will open your editor for you to type a message
``` got this now
On the first line you have to put a summary (less than 50 chars), and empty line and then the extended description
Just run git commit
ok
Check for merge conflicts............................(no files to check)Skipped
Check Toml...........................................(no files to check)Skipped
Check Yaml...........................................(no files to check)Skipped
Fix End of Files.....................................(no files to check)Skipped
Trim Trailing Whitespace.............................(no files to check)Skipped
check blanket noqa...................................(no files to check)Skipped
Flake8...............................................(no files to check)Skipped
On branch splitify
nothing to commit, working tree clean```
it still ran, didnt let me write anything
.
Ah, you didn't select anything to commit
You can run git status to see what you modified
On branch splitify
nothing to commit, working tree clean```
its cuz i already committed accidentally
when i was trying to do new line
and then toxic told me to run some command, i did it, but i guess it didnt help me here
This should work ^
Right
If you want to modify the last commit message you should run git commit --amend
oh it worked
im kinda stuck here, i cant remove that first line there and dont know how to finish this off
.
That looks like vim, do you know how to use it?
Hey @short snow, I mentioned that those were still not addressed because you rerequested our reviews, I assumed that you missed it
i dont know whats vim, no
Hmm that was probably the default
I don't know git on windows enough to help you change it though, sorry
could i maybe commit with just the title and add the summary somewhere else then?
Hmm you can do git commit -m "First line" -m "extended description"
ok
it says that im working on a clean tree
i tried git reset HEAD^
and it then says: More? and i dont know what to put there
i tried putting the whole commit there but an error occurred
.
I'm confused.
gimme a min lemme send one thing.
look at that?
I just typed it
did you mean is suggesting the same thing I sent.
!help reason
whats it supposed to show btw
pretty sure its !remind edit reason command that you got suggested
currently suggestion takes whatever name matches regardless if its top level command or not which results in recommending subcommands without telling what the top command is
!source ErrorHandler
Handles errors emitted from commands.
Ah it just replaces the misspelled command with the command's name
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
Did we ever #dev-announcementsed it?
yup
Yes, you don't need any permission to leave reviews.
Just pick something you're comfortable with and have at it.
Yes
Yeah that's valid
lol
haha
do you want a suggestion?
Alright, any favorite project?
https://github.com/python-discord/bot/pull/1426 this one should work
@green oriole dont want to annoy you, but are you able to help me now?
What do you need help with?
the same thing with commiting
ah
i think i already committed it, but i didnt include the summary
its kind of a mess ngl
Hmm. Is it really worth putting a summary? Can't you just write it in the PR description?
there
Don't need to write anything
yep โ
You need to push
not staff i think
oh...
When you commit it, it gets locally saved into the git history of the project. Then you can push it to the remote where it does the same thing but also goes to the PR etc.
Because the approval doesn't actually count for the checks
git is fun!
there's before you do anything
same xd
so i have committed it alrd but i didnt put the summary in the commit, can i just push now?
there's before you do anything
then working tree edits
then index/staged changes
then commit to local repo
then push to remote
idk, some people became staff after only a few weeks 
It does count towards the checks afaik, but you're not a member of the repo so github doesn't regard them as of the same level of importance. For example if you disapproved then a member disapproval would block the PR while a non member disapproval is more of a comment
lol
sorry, organization
https://github.com/orgs/python-discord/people; a contributor is anyone who contributed to the project, even when not a member of the pydis org

i have the contributor tag on python because i made a permission change to defcon
added connect=False to disable voice channels when defcon is turned on
and connect=True when its turned off
anyone with the contributors role can leave an approving review, though github may not always green tick it
which is set in the organization defaults
.github#1
ignore this ty
I just linked it lol
i linked exact lines lol
if i have committed smth already but i didnt put the summary in the commit, can i still push now and put it in pr description?
does anyone want to add an is deleted channel attribute to metricity channels
Ah, how are reviews from people outside of the server contribs and the org regarded with the new system?
If you think the summary is necessary then you can ammend the description which will replace the old commit with a new one with an updated body, otherwise you can just push it
i tried so many ways and everything failed
I can add names there, it's just generally easier to lock it to a Discord role since I can periodically assess it. I'm very much happy to add you to that policy though.
and summary i dont think is necessary or that important since im just adding something for the first time
so there's no changes
If no one is assigned
If it's taken then someone would have commented or it would've been assigned to some user (listed at the right column)
I'm not sure there's a consensus yet on that issue
Not necessary, I was more curious about how a new contrib would be viewed by the system and core devs when merging
I'm not sure I follow, the groups that can leave an approving review are those with the discord contributors role and those in the staff team, additionally there must be at least one core developer review on top of that.
Yes. Do you want me to assign you to it?
What's your username on GitHub
Yeah, please. It seems I can't assign you to it through GH. Probably cause you've not contributed anything yet.
Yeah, your comment made your name show up in the list.
@brazen charm i pushed it
Now you can write up a PR
oh shit i pushed from the wrong github account
my god...
this was not meant for me
too many signs ive missed... ๐ญ
can i still continue right now
I was comparing it with the previous system with the bot that added tags around which seemed to count reviews from anyone for its count, with requiring reviews beyond that left to the person merging it
ahh right, yeah that was just a pure count of how many reviews there were on the PR, the new one now will only mark the check as green when the full policies are met (hence why we disabled the github feature and now go purely off the check status)
ok so i made the pr and somehow it was successful
Can the bot be overridden if you had for example 1 missing contrib/member review but multiple approvals from people outside of that?
Bypasses can be made by owners, yep
They should already be filled out if you copied the config-default.yml. The guide shows what parts need to change in order for the bot to actually be ran, like for example the site domain.
e
how long does it usually take for a pr to be checked
sir-lancebot#688
oh thats me
## Relevant Issues
<!-- List relevant issue tickets here. -->
<!-- Say "Closes #0" for issues that the PR resolves, replacing 0 with the issue number. -->
## Description
<!-- Describe how you've implemented your changes. -->
## Reasoning
<!-- Outline the reasoning for how it's been implemented. -->
## Screenshots
<!-- Remove this section if the changes don't impact anything user-facing. -->
<!-- You can add images by just copy pasting them directly in the editor. -->
## Additional Details
<!-- Delete this section if not applicable. -->
## Did you:
<!-- These are required when contributing. -->
<!-- Replace [ ] with [x] to mark items as done. -->
- [ ] Join the [**Python Discord Community**](https://discord.gg/python)?
- [ ] If dependencies have been added or updated, run `pipenv lock`?
- [ ] **Lint your code** (`pipenv run lint`)?
You don't really need anything except the trashcan in most cases
@clever wraith edit your pr to use this
Unless the PR has something to do with emojis
but it doesnt have any of those things
there are no issues, no changes or anything really
its just a description and i title that i put there
You opened an issue for that command. You added a new command to sir-lancebot.
riiiight. you have to use the template tho
so what will i put there?
And it would be useful to see screenshots for that command
oh well that i could
It should be up to date, which bits do you think are missing?
We have merged a few channels together, such as merging logs into one channel
What are you implementing? I doubt you'll need to set the modmail category
done
If the bot never uses them then it'll work fine, there are only a few channels/categories that it'll have to fetch without you explicitly doing something to create the request
You don't
Not really. Maybe just a log message
You could set up the config file, but a lot of it you wouldn't need at this point
Can't go wrong with filling it out all, but I'd probably just run the bot and add values that it errors out on
how long does it usually take for a pr to be checked
It depends on the length of the PR, and who's available
ok
usually triaged pretty quickly, then review depends significantly
triaged?
Triage in programming refers to getting things where they need to be. We do that by assigning tags and priorities
Got it. Ty
Xith is our master triager
Why were my review comments duplicated ๐ฉ
lol you should be to resolve the duplicates
@sleek steppe i cant respond to u on that pr for some reason so can i do it here?
I accidentally reloaded the page and lost all of my comments, but they reappeared.
cuz i have a lot to say
You should be able to comment on all of the review comments if you're logged in
it only says resolve convo
it let me before but didnt let me then send the reply
and after i refreshed the reply button was gone
and im logged in
@brazen charm
oh i see the reply again
No idea what it could be but responding here would lead to confusion around the discussion
A lot of PRs have only one commit when the PR is opened
The current implementation won't work
You'll need to use typing.Optional
There's a difference between default arguments and Optional
So, basically, you have multiple default arguments. So if I were to do !superstar @user breaking the rules, breaking would be the duration argument and the command will fail
https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#typing-optional Here's what typing.Optional does
The second reason it wouldn't work, is because the Expiry converter returns a datetime object, and you're defaulting to a str.
What do you mean?
Nope.
You can keep it as Optional, like this ^, and if it's None, make the duration datetime.datetime.now() + datetime.timedelta(hours=1)
like approve it or whatever you call it
You want me to approve the PR?
You didn't check if it was None
i reflected on your comments and made changes
Haven't tested it yet
can you?
It gets added automatically on two approving reviews by pydis staff
Ah that's what they were asking
ok
@gritty wind uhh, the tests are working now, i did no change, https://github.com/python-discord/bot/runs/2376723492?check_suite_focus=true#step:10:176

hey
i found both an issue and a solution
basically, not every embed on the bots are colored and this was previous pointed out
And what's the solution?
sorry got distracted
basically we replace the embed class
class Embed(discord.Embed):
def __init__(self, color=default_color_variable, **attrs):
attrs["color"] = color
super().__init__(**attrs)
discord.Embed = Embed
which makes more sense, lol
It can't be that hard to do a local search.
But why overcomplicate it?
its not overcomplicated?
it makes all embeds have a default color of the bots specific color or they need to all be changed individually
there is already a issue open for embed helper, it somewhat does this part
which bot?
Yeah ig
wait hold on a moment
https://github.com/python-discord/bot/pull/1446#pullrequestreview-638324182 Am not exactly sure how I would go upon doing this? Could someone help me out with this, maybe summarizing the process and then I could go ahead.
Like how I can check webhook embed descriptions, how can i form a message link.
https://github.com/python-discord/sir-lancebot/issues/573 this issue has been resolved, could someone close it?
I'd guess through the site as it still isn't restricted
The names shouldn't be there in the first place so I don't believe so
No don't continue
In fact the site pr can be merged
I guess we just forgot about it
Well, not yet cause the migration would fail if GitPython is currently stored like that
It may be possible to write a migration that automatically fixes that
Strictly speaking that would be the most correct approach
@tawdry vapor do you want me to lowercase it?
Sure. Not sure if I still have access to it and I'm on mobile anyway. Need to make sure all entries are correct not just that one
ok
The base url had to end in a slash too
did a check over them. only gitpython was uppercase. also checked all the base urls, they all end in /
Okay then that pr on site should be good to go
this is correct, it's based on character index, i.e. the codepoint value iirc
str.casefold is best to use for case normalisation
because a lot of people only have to deal with english, probably
i suspect anyone who's had to process something like greek or such knows of casefold well
thanks @tawdry vapor for that
it's still based on codepoint value, but on the normalised strings. So for all the standard english letters, it's as if they're all lowered
403 Forbidden
wat
Yeah good luck with that one
This is a common issue (#127) with the deprecated GitHub Packages Docker Registry (aka docker.pkg.github.com). I suggest to migrate to GitHub Container Registry instead.
i thought we already were
@tawdry vapor guess what i changed
Nothing
Guess it's an upstream issue
i think it might be caused from ghcr possibly just letting our connection go halfway through pushing a layer
maybe
!voiceverify
!site
!site
Can also use: s
Commands for getting info about our website.
Subcommands:
!site faq
Info about the site's FAQ page.
!site help
Info about the site's Getting Help page.
!site home
Info about the website itself.
!site resources
Info about the site's Resources page.
!site rules [rules]...
Provides a link to all rules or, if specified, displays specific rule(s).
!site tools
Info about the site's Tools page.
ty
!site roles
am i missing something
@vocal prairie is this not how im suppose to do it?
It only has some predefined things, it can't fetch urls from the site itself
There's nothing for the roles page.
thats a shame
You can open an issue on the bot repository if you wish.
There is https://pydis.com/roles
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
We have a bunch of short links like that
@green oriole can i get it with a command tho?
Nope, I just memorised them personally ๐
that wouldnt be hard to make if the links are as simple as that
just website + page name
and doing !site roles would be nice to get a link to that
Yep, although we have a bunch of short links that don't always point to the website like https://pydis.com/welcome
What is Python Discord?We're a large Discord community focused around the Python programming language. We believe anyone can learn to code, and are very dedi...
I guess we could have a command to look up the short code but I wouldn't find that very useful
convenience, no?
fyi https://pydis.com/.env is public and it should not be
i clicked...
I mean, I was here when Joe added it haha
damnit
I-
That's smart.
Because https://pydis.com/admin was a rickroll but I use this url to get to DJ Admin haha
clicked but recognized the link, so didn't get rickrolled
thank you, i set it up (/j)
And here I thought the admin dash was https://admin.pydis.com
I don't even know if we have an admin dashboard haha
Speaking of which, do we want all of them moved? https://github.com/python-discord/bot/issues/1473
Also what's stopping sir-lancebot#597 from being merged ๐ค
reviews
Ah
That looks like a good refactor to me tbh
@sleek steppe idk if u know but i made changes to my command if u wanna check it out
Will test later, gonna test #597 first
yea, all PRs need to be approved by at least 2 staff, with at least one of which being a core dev
Yeah I know about that part, I just thought there was a reason not much people have reviewed it 
ahhh, probably the large diff lol
I have approved your pr, or I have review still pending, lemme see
I'm not sure how many people are comfortable with executors and the like
There is no much diff, those are just cuz of transfer of the cogs
i started using one
My main question here would be if the site help command should be moved because of the concerns I mentioned in the comment
Your reminder will arrive in 1 hour and 30 minutes!
are you talking about me?
they glow in the dark...
Nope, chris' PR
oh
I'll give it a proper read through after work
.duckify
Ok yeah I have finished
they die in the light
Also a quackstack or needs another approval
Lemme get the link
Closes #26
Uses implementation of the staff PyWeek submission
Adds colors.py which contains all util functions i.e. make_color, make_duck_colors, make_man_duck_colors.
Get rid of random RGB ge...
is it the one i have commits on and cant merge 
yep
lol
Lol, Alec lost his powers on the pr
for no reason too, my commit was unneeded 
Is there a way to test quackstack ๐ค
clone the repo and docker-compose up
oh lol
yeah that's probably the easier way
Docker, slower than ๐ข
i've just got alias ucr="uvicorn main:app --port 1337 --reload" in my zshrc for convenience
i wanted to know if other people can change my code without my approval in my issue
Instead
Yes, maintainers can.
@thorny obsidian i'm here now!
People with write access should be able to make changes to your branxh
pydis org members can push commits to your pr branches if you enable that option yes
is that just owners
Hi! So, step 0: Get a github account and take a look here: https://github.com/python-discord/sir-lancebot
after discussion with my friends in #ot0-psvmโs-eternal-disapproval we decided to make .catify
He meant, after getting merged , if someone wants to edit the code, could they do that?
step 0 is completed! i have an acc already ๐
Without consulting him first
short answer: yes
You can navigate to the issues tab which is where we track feature requests and all that goodness
i'm on the tab!
You can click the "new issue" button and there should be a template you can follow to fill out
In this case the "feature" template
Can anyone just PR sir lancelot?
If there's an approved issue and you're assigned to it, yeah!
oof, i have to do proposed implementation? i have no idea how to code this tho lol
Sure anyone can at any time; doesn't mean it'll get approved 
Nope, that's only if you have an idea of what it should be implemented like if it's a complicated feature
ah i see!
Someone already made a issue
thanks a lot! i'll chat with my friends in #ot0-psvmโs-eternal-disapproval to see
Mighta been me ๐ฅด
#dev-log message donโt agree here, I think it should be put after there nickname
pfft
And we can multiple versions of the cat
Like mine is one
Should edit the userโs nickname
I like that better
prob his
@vale ibex you messed up somewhere lol
I like it where you stick it between words
Ahh yes, when I tested this wasnโt there, I think Ik why
Lemme get the link
I think this is usually caused when the file names of the attachments don't match between whats in ctx.send and the embed
!remind 90M Also, 
Your reminder will arrive in 1 hour and 30 minutes!
ok, idk why that happens
twice where
wait what pr is that
lmfao
RIP me
It needs to be M
I figured that out after.
@clever wraith in case you miss it in the issue, you are assigned to it and it's approved. Have fun~
I have to take training that is dreadfully boring, so I'm catching up on some PyDis tasks ยฏ_(ใ)_/ยฏ
Good luck getting through that training
bot#1531 needs a speedy approval too
(/s)
Oh. Thanks for the invite, it's a really cool server
i might have been there once
The best airlines on the planet โ๏ธ indeed
its not about snakes?
Snakified plane
@vale ibex
Here's your reminder: https://github.com/python-discord/bot/issues/1473.
[Jump back to when you created the reminder](#dev-contrib message)
@vale ibex
Here's your reminder: Also, .
[Jump back to when you created the reminder](#dev-contrib message)
are dbs available to use for our own features?
Are you asking if our bots have access to a database?
basically
im asking if i could make a feature that would use them
hypothetically though
yesn't
Yes, you could.
@stable mountain has a db
@viscid badge has a db
@slow bone has a db
@dusky shore does not have a db
iirc lancebot doesnt currently have a db so eh
But only Python, Modmail, and Metricity use a proper db, Sir Lancebot uses Redis I think.
damn rip
a volatile redis*
Lancebot has access to a Redis cache
lance uses redis entirely as cache rather than any sort of persistent storage
and @slow bone isn't even developed by this server
Do you have anything in mind?
however you can actually add a feature to @slow bone if you want by creating a plugin 
@slow bone uses Mongo, right?
also has there ever been a thought of making a level-like system? smth like MEE6 has
yes (context: mongo)
I think they didn't want to gamify the system.
and a good reason to not add it either
I can list 10 reasons not to add levelling 
Same
yes both lol
is it like spam inducing?
joe will just add a db restriction to give himself the most all the time
- Incentivises spam
- Low quality conversation is encouraged
- Causes people to act 'elitist' about their roles/xp
<more>
Just in general, it makes the community and conversation less organic.
yeah i get it
? (context: deleted)
also is there a topic limit, like how far from python could a feature be about
what feature do you have in mind as a baseline?
Sir Lancebot is intended as a way for people to learn how to contribute to open source repos and projects. As long as it's coded in python and it's something you want to make and will be beneficial/fun for the server, then we'll pretty much allow it.
Hah sorry @eternal owl commited before I saw your comment
@fallen patrol If you have an issue with staff behavior then contact modmail.
FWIW I copied the paginator from !otn l
btw, # This is so that output can be sorted on [0] before passed it's to the paginator, the [0] means the first index, i.e, UtcPosixTimestamp @vale ibex
line 189
Yea, that's what we sort on ๐
What do you think of So that the list can be sorted on the UtcPosixTimestamp before the message is passed to the paginator.
so that the output ..
Updated
๐
Done
thoughts on my comment?
do you have any other methods to suspend stream?
Yea, my idea was to move them to #756327105389920306 and back
alright ๐
guess thats the only way rn
maybe discord will add a feature in the future to disable stream
like server mute, etc
Yea that would be useful
won't happen easily
we are not counting on it
honestly i'd add a portion of this logic to the mute command as well
nothing wrong with speculating
The mute command just moves the user out of voice entirely
ah
@thorny obsidian we've worked out the code, could you please tell us where to submit?
code (only first prototype, probably gonna change):
@commands.command(aliases=["แแแข", "แแแขify"])
async def catify(self, ctx, *string: Optional[str]) -> None:
if string == ():
if len(ctx.author.name) > 28:
await ctx.send("Your name exceeds character limits after catification. Please change your name!")
return
else:
try:
await ctx.author.edit(nick=ctx.author.nick + " | แแแข")
except:
await ctx.author.edit(nick=ctx.author.name + " | แแแข")
return
string = " ".join(string)
print(string)
string_list = string.split()
for index, name in enumerate(string_list):
if "cat" in name:
string_list[index] = string_list[index].replace("cat", 'แแแข')
for i in range(random.randint(1, len(string_list)//3)):
# insert cat at random index
string_list.insert(random.randint(0, len(string_list)-1), "แแแข")
await ctx.channel.send(" ".join(string_list))
So the next step would be for you to fork Sir Lancebot, add in that code to your local copy, (test it and make sure it works), and then create a Pull Request to merge it back to our repository. I think we have a guide or two that can walk you through that process if you haven't done it before
yes, Kronifer had already forked it and we just did a complete test with several dozens of inputs. now we just need to merge it back, yes?
Yep, you'll need to create a pull request
Does @dusky shore have permissions to change nicknames?
I generally wouldn't want us to have the command change the nickname. I'd rather it just provide the text so someone can copy it to their nickname if they want.
Yeah, like the *duckify command
Hey could someone take a look at sir-lancebot#691
Looking
time to go bother a core dev to look at my feature proposal /s
hey @fervent sage congrats on helper
lol thanks although about 4 weeks later than expected :P
sorry :/
aaaaAAAA there were commits before I finished the review
lol sorry
I think changing the nickname on a command invoke is pretty fine imo
UX sucks to have to manually copy, especially since on iOS you can't copy text out of embeds
It won't be in an embed though, right?
Almost all Lancebot commands use embeds, so I assumed, I guess it's better if not, though still quite annoying on mobile since you can't selectively copy
Though I guess it's fine if we have no additional text
but yeah, I just think that for this it's totally fine to change nickname if we want to do that
thank you joe!!
that's just my personal take btw, not approval
so we merge now @clever wraith?
my opinion doesn't override anyone
If you think it's fine then it's probably fine. I'm just a bit weird about potentially unexpectedly changing nicknames when it's not moderation actions. It's always jarring and generally "wtf" if you don't expect it from that command
oh? would the entire mod team have to vote?
no, I'm just saying we should talk about it here
alright, but this is only modifying their own username, not others, so it should be okay right?
oh ok
For a PR to get merged at least one core dev needs to review and accept it and then one other staff/contributor
so one core dev's approval + one staff/contrib's approval = good?
yeah
is joe a core dev?
There might be some surprise, I guess, but a) it's a command invoke so it's intentional user action b) nicknames are very easy to restore
mhm, if there aren't any blocking changes requested then it can get merged in.
I am a core dev, yeah
so joe's approval + kutiekat's approval = good!
I think a bunch of the core devs are busy right now, but I'm sure one might find time to review in the next day or two
Although Toxic's comment about using display name has merit, what do we think on that?
I'll have to properly test it before I sign off on it, which I can only do on my home computer
I'm going to do a code/doc review now
i think thats okay, ive changed
i understand. thank you @patent pivot and @thorny obsidian immensely for your time!
Your reminder will arrive in 1 hour!
I think you meant 694 =P
that wasn't the feedback item that toxic meant I don't think
yep
There's one more bug
the argument shouldn't be a type of string list
fixed display name thing
?
review left
oooh, thank you for taking up that issue
Maybe I do set up Python to review that...
... in my.... *checks calendar* no spare time available
But I'll see if I can get something spun up and contribute a review there.
Even though kutie said in the issue that the default should be something like 5 or 10
Oh I have no idea. I was suggesting maybe 5 or 10 minutes but there's also logic for the default time to match the tempmute implementation
You just need 1 core dev + 1 staff/contrib approval. It just sends out the review request wide.
That isn't a lot
Are you looking to tackle more issues? =P
@clever wraith what error are you getting ๐ค? I'm curious
list_string[index] is the exact same thing as name
@clever wraith you'll need to pull the new changes locally to fix up linting
That is not at all a bad thing. At this point with Python's complexity we should be giving out cookies to people who can remove lines without impacting functionality or readability
did
cookies you say? I'll have 17 PRs by the end of the night 
I'll review that one now
oh? well ill get 20
i want the cookies
have you guys stopped hammering my database yet
oh you have
nice
Is it really optimizing anything
stress testing a system for an upcoming event
me and laundmo dosing stress testing a thing
lol
i'm gonna start up my client again 
tbf we peaked at 2.46k per second so I'll take it
I'd be happy to make a PR to lancebot that reduces a bunch of outdated code and bad type hints lol
ic we have gone up again
worst case scenario event 
Lancebot could use some spring cleaning, so go for it
alright joe, that one fix you suggested has been made
wanna collaborate on that?
That'd be cool
Then the branch could actually be on sir-lancebot's repo
would you actually be able to push to it?
Probably not
Fine my fork it is
joe am i beating laundmo again?
which PR is urs @clever wraith ?
alright
oki, add me and we can get to work making lance beautiful(er)
wait how do you have access to a prod database?
are they that bump at the beginning?
no we're the spikes at the end lol
is that a prod db?
alright joe fixed that small change let me know how it is locally
is it a prod db?
requested a small change @clever wraith
@sleek steppe which branch?
sure, I'll make a start on evergreen if you want
Sounds good
actually what's on the agenda for being fixed up, it's just general improvements right?
make sure to read the new comments @clever wraith
so missing/wrong typehints, any weird spelling, simplifying functions that are needlessly complex, that sorta thing
@fervent sage pls
Yeah that sounds right
https://github.com/python-discord/bot/pull/1532
need another review on this
I'll start with halloween
@fervent sage Do you think it'd be a good idea to change commands.Bot type hints to bot.Bot?
yes
means we get useful suggestions like bot.http_session
which i'd have quite liked earlier
https://github.com/python-discord/bot/pull/1538
need another review on this
you wont beat my query count let me start mine too
๐งน back to the proper event organizing channel!! ๐งน
they're just running queries on a db in our postgres
how did you make it take a lot of concurrent requests?
lol
just added a bunch of cats
Hmm, is it preferred to use with ctx.typing() or async with ctx.typing()
they're back at it ๐
How'd you do it so fast
smh now that laundmo's doing it again half my requests error
lmfao
at least we know we'll be able to handle the event even if it gets popular
which error are you even getting at this point because all i see is 200
lol
hey joe, which cog authenicates github requests again?
gah! boring training finally done! I can now accomplish some real work!
i'm not sure, i dont get the error content because it's getting a json decode error because its returning content type text/html for whatever reason
what do you mean
gold
trying to find the code that makes github requests with a token
p sure its in .src Issues
in either @stable mountain or @dusky shore
uhhh
l...lmao
no that edit was never needed
I don't think we have authenticated requests yet do we
well, all issue stuff is handled on lancebot
I know that much
smh ur the guy who said they were
i love how this lancebot cleanup is basically me and toxic for some reason willingly volunteering to review all of the source lmao
okay yes
listen I'm just gonna happily accept the work and provide virtual cookies
its in the issues cog but not in the github cog
which imo should be merged lmfao
Hmm I'm seeing logging.info in one place, shouldn't it be log.info?
search for logging
logging is the module and log is the Logger object
if its logging.INFO that's fine
No the function
but as a property not a method
then yes, probably
@clever wraith
Here's your reminder: check on sir-lancebot#294.
[Jump back to when you created the reminder](#dev-contrib message)
Okay
update:
I'm counting this as a success
and what we see here is cloudflare kicking me and vco out because "oh noe a DDoS"
lmfao
ah, idiots
Lmao
@vale ibex fixed the changes!
@sleek steppe do you think we should be fixing punctuation inconsistencies, for example a load of messages end with . and many dont, seemingly at random
Yeah that makes sense
ok, do we go for add . or remove it? i'm minded towards add
no, just define it below the import statements in the superstarify.py file
it should
mb, did not include it in the 2nd suggestion
looks like you have been mistaken, lol @clever wraith
in the function signature, it stays t.Optional[Expiry]
duration: t.Optional[Duration]
this should be duration: t.Optional[Expiry]
we want to user to either specify the duration or the datetime in ISO format or if they don't specify anything, the default will be duration of 1 hour
we need 2 approvals
hey @patent pivot have you had time to test the .catify locally?
I've not, I probably won't be able to anytime soon
Kat said she'd get around to it
but don't stress over it, the feature is done from your point of view for now so you can leave it in our hands and we'll review
alright great!
thanks, ill kick back and relax a bit
lol
I'm sure she will at some point or someone else on the Core team will, we are just volunteers at the end of the day
actually I can spin up a codespace for catify
@clever wraith getting errors locally
yeah
so
single words break it
e.g. .catify hello results in ```
04/19/21 22:00:45 - root DEBUG: Error Encountered: ValueError - empty range for randrange() (1, 1, 0), Command: catify, Author: joe#6000, Channel: bot-commands
04/19/21 22:00:45 - bot.exts.evergreen.error_handler ERROR: Unhandled command error: empty range for randrange() (1, 1, 0)
Traceback (most recent call last):
File "/workspaces/sir-lancebot/.venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/workspaces/sir-lancebot/bot/exts/evergreen/catify.py", line 36, in catify
for _i in range(random.randint(1, len(string_list) // 2)):
File "/opt/python/3.8.6/lib/python3.8/random.py", line 248, in randint
return self.randrange(a, b+1)
File "/opt/python/3.8.6/lib/python3.8/random.py", line 226, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (1, 1, 0)
Smart idea
@clever wraith another review left
For bot#1540, maybe a !redo command?
yeah, as well as inserting a cat at a random index, or altering the nickname
are we fine with editing the nickname?
yep
I think that for a command which is invoked by a user knowingly and providing it is documented, nickname altering is fine
a nickname is very easy to reset
This line is very sad for me ๐ https://github.com/Rapptz/discord.py/blob/master/discord/ext/commands/cog.py#L123
It hurts when I see the unused self variable
line 121 actually
staticmethods solve that
you can't use staticmethods with discord.py since the context argument must be passed
or
wait
no you can
yeah why does no one do that lol
I think it's fine without, it's really just a QoL thing and I'd rather keep things standard
it's not even QoL really
eeey nice!
I finished cleaning up halloween
only 14 files changed, 216 insertions(+), 230 deletions(-)
!guild
Created: 4 years, 3 months and 11 days ago
Voice region: europe
Features: ANIMATED_ICON, PREVIEW_ENABLED, INVITE_SPLASH, PARTNERED, VIP_REGIONS, NEWS, WELCOME_SCREEN_ENABLED, DISCOVERABLE, RELAY_ENABLED, COMMUNITY, BANNER, MEMBER_VERIFICATION_GATE_ENABLED, VANITY_URL
Roles: 79
Member status:
38951
140956
Helpers: 101
Moderation Team: 29
Admins: 15
Owners: 3
Contributors: 37
Category: 27
News: 11
Staff: 58
Text: 106
Voice: 10
which additional features are you looking for
#ot2-never-nesterโs-nightmare was dead to me
red banner and such, even after relaunching discord
no other channels in here were affected of what i looked at
ah
this is the only channel where i can view the features
figured it was worth a check since some of them mess up typing events
fyi i have not forgotten about the color command
i just
i have too many projects but i will get to the command anyhow
How close are you to finishing it lol
barely started lol
I have around 6 projects plus school
fwiw i have the logic pretty much done just haven't cloned sir-lancebot since i need to do that on an x86 server
or well
i have an x86 server i just
don't wanna go through the pain of trying on ARM
and i haven't been doing much with that server for the past week
@wide elm any reason you're commenting code instead of committing it to Kronifer's fork? Just a bit unusual is all
I can commit?
LOL
Kronifer can give you permission to commit to that branch
You wouldn't be able to review, but you probably shouldn't be reviewing your own code anyway
yeah
oh shoot i should do that
@wide elm you should be invited to be a collaborator now
bump
and bump: #dev-contrib message
ah ok
cool, i will have a look, i think i had got a fix for that locally
If I have constants inside a class, should they moved outside of the class, to the top of the file?
yes
Okay, thanks
bot#1541 , messages already stored in metricity, so should there be another table for help channel messages?
iirc message meta data is stored. This is going to be the actual content of the message, so that we can do some NLP on it
There's some privacy implementation detail that I left out of the issue, which I should add.
Added that to the issue now
hello
i have commented on the issue
metricity will not be used for this I don't think, if anything we'll put it in bot
what would "separate service" be?
we'll make one
like metricity?
ok
it'll be a brand new service, or if not then integrated into bot
maybe a basic fastapi microservice, with a psql db
the bot helpchannel system just posts to this api
๐
and we could even handle compliance at that API
so we post all data and the microservice drops it
Yea, agreed
I'm wondering if we should also store opt-out status in this other service then too
yeah, we should
Cool, I'll setup a new repo after work and get some issues together
nice
yeah a fastapi microservice would be good, would it be integrated into the site, to see the information
nah
!remind 6h fastapi fun times
Your reminder will arrive in 6 hours!
we won't build a frontend for it, since we have the internal tooling to view it and export datasets for those who need access to it
it'll be all administrators and a subset of moderators+helpers who want to work with NLP
nice, another command for working with it, or just using int e
no commands on bot should be added other than the necessary opt-in/out commands
but no, not int e
I mean internal tooling as in off discord
oh like that
how would you do some NLP on it, if you can't get it through any command?
I'll export from postgres
it doesn't need to be pulled into discord (nor do I really think it should)
won't it be easier if we pull it into discord
I don't see why
I'd much rather have fine grained control over access rather than dumping ZIP files
there is potential for this dataset to be very large
dumping zip files? i didn't get you
we could access it through an api
hmm, yeah it is gonna be fairly a big one
i get it know, keeping it off discord would be better ๐
as well as the fact that other communities use metricity
I didn't know it was infrastructure agnostic ๐
lol ya it's not loads of communities but I know of a few
My thoughts with making the dataset public is that anybody could technically scrap the help channels using a self bot, although I didn't think about it privacy wise 
cant you not make a new commit if u only change doscstring?
its saying im working on a clean tree
you can ammend to the earlier commit
but there is no way to push some change without commiting
when i try to push it says im working on a clean tree
even tho i changed the docstring
and i did do all the . git add, all those precommits and so on
did you git add and git commit before pushing?
ye ye
which editor are you working on?
ok then you can press the push button on the cross, and check if you have any commits to push
and there is a commit button where you can check which files you have added but not commited
wait how do i see my full code on github
in the issue
cuz i only see changes and conversations
the files section on the pr tab
found it
wait
can i just change it from github?
cuz its just docstrings
i have an option to edit this file
@short snow
you could, but you can't lint on github
sometimes, the extra whitespaces are left out
which are not seen on the diff
so i would recommend doing it locally
do git status
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: bot/exts/evergreen/splitify.py```
you didn't do git add <file path>
ok yeah
you forgot git commit -m "good commit message here"
Changes to be committed:
#dev-log message perfect worked now
if no one asks for anymore changes i think it could get approved
yeah, if no one has any changes, they would approve your pr
and once you get 2 approvals from staff, it can get merged
it also helps if you mention the PR in here when talking about it, so that people looking at this channel have a easy time finding it
@clever wraith since github is being a dick rn, there's `193,000` :nerd: with a space and `perfect square`:exclamation: without one
same with the `positive number`:exclamation: one
seems fine to me to have this emoji without a spaceโ
its still inconsistent
also there's a 400% chance that android's markdown rendering will break at some point soon with something like a codeblock directly next to an emoji
since it always does that stuff
consider:
193,000 ๐ค
193,000 ๐ค
perfect squareโ
perfect square โ
tbh i dont see why the perfect square needs to be in a codeblock
yep thats on purpose
because discord is being a dick on how it displays emojis
lol
