#dev-contrib
1 messages · Page 111 of 1
Why don't you use 🗑️ instead? Wouldn't it be simpler?
it's optional
people didn't like how it looked
Ok, I can honestly not see that in the instructions so unless I'm completely lost it should maybe be added?
It wasn't even an env var until recently
Because you don't need it
We are currently in a wiki freeze
so the guide can not be updated
It's not in the instructions >_>
(I struggled with this like 2 weeks ago too)
I've been contributing to lance for month, and still don't have it set
I get an emoji error or something like that, and I get no default emoji, it's just not there at all.
If you try to paginate, you'll get a warning, but pagination will still work
basically unused everywhere else
Ok
Can I request a quick review on site#476 from someone? It just add the timeline to the navbar the same way we discussed here a month or so ago
approved
Hmm I can't checkout the branch
got it
policy bot is having the same issues as me
It can't check out
Was the branch deleted?
entire fork was deleted
@patent pivot can you force merge
This seems unrelated, but the test runner gave:
Unable to parse the GitHub repository metadata from response!
Thank you both!
So for the website search, it'll have to by implemented it manually I guess.
I'd think someone made a django search plugin at some point in time
If not, we could make one, but that should probably be standalone
We moved away from Django though, right? Or does that include html/md
Well, we are moving away from django for the backend
But isn't this for the frontend?
backend being API, frontend being site
Yeah, it is. But the wiki was turned into markdown files rather than the django wiki. PR #478 I think.
oh speaking of that stuff, is the backend stuff gonna be in a separate repo or just a different folder?
separate repo
right, that should make my brain explode less 
fastapi is one of my favourite toys frameworks so i look forward to being able to help on that
~~Anyone who says fastapi is good, has never tried starlette. Fastapi is starlette ~~ - QoL
not a topic for this channel
For the search, the MD files are just static content
Isn't there a plugin to search static content?
Timeline is live now, thanks @vocal prairie
Probably, I'll take a look at some.
guys if i resolve a review on a pr will the reviewer receive a notification?
No, but they may if you pushed commits
You can leave a comment telling them you resolved it, or you can re request review once all changes are done
yep, i'll do that
this is what i did. it's what i should do, right?
ok, thank you!
Opened a fix for the ping problems
It's a small PR if someone would like to review
pipenv
localhost:8000
what about schema?
1 sec
oh I know
http
you can't do ping on localhost
you have to use pythondiscord.local
it's in the guide for hosts
switched to using etc/hosts and those entries, still getting the same issue
etc/hosts :P
huh
Works fine for me
oh yeah
don't mind the pfp
did you update your config?
yup
there's a debug log that shows pythondiscord.local resolving to 127.0.0.1 so i assume it gets resolved and then the socket is like "hang on thats localhost nop"
Not really sure what's up then
Could you
print the value of url on line
45
print(url)
that shooould be correct I think
I'll spin up a linux machine to test this on
what os are you on?
Mint 20
ubuntu 20 should be a good enough similar one that's available on things like linode
Stackoverflow:
You cannot create an ICMP packet without root privileges as it needs a raw socket which is only allowed to be created by root user. This is not a limitation of module but system.
hm
it might just be one of those things™️ that just needs to be lived with
I was today years old when i learned:
BTW, You may argue that "Oh I have ran ping with normal user millions of times". Try ls -l /bin/ping, you will see -rwsr-xr-x 1 root root, that means ping has SetUID. More information about SetUID, you can google it. In short, SetUID gives normal user root privileges when executing ping.
setuid is a magical devil
I found an issue in Lance that looks fun but may be a bit much as a first issue. Can I ask for someone to co-work on it or what’s the proper procedure?
You can ask around here, and if someone wants to work on it, you can both get assigned
You can also say as much on the issue
give me a few minutes to google how it might be done, if its not too difficult i may volunteer to help :P
I don’t know which API would be used, I’ve worked with Spotify but that may be overkill?
Anyway, it would feel good to work together with someone more experienced. :)
probably lastfm, it has a decent api which is fairly easy
Ooh, that’s sweet.
I generally only listen to Irish folk music, can be nice to broaden one’s views. 🙃☘️
oki ive taken a look and it looks fun, im happy to help out :P
you can both leave comments and I'll assign you
I think alec may actually be able to assign you both
!ping
You are not allowed to use that command here. Please use the #bot-commands channel instead.
bonk @merry ember :P
easiest thing will probably be for you to fork the repo and grant me push perms since you arent able to push to the main repo
then we can branch and begin!
Excellent! I’ll grant you right away but need to sleep soon. I see you are one hour behind so that’s nice with not a too huge TZ difference.
yeah i also have some stuff to do, so maybe we start tomorrow 
Oooh that'd be it, thanks a lot!
When sir-lancebot is sending for commands, when they don't have a signature, it has a space at the end that loks weird. Can that be changed?
@fervent sage hmmmm couldn't repro on ubuntu 20
Can you give me the exact exception?
are you in docker?
cause docker runs as root

now I have to make a user :P
@fervent sage fix pushed

.eggdecorate nonexistent-color @celest charm
Sorry, I don't know these colours: nonexistent-color @celest charm
.eggdecorate asdkfasd @celest charm
Sorry, I don't know these colours: asdkfasd @celest charm
I will add to the spring cleanup PR perhaps?
It's in another PR
I just can't remember which one
is there a 4d map for PRs?
Ah I was thinking of another bug
we should use allowed mentions how they're designed to be used and only allow the command author to be mentioned
Maybe we should treat this like SQL injection (because it hit us hard once or more), and just provide a safe method for formatting strings?
Don't really need the author either
in this case, it shouldn't ping anyone
Does discordpy's default allow every ping?
Yes
i cant remember exactly how discord.py handles it but just using allowed_mentions=AllowedMentions(users=False, roles=False, everyone=False) in the bot's constructor and explicitly allowing it where pings are needed is the correct way
AllowedMentions.none()
Having it disabled by default sounds the best if it's supported by the lib
no allowed mentions are a discord feature that means the mention still appears as a mention but no ping is actually sent
Should I proceed with the spring cleanup PR review?
or is it obsoltete/overridden/something else?
@eternal owl reddit migration will be happening soon
How can I add a comment about something which is not a change?
I only seem to be able to do that with changes
On a GitHub review?
ye
you can only comment 2 lines either side of changes
Did you test the Reddit webhook@vocal wolf
I thought @sleek steppe did
Yeah I did
@patent pivot you're going to need to shove secrets into @dusky shore once the reddit migration thing is done
same as the python ones?
yes
Not config.yaml tho, env vars this time
OK THEY'RE BOTH GREEN I'M MERGING
holding

is it those vars
yes
well, that sucks
REDDIT_CLIENT_ID REDDIT_CLIENT_ID and REDDIT_WEBHOOK but the last one is optional
uhhh
Does it feel satisfying to merge?
do i need to specify it
REDDIT_WEBHOOK has a default for prod
yes
yes
and I can remove them from Python now
obliterate them from python yes
alright, done for both
turn it into yeethon or whatever the fuck it was called
we're 
merge!

HANG ON
3.11 for that new patch
there's non transparent pixels in the corners of 
sorry 
lmfao

this is no joke tho its awful
Are the bots up
lance is alive
.reddit python
.reddit
View the top posts from various subreddits.
Subcommands:
daily [subreddit=r/Python]
Send the top posts of today from a given subreddit.
subreddits
Send a paginated embed of all the subreddits we're relaying.
top [subreddit=r/Python]
Send the top posts of all time from a given subreddit.
weekly [subreddit=r/Python]
Send the top posts of this week from a given subreddit.
.reddit daily python
Here are today's top r/python posts!
Worked 👍
Replace it with https://github.githubassets.com/images/icons/emoji/shipit.png
Oof emojis glitches on Android
But it isn't transparent 😔
Ty @vocal wolf
np
it's finally done
yes
misread as shitpit
pybot good
Now I can sleep in peace
That has dots too…
I mean obviously, we just obliterated stuff from it
Nd hopefully wake up early for my online class
very nice work @eternal owl
👍
Also
There is a pagination issue
I think we should close that
I implemented a fix for it in the PR
Oh nvm, you closed it
Is bot#1236 still relevant?
@sleek steppe i have done all the changes you asked and linted it all, would you mind re-reviewing? thank you in advance!
Same thing with bot#1120
I will take a look tmw @vocal prairie
which pr?
!remind 8h bot#1120 bot#1236
Your reminder will arrive in 8 hours!
sir-lancebot#726
https://github.com/python-discord/sir-lancebot/pull/726, they sent 7 change requests 27 mins ago and i resolved them all
will review now
thank you!
Does the github webhook delete messages automatically when a comment is deleted?
nop
bear in mind github doesnt have any knowledge of how discord works or that it supports deleting wh messages, it just sends its standard thing which discord formats
Thought so, I guess it was deleted manually 👀
im too lazy to add a github comment rn, but https://github.com/Objectivitix/sir-lancebot/blob/main/bot/exts/evergreen/trivia_quiz.py#L245-L246 will format in chat as Game is already running...do `.quiz stop`
bot/exts/evergreen/trivia_quiz.py lines 245 to 246
"Game is already running..."
f"do `{self.bot.command_prefix}quiz stop`"```
Also I can see black was ran 
actually i will add a comment just to make sure it gets resolved
black lints, no? i also manually linted just in case
black lints with it's own style
we have a different style
linting with black will just make your life harder
oh god- then what should i use?
flake8, which isn't automatic
pip install flake8?
so it will tell me all my errors which i'll then manually lint, right?
you can just do pipenv run lint iirc
(a bunch of plugins)
ohhhhh ok
ah
You can find the full style guide here
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.
Flake8 will get you most of the way
but some things you'll have to check manually
it's isn't particularly difficult though
it's a very lenient style
pipenv run lint would give 100% of the errors on lancebot since it's pre-commit
That's simply not true
def xyz(x: int,
y: int,
z: int) -> int:
return 1
Something like this does not meet the style guide, but flake8 won't flag it, since there is no check for it
Ah I thought you meant for the lint action
Yeah the lint action
nothing flags this in automatic checks
If this makes it into a PR, it has to be flagged manually by reviewers
Otherwise it will sneak in
giant review
Discord injection lol
.eggdecorate yep @sleek steppe
Sorry, I don't know these colours: yep @sleek steppe
@fervent sage there are so many issues about black, i'll resolve them all in one commit instead of multiple
that phrase sounds... a bit grim out of context 
how lol
nvm
side note could i get reviews on sir-lancebot#722 please :P
will do
I could do the allowed mentions PR
do you want a comment or a proper review?
where is it?
proper review is fine, but there isnt that much really, its just 2 cogs -> 1 cog
I meant make to make a new one because it's kinda separate to this PR
@gritty wind mind if i make the issue about the help command finding command?
ah ok
Go for it
hey, I suck at writing code but at least I can criticize others' code
my problem with reviewing code is that i feel bad cause i feel like im insulting them
Naaaah, take it like it's a teamwork exercise! The goal isn't to "fix" the code, but to see where the code can be improved as a team.
me:
looks at a 200 lines long procedure with nested loops
review:
_perhaps you could adjust le docstringe 🧐 _

well, if you consider it
most of the codebase is written in a procedural style
not as a composition of objects
like in C, in juggles with structs (and also plain dicts)
oki, bot#1575
Are there any other PRs anywhere in dire need of review?
god damnit
close enough
sir-lancebot#645
Well, I guess not
well, I guess I will DESTROY the pr with FACTS and APPEAL TO AUTHORITY
anything on bot/?
@fervent sage this one is quite long, do you still want me to revert it to the long f-string?
er can you screenshot the current code
yeah, it still feels overly long
i would say to keep it like this
Just look at priority labels
alright
if you like it that way keep it
sir-lancebot#727
i love tiny prs 
I heard this is a cool command
Yes it is
@fervent sage what does this mean?
is there any more context?
no, this is the whole lint fail
i did everything you asked
def xyz():
""" Something.
This is wrong.
"""
i assume its a docstring like
"""
stuff
morestuff
"""
```where it should be
```py
"""
stuff
morestuff
"""
you know youve spent too much time staring at linting errors when you can fabricate code from them 
AH YES! ON LINE 443 TO 444
what were the assigns for bot#1567 and bot#1575
didn't you want to do one of them vco
yeah top
alr, assigning
ty
@vale ibex Not sure if you saw it as you pushed and resolved before I finished https://github.com/python-discord/bot/pull/1573#discussion_r628945434
Your reminder will arrive in 19 hours!
@fervent sage @sleek steppe would y'all mind re-reviewing? all changes have been applied and lint passed. thanks a lot! :D
what PR?
sir-lancebot#726
:P
ah, this was very useful. i changed all my docstrings to the imperative mood :D
nice I got lancebot to error
yo same timezone, pog
done
thank you, although i have to go for now, i'll come back in about 40 mins and do the changes
oh is there no way with async rediscache to use keys() short of just using .items() and iterating?
yup, isdigit is a trap
sounds like it could be useful, redis does provide an interface to not fetch both at the same time
yeah
well i cant imagine that namespace will ever have a huge amount of keys so items should be fine
this is gonna be easier than i expected
That looks nice
I changed it to isdecimal
hmmm
I have a dilemma: since the bot dms you anyway should i bother checking if the command is in the bots channel (since it will take up even more room in chat if I send an error there), or just react with ✉️ and be done with it
hmm, didn't we say lock it to #bot-commands or DMs
im fine with locking to dms and bot-command but i cant figure out how to stop it saying i cant use it in dms 
command specific error handler right?
oh wait is that handled by decorator
ya
oh wait
hm
do we just not allow any commands in DMs maybe
i think so
.help works
so does .ping
huh
Isn't it supposed to be @stable mountain though
^
i'll just lock to bot-commands for now
also, re some of the things on the issue:
- we should retain past channels for 1 hour, imo, it's got to be longer than the timeout duration
- rediscache does not support key expiry, you cannot set a TTL for a child key of a HSET
- we should sort them by order of last activity from the command invoker, "last message from you 1m25s ago"
we should wildly simplify the TTL difficulties by only supporting in use channels
- sure
- hmm, sounds like making a loop to flush expired keys
- sure, i'll store a dict of channel.id and timestamp
yeah, a loop could work, how do you plan to handle persistence of the expiry times though?
wdym?
well, how do you know when a key is stale
if i store the timestamp and i know how long the expiry time is (i.e. 3600s) i can work out whether it was last set over an hour ago
hmmm yeah I guess
this feels like it would be simpler by just making a pr to async rediscache and adding TTLs
lol
wat
async rediscache is built around HSETs
oh
thats annoying
would be easier to just use raw redis lol, rediscache here just adds more complexity 
Can I suggest a !noeval command or something like that that explains why eval() is not a good idea if other people can use it?
tag*, not command
do we have a function that makes human times? currently this just does seconds
We don't have any commands in DMs
for a few reasons
moderation, but that's not applicable here
could someone tell me how i would do that? thanks!
and debugging
the read_text method
with p.open() as json_data:
data = json_data.read()
i was now years old when i learned that and im gutted i didnt know about it before
you can set the encoding in read_text as well
wow, incredible
so p.read_text(encoding="utf-8")?
yup
runtime i believe
THIS. IS. AMAZING!
ikr
If it's during runtime, use aiofiles please
lmao idk when the last time was, when i used nano
used to be bae
no offence to anyone who uses it
decorator-factory said to use read_text
also...
it doesn't give me a dict?
so it doesn't work with json?
no, you still need to load the json
aiofiles is a completely independent thing from read_text
oh?
Don't do sync io in discord bots, because you'll block the bot while the file is read
you can use json.loads, rather than json.load, but thats irrelevant anyway since you need to use aiofiles
actually lemme take a look at the code rq
if that staticmethod is called in the cog init its fine
It's startup iirc
Then you do not need to use aiofiles
oh in that case dw about aiofiles, but you will need to json.loads() the text
ah i was confused lmao
with open("path/to/file", "r") as read_file:
data = json.load(read_file)```
this is the original code, but decorator-factory told me to use read_text
easiest way to get a dict from a json file
ik, but decorator-factory thinks otherwise
return json.loads(p.read_text())
ahhhhh
thats the easiest way
loads btw is short for load string - load from a string of data not a file
I can add read_text to spring cleanup as well
such a badly named method lol
alright, finished with all of decorator-factory's changes, now moving on to vcokfire's
json.load is literally json.loads(f.read())
yup
true, i literally thought it was load but in third person-

lol
youre doing an awesome job of making all these changes btw, props to you on that :P
@sleek steppe question about github, how do you do the thing where you suggest changes and actually edit it so the Commit Suggestion button comes up, i've looked how for ages and never figured it out
thanks so much mate, this just absolutely made my day :)
commiting the new changes now
```suggestion
new_content
```
the github editor does have a shortcut button for that

You make a suggestion, there's a button that looks like the requested changes icon which does it for you
huh that button doesnt appear for me
Where are you looking?
if i click the + button at the side and this menu comes up
Hmm that should be it
github hates me 
huh, that works just no button, weird
try control+g
that just seems to open the ctrl f menu
well its not the end of the world if i have to type a bit, just strange
@fervent sage regarding gold colour... it's not in the class
looks like gold needs adding 
but i was already consistent in the code by using pydis colours like you said, so should i open a new pr and add it?
do it in the same pr, since its a thing which is being added for your pr
ah yes!
why is it a class and not a dict though?
no idea
accessing class properties is much better than accessing random keys
a static type checker can pick up on class props
which means your IDE can see it and help you
fair enough
huh... TIL
what do you think?
i think this is perfect gold lol
You could do
Colours: Dict[str, int] = {...}
That doesn't help the same way class props do
When it's a class, a static type checker can check the key names and values
For example:
typing Colours.bl will autocomplete to blue, and display it's value
it also allows you to navigate to the definition, and edit it
True
When using a dict, your IDE may be able to figure out the types of the keys and values, but not what they are
- it gives you dot access which is nice
everything is done :D
review time #3 
:^) i want that
review submitted
i went through twice and couldnt find any other issues than the ones i pointed out, so hopefully no more changes after this set 
trying to spell out your name in commit messages is the hardest part each time 🤣
haha, well i cant find any more changes to make just by glancing over, so i'll get to testing it locally
alright, thanks!
review time #4
next up: review time #5
vcokltfre
lmao how many review times will there be...
yeah, i spelt it right in the end
Does anyone know why this might be happening? #sir-lancebot-playground message It adds a bunch of spaces
btw @dry folio if you push changes before marking as resolved then i know im able to pull & test :P
oh ok, so i should commit then resolve
the description has been added :D you can start testing now
I'm 7 questions in and the game has just hung entirely, I think you're missing an exit case to a loop somewhere if there are no questions remaining
oh also Remaining questions: never seems to have any content
oh... my bad! the default is 8 questions, but the retro database only has 7
hmm... i'll check
that was from the original code
ping me when thats resolved, im gonna go get some food
the problem has been resolved in the latest commit! it was a simple fix lol
lol i cant kill lance because python never has a chance to handle the keyboard interrupt 
that's the exact same problem for me, i ctrlc'ed like 9999 times everytime before it stops
looks good, the exit case works, however the remaining questions is the wrong way round, it counts up not down
on the plus side im now really good at the retro trivia questions 
lmao yes
got it, i'll fix it
it has been fixed! this tho... lmao

You should setup your IDE and pre-commit properly
It'll help you spend less time formatting your code
and will stop errors in remote linting
What do you use?
...nothing, after i learned that black is incompatible with our pydis style guide
what IDE do you use
pycharm
lint passed! should work now
time for me to speedrun the retro quiz again
lol try out the math and science ones, they're the stars of the show
There's a retro section?
yeah, before it was abandoned bc of a bug, but then i fixed that bug so
Most code style problems are handled by default pycharm settings
there's only 7 questions in it tho
including line length
You should also run pipenv run precommit which will stop you from committing failing code
Full score! getting some funny numbers for remaining questions though, so you should make that dynamic
lol it's already dynamic, i just forgot to +1...
it's getting late and my brain is making more and more errors, smh
now i have to commit saying "missed + 1" lmfao
fix: off by one error 
me a few hours ago: sure i'll review it how long can it take?
haha hahaha boy did i underestimate that! fun though
me a few hours ago: oh, a few change requests, should be fast enough
me rn: brain fried, making silly mistakes like forgetting + 1 lmao
fixed :)
review time #float('inf')
code please work, my brain can't stand it anymore...
sure, go review... even tho i don't think your approval will count. you can request changes, though
It won't officially count, but…
I'm terrible at actually reviewing code, but testing? Sure
that remind me of something a friend told me a while ago: "Can I look at your code and tell you what's wrong? Lol, no. Can i break it regardless? Hell yeah!"
almost, i requested more changes 
*pre-commit install
lmao
but we are nearing the end
I said what I meant
precommit runs pre-commit install
Oh
It's in the guide and the Pipfile
LAST TWO MINOR BUGS. EVEN THO MY MENTAL STATE IS DEMOLISHED, I CAN DO THIS!!!
always remember that pydis is never worth your brain exploding and it comes after being healthy and taking breaks
yes ik lol, but i don't wanna do this tomorrow, bc we're sooo close to finishing it today
i got the first bug fixed
works for me
hmm
remember we did the test in cat dev server?
no idea... sometimes it's latency or smth
I'll try again
pascal's triangle
:)
@fervent sage got the correct answer and won 100 points!
Scoreboard:
Alecat - 100
lol
Is it alexcat or alecat?
alecat
Like alec?
lol
there are no other options
i had to do that
because or else the question's too open-answered
my counterpoint about mitigating that is that it's against the spirit of the rules, and if someone keeps abusing it to ruin other people's games they're gonna get told not to by mods
its just not worth the (huge amount of) effort to mitigate spam attempts
Got it
true... just like how we can't prevent them from secretly cheating
searches "What is the process by which green plants and certain other organisms transform light energy into chemical energy?" on google
ah, it's photosynthesis!
yeah like, in the end its for fun, and if someone cheats or spams then they:
a) are just wasting their own time
b) are wasting other people's time and will be warned for doing so
also, the two minor bugs have been fixed :D
also, today's really my best day isn't it-
lmao
please let da code work.......................
i'm praying to a programming deity, if one exists
i have
approved
(after successfully speedrunning the retro quiz for the 7th time
)
This is the pr with the most activity that I've seen so quickly
Two days, yet so much reviewing
tell me about it 
I don;t think ive ever spent this long just sitting down reviewing code before lol
WAIT. SO I WAS ON OTN, GOT APPROVED, AND REVIEWED BY 4 PEOPLE IN ONE DAY
BEST. DAY. EVER. (in 2021)
and in light of that im gonna stand up, so bye for the next few mins
cya mate, thank you so much
and i don't think i've ever coded for like several hours straight
See ya vco
why did you put confused and eyesus emojis on my petapoggers level?
i only say petapoggers when it's just really poggers
i have a question regarding your poggers scale, you have it go pog > poggers > kilopoggers is this modelled after bit > bytes > kilobytes, so one pogger is 8 pogs?
800 msgs in 7 hrs 👀 , this has been the most active day
Exactly! 1 poggers is 8 pogs. Also, poggers doesn't change with plurality, meaning it's poggers even when it's singular (this is bc usually you say "poggers" not "pogger"). Pog is different tho, it's pog and pogs
if anyone needs PR to review 🙃
Variables should folllow snakecase right?
bot/exts/evergreen/trivia_quiz.py line 19
QAndA = Tuple[str, str]```
ye
I’m going to make a anagrams.
The way this work;
- Randomly scramble words and select letters
- While loop, 60 second timer
- Await user inputs
To make sure it’s valid, it first checks if the letters of the input include the scrambled letters.
The way I do this is,
I make a list with the scrambled letters
I for loop user inputs, check if the letter is in the list. If it is, use.removeto remove the letter. If the letter is not in the list, ignore.
If it passes the letters check, we need to see if it’s a valid word. My method is a api call to a dictionaryAPI, trying to search up the given word. If nothing is returned, that means it is invalid and doesn’t exist.
If it is valid, I add a reaction to the message. Then, depending on the length of the word, I add points to the user via a dictionary.
After that, I add the word to a list. If people send the same word, it’ll know by checking if the word is in the list - After the timer is up, it sends the winners
any revisions of this thought process?
this gonna be m first time contributing
I was told to format custom type alias like that
Because it's a class
Which follows PascalCase
So..
umm, we would need to change this at the others places of code, i will put this on spring cleanup, thanks
also, there is a 🐛
if questions is set to 0, it will become false
so it won't go inside the check for question's value
where you have the check for less than 1
i will leave a comment
I explicitly said that in the desc that it is by design. 0 question would be default
Also, this is from official pydocs
yeah i get that
the reason behind this?
one of your error embeds, say "You must choose to complete at least one question."
Because 0 setting it to the default value is kinda natural? I've seen it in other apps, although this is my person opinion. Give me a counterargument on why this isn't ideal
Yes, and 0 is the default
here is the counterargument
then your error embeds are conveying false information
and this should be documented in the code
Fine. I'll add "or 0 for default of 7 questions"
It's doc'd in the desc, but sure i can do that
when user says 0, it means he doesn't want to play any questions
and you are making them play 7 questions
most apps, when said 0, show a invalid option
That is your opinion.
i dunno which apps you saw
heads up: bot restarted, .ext unload latex 👀
there was a merge
oh dope
For example, changing your nickname to blank results in defaulting (on discord)
well i have no time to argue with you, lets see what others say
sorry wrong channel
when u change the nickname to blank, it means you have no nickname, there it shows the discord username
Also, how bold of you to assume the user's a he lmao
...
And it goes on and on and on
Gtg, cya
huh
ok it did now
repost pls unload
pong xithrus
:ok_hand: Extension successfully unloaded: bot.exts.evergreen.latex.
.ext load latex
:ok_hand: Extension successfully loaded: bot.exts.evergreen.latex.
huh, just unload
:ok_hand: Extension successfully unloaded: bot.exts.evergreen.latex.
yeah
ah
no lol
other's opinions pls
sorry i should've made that clear
try reviewing the spring cleanup PR in one sitting 😔
Sadly he can't because he has commits on there 
that reminds, i need to complete my review on it
Remind me to add small commits to any of the big PRs in the future
@short snow @dry folio that was a very strange argument you two had. When it gets to a point where you are attacking the person to prove a point, you should seriously start reconsidering your actions, and that goes for the both of you. Having these projects be open source is an effort to create an environment conducive to learning and growth, something that petty arguments like this does not achieve.
If you want a second opinion on the matter, you can have default arguments for commands in case a user doesn't pass in an input
For example
!dmrelay
!dmrelay <user> [limit=100]
Can also use: dr, relay
Relays the direct message history between the bot and given user.
If you want the command to default to 7, make 7 a default argument instead of trying to parse a random one such as 0
Yeah i stopped when i thought i went offensive
@eternal owl
Here's your reminder: bot#1120 bot#1236.
[Jump back to when you created the reminder](#dev-contrib message)
@gritty wind What should i store with the unloaded cog in the unloaded_cache for sir-lancebot#705
Like a cache needs a key and a value. I couldn't think of anything useful for value, the key would be ext name.
the author id? or unload time?
Why not have one key with all the values
yeah i was thinking about that, where the key would be unloaded
is it recommended to use async redis cache for dicts?
Storing them by stringifying them (json.dumps)
bot/exts/christmas/advent_of_code/_helpers.py lines 286 to 296
cached_leaderboard = {
"full_leaderboard": formatted_leaderboard,
"top_leaderboard": _get_top_leaderboard(formatted_leaderboard),
"full_leaderboard_url": full_leaderboard_url,
"leaderboard_fetched_at": leaderboard_fetched_at,
"number_of_participants": number_of_participants,
"daily_stats": json.dumps(parsed_leaderboard_data["daily_stats"]),
}
# Store the new values in Redis
await _caches.leaderboard_cache.update(cached_leaderboard)```
yeah, then you would have to striingify them 
alright
What does happened while using thing :
-> "HelpSession":
After defining a function,
Just like :
@classmethod
async def start(cls, ctx: Context, *command, **options) -> "HelpSession":
What does : do here
as
ctx:Context
What does this means
its typehinting
It doesn't really do much other than help IDE with autocompletion and suggestions
It is also form of documentation of code
: in that context is used to typehint a variable to specific type
while -> in this context is typehinting that the start method will return object of HelpSession type
https://github.com/python-discord/pixels I see I see 
Do you? 
how did i get the link 
The container I guess
Oh lol
i missed clicked on him, and then saw view git repo, clicked and boom, new project 🙃
what is it about
It isn’t fully secret anymore though, so that’s fine

https://github.com/orgs/python-discord/packages it is not listed on the packages btw
man, why did i tell, i thought it was there, so i thought u will get it anyhow 
Oh yeah, it is internal
why are we initializing the redis cache as a class attribute and not as an instance attribute? whats the reason behind this?
oh shit
If you find anything major, feel free to @slow bone us
That’s how the cache is designed, really
It is bound to a specific class, not instance
ah
lol
It uses __set_name__ to use the class var's name as its namespace, no other reason afaik but there'd be no functional difference
It is there, it's just marked as internal for now 😄
lol
ok, I am really curious what the project is about
time will tell

Patience, my boi
toxic smh, you can already see the project
👁️
oink 👀
@dry folio in case u missed it
lol we didn't attack each other, and regarding the default values... i'll think about that. also, the default's already at 7 when you don't pass in a questions parameter and thus i believe it is logical for 0 to work like that as well. these are simply personal opinions, like how i used blue for my "quiz game starting embed", but someone else might like green and suggest me to change it to green. i don't understand why this would do any harm
it is essentially the same thing: we simply have different preferences, i like 0 = default and @short snow doesn't. it's like saying i like putting bold on "Quiz game starting" and someone else doesn't. i don't think i should do all these subtle changes just because someone else likes something else, unless there's a problem with efficiency or smth
I'm confused how there are so many classes without docstrings in constants.py (https://github.com/python-discord/sir-lancebot/blob/main/bot/constants.py) yet flake8 doesn't like mine without a docstring 🤔
Well it isn't in constants.py, but I was changing a namedtuple to a typing.NamedTuple class because of this comment https://github.com/python-discord/sir-lancebot/pull/718#discussion_r628941319
Aah well, it isn’t private so you have ti typehint it
the constants are private?
Nah, but the file is ignored
ah
tox.ini line 17
exclude=```
Is the two dots syntax really not working
Yeah I guess it doesn't check for that
Ah, I was looking at the wrong bot
I don’t get why this feature isn’t on sir lance, it would make much more sense there
agreed
@sleek steppe Oh you are a helper 
I hope this is the last time I have to resolve merge conflicts 😔
Because flake ignores that file
Yeah akarys told me
Ah yes, just read that
Is there a way to get all your reviews on github?
Lol as long as you program you'll have to resolve merge conflicts
I meant for this PR lol
Which is it? the cleanup?
Yes
Search github for type:pr reviewed-by:octocat
sounds like an excellent idea @fervent sage, wanna write it?
yup
Should I make an issue for sir-lancebot to use AllowedMentions.none() by default? Which would mean if you wanted lancebot to mention someone, you'd have to explicitly pass allowed_mentions
We do already restrict it to mod roles, don’t we?
Nope
Or do you mean user mentions?
Well yeah I'm talking about any mentions at all
Because I’m 99% sure roles are restricted
I’m not sure if we want to explicitely enable mentions for every message that should ping
Or, I could just fix the .eggdecorate command to use allowed_mentions
Haha, is there a bug with this one?
.eggdecorate @green oriole ...
Sorry, I don't know these colours: @green oriole ...
can it mention here?
we probably have a lot of different ways to make that happen
don't do it here lol
the .uwu command escapes the mentions
We just tested, it doesn’t work
Does it have perms for role mentions?
Oh yeah we disabled most of its perms, makes sense
I guess it's fine then
bot/bot.py line 208
allowed_mentions=discord.AllowedMentions(everyone=False, roles=_allowed_roles),```
It will be escaped on discord’s side either way
thx
Why is that there if it doesn't have permissions to mention them?
@green oriole is it cool if i link to https://vcokltfre.dev/tips/tokens/ as 'further reading' at the end of the tag
does anyone know who's decorator-factory's name on discord?
It's @celest charm iirc
ah nice
Heck yeah
yes that's me
It disallow role mentions, but not user mentions. I don’t think it is an issue as it doesn’t allow for mass pinging.
akarys is that you in the pfp
just to add to the confusion
It is
yes that's me in the pfp
lol
hi decorator-factory :) look at the comment i sent you on github, ima go work on the fuzz ratio for dynamic questions now
nice
okie dokie bot#1579
my first time using higher-order functions in projects :) hopefully this doesn't frick everything up
Noice
lol ima test now, code please work
Looks like it should work
Tag speedrun? 
cc @patent pivot
thats when i click the requirement details on the github check
seems to be working fine now but i definitely wasnt expecting that error
the answer is that the GitHub api query timed out, so it was probably transient at our side or githubs side
Also how did you get the logs?
loki explore, it's locked to admins rn
aaah
I think this is just a GitHub bug
with a timed out req
policy bot should mitigate with retries but it's not a bug luckily
the only bug we've had recently is that if someone deletes their fork on an open PR things get whacky
I mean, it is consistenly failing on merge commits
IT WORKSSSSSSSSS
Well done 🙂
i didn't know that you have to type hint a type hint lmao

oop- lint failed tho
lmao, im fixing that
akarys is cool
Dunno what you mean 
i run this command after cd'ing into sir-lancebot, correct?
Yep
Hah
lmfao
when you get 3 approvals and lint passed and higher-order function works first try:
E X A P O G G E R S
still need one more core dev approval tho
I will give it a review

