#dev-contrib
1 messages ยท Page 91 of 1
Right
I personally have no idea what you're talking about, so anyone in the same position as me would be hopelessly confused. Whatever you decide to implement, it should probably be simple and easy to work with without requiring long guides to set it up.
Ultimately it's one command for the user
But I'm trying to think of ways to bring that down to 0
Just have it work out of the box
Makes sense.
Apparently the strange behavior has been documented in the readme for at least 13 months lol
So far I am reading that git only converts when checking out, not when checking in.
Never mind
That's what autocrlf does
Apparently we can avoid relying on git config by adding a .gitattributes file.
afaik
the two properties that exist for line endings
either only affect the check in, which would lead to what we have now
or they are overridden by the autocrlf
what we can do
is if we force the check in type
then we can let the hook do whatever it wants
or remove it completely
Yes, I am looking into .gitattributes right now.
Since we can't rely on local configs being set as we want
If possible
I'd like to keep the hook in some form
It's still a nice confirmation to have
If you want to ensure that text files that any contributor introduces to the repository have their line endings normalized, you can set the text attribute to "auto" for all files.
* text=auto```
We shouldn't impose line endings locally. If people want to use CRLF, they can. If they don't, then it's on them to configure git properly. As long as we know they're being checked in as LF all is good.
I was thinking we can have the hook use the auto mode, but if text auto does the same thing, then yeah, sounds good
We shouldn't need the hook at all.
And the default behaviour is to normalise line endings to LF on check in. Someone would have to modify .gitattributes in order to disable normalisation and manage to check in CRLF.
It's not explicitly stated I think, but it is implied that .gitattributes takes priority over what's in .gitconfig.
Right, but if they change it and push
will that change be blocked somehow at any point?
assuming they don't push the change attrib file
I'm not sure if git will respect the .gitattributes file if it's not committed along with other changes.
why do we not use a subclass of HelpCommand for @dusky shore?
@sleek steppe Reviewed this PR
bot#1446 needs review 
Lol, follow the rules!
which rules lol
this isn't a typical PR lol
it's mainly a JSON change
it makes sense for the blame to all be one commit in this case
Yeah, i was jking
lul
huh?
The sudden change from elements to fruits
ahh yeah
Is cucumber a fruit?
yeah
pydis entering froot era
We need a changelog joe.
Not yet, not yet
whoever contributed the site connection re-try is a hero
I believe it is our good olโ @gritty wind
gone are the days of time.sleep(5); bot.run()
Thanks.
@cold moon are you saying that it should take a Command as an argument or I should pass command.qualified_name?
You are passing already Context and you can access to it using ctx.command.qualified_name.
Oh right, so I can just take ctx?
Yep
Ok, thanks.
https://pythondiscord.com/pages/rules/
why are there two "rules" towards the top? was it intentional? because it looks pretty 'meh'.
rules
RULES
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.
or is it looking different just for me.
The first one is breadcrumbs I believe
wdym breadcrumbs?
like.. the path you take from the main page to this page
o I see
oh yeah I get it now
Alright, final push sir-lancebot#625; needs one more review.
How do you mark a requested change as addressed?
Or does the reviewer have to do that?
There is a button to resolve a conversation, but it might not be open to people without write access
Just leave a comment saying that the conversation has been addressed, and ideally include the commit
Yeah I resolved the conversation but it didn't seem to do anything, so yeah I'll do that.
sir-lancebot#625
Yeah they are resolved, you just need to rerequest a review from KS, or dismiss it
but the comment itself is done
does it give you an option to dismiss it?
Yup, but you should probably ask for a rereview
yeah I requested one
@cold moon sorry for ping, can you review one more time when you can?
@gritty wind @sleek steppe Write access is required for dismissing review
Oh I see
Is there an available core dev that I could consult?
https://github.com/python-discord/branding/issues/123#issuecomment-790069902
I'm getting close to working on the validation script, so I'm wondering which direction to take. Is my proposal in the comment above reasonable? I noticed that there may be an interest in moving to poetry, so if that's still on the table, maybe we should use poetry here too? Or should we keep it super simple with a requirements.txt?
I'd be fine with using requirements.txt, although I'd like to hear others opinions, especially @crude gyro's
req.txt is enough for this, I think
It probably is, although if someone wants to run it locally, they will have to make a venv manually
Or maybe they can just read the reqs with pipenv, I think it can do that
yeah reqs.txt is fine I think
I don't have a strong opinion, reqs is fine, so is poetry.
@short snow maybe you can provide screen shots of the output even on light theme here?
https://github.com/python-discord/sir-lancebot/pull/595
Hey folks, a minor FYI, our repos are going to be transitioning from master to main. Full announcement in #dev-announcements once we're done.
yep, in an upcoming commit ๐
should be transitioned
just waiting for CI do 
so far so good
WORST DAY OF MY LIFE
but yeah that makes sense
let's try again
๐
alllright let's do site next and finally lancebot
that should be everything moved after CI passes on lance
Hello folks! If you are interested in diving into our help channel system, here is a P1 issue for ya: bot#1451
Alright, will do that.
!d discord.ext.commands.MemberConverter
class discord.ext.commands.MemberConverter```
Converts to a [`Member`](../../api.html#discord.Member "discord.Member").
All lookups are via the local guild. If in a DM context, then the lookup is done by the global cache.
The lookup strategy is as follows (in order):
2. Lookup by ID.
4. Lookup by mention.
6. Lookup by name#discrim
8. Lookup by name
10. Lookup by nickname
Changed in version 1.5: Raise [`MemberNotFound`](#discord.ext.commands.MemberNotFound "discord.ext.commands.MemberNotFound") instead of generic [`BadArgument`](#discord.ext.commands.BadArgument "discord.ext.commands.BadArgument")
Changed in version 1.5.1: This converter now lazily fetches members from the gateway and HTTP APIs, optionally caching the result if [`MemberCacheFlags.joined`](../../api.html#discord.MemberCacheFlags.joined "discord.MemberCacheFlags.joined") is enabled.
*await* `convert`(*ctx*, *argument*) This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).... [read more](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.MemberConverter)
The conversion is done by markdownify
it seems to be due to the way the html is structured
<li>
::before
<p>Lookup by ID.</p>
</li>
This is from the docs page
Since it's skipping every other number
I think it may have to do with the ::before
That's an implied reference in chrome or firefox inspection
if you go to raw source, it's not there
it's because ::before is a valid html target by css, so showing it in inspection allows manipulation
it exists for each element, but only those referenced by existing css will show it
You're right
but there is still something that is causing it to count each element twice
I'm having my debugger run through it one step at a time
but it's painful
yeah it's a bit odd
Huh, neat. Github includes this after the rename
Is this an out of the box thing, or something we've put there?
out of the box
It won't show up for people that have never been to this repo either
which is neet
ahh cool
I'm just thinking about aiofiles for reading in files on startup
Is it even worth it?
I was all for it recently, but the realisation that it probably doesn't help much hit
Do we have files that are loaded at startup?
I don't think it's worth the extra dep for tiny files
the various small files for resources
yea, my thought too. I'm going to remove it from my PR
fair enough
https://github.com/python-discord/sir-lancebot/pull/605 my logic to unload/load doesn't seem to work
can anyone check it out
and let me know what am doing wrong
it doesn't load/unload when it is expected to
and i get errors on extractONe fuzzy wuzzy
- change the
WTF_RAW_URLto some typo likemster.
Current Behaviour:
Doesn't unload the extension after hitting max failed tries. To verify it deosn't unload do .c list
Accepted Behaviour
Should unload the extension
can someone post the :X_square: and :o_square: from the emojis server?
I want to add them to my test server, for screenshot to sir-lancebot#595

Hah yea, I realised that I hadn't actually taken the time to review all of the code from the cogs that I've merged into one
commented (what I think the reason for this is) on the pr
Here's the code for the issues mentioned above
that i made, anyone is free to edit it or suggest some changes
await ctx.reply({random.choice(["heads", "tails"])}, allowed_mentions=discord.AllowedMentions.none())
Why are you doing random.choice again here, instead of just using the coin variable there? Moreover, why is it in a set?
oh wait my bad
My aim was to capitalize them
I did it now
let me update the link rq
done
also I don't see why you would use allowed_mentions there. If you're making sure the author isn't being mentioned in the reply, you can pass mention_author=False
oh
I think it'd be easier if you just make a PR, easier to comment and request changes that way
alright I'll change that. I asked someone in #discord-bots and they told me that
have a look at it now
ok you may edit the code because idk how to do that yet...
Let us know if you want to open a PR, it's not too complicated
Ok, will have a look, super busy rn
Does this just happen every so often?
https://github.com/python-discord/sir-lancebot/runs/2107206521?check_suite_focus=true
@fervent sage Can you add screenshots of the tag to your PR? For both of the tags
sure, couple mins
cant talk in vc
Yeah, you need the voice verified role.
There should be a #voice-verification channel or something once you meet the requirements.
thanks i been trying to but it wont let me
Have you sent 50 messages?
no where do i send the messages?
Anywhere I guess
Take a read in #voice-verification
ok lol
lol yall having alot of interesting convos and i was going to pitch in but...
ok
thanks for the help
Done!
:gem: is a standard emoji. ๐
Since it is on the server you can use it inside Sir Lancebot games if thatโs what you are talking about
Cool, can we have a combined leaderboard for all games?
That sounds interesting
So all of the leaderboards in one message?
If so, it would likely have to be paginated.
Hmm I was thinking about combining every scores into one, no sure if that's what @short snow is thinking about
I think each game has a different way of scoring, so it'd have to be normalized so it's semi even I think.
Yes right, combining all the scores into one leaderboard
That's an interesting idea
Yup
Do you mind opening an issue @short snow?
Yeah, will do it.
We would need some type of coins for that, maybe :lemon_coins: or :py_coins"
for managing the points
A DB for that storing the points.
I worry about the persistence though, with redis there's a chance that we lose the data.
People may get attached to the points and be very upset if we lose them
Honestly we can consider redis as persistent now
Yeah, hence I didn't say redis, and told about setting up a DB
Even we loose the data for some reason, we have daily backups
I think we're against having any sort of db with lancebot
Ahh cool, that's good to know
I don't think we will put a database on lancebot, like, ever
yeah, so only option remains redis or a simple json file ( ๐ )
Lancebot is made for beginners, or at least, it's the most beginner project out of the three. Databases are a little more advanced.
writes to a json file will be lost when the container is redeployed afaik
Even redis cache are lost at some point in time tho
Well, from what Akarys just said, it seems we can trust that redis is persistant
Maybe we can add a DB and make it optional.
But what about when people want to make new games?
And they don't know how to work with DBs.
They might feel pressured, which is something we don't want.
Right, am still not sure about the redis, can someone test it out?
Redis seems to be the only option, the something else is probably empty
We scrapped the json files when we moved to kubernetes
@green oriole is redis even available on lancebot?
we don't need to allocate a volume for it?
We do have redis
We switched to it when we moved to k8s because the json file were gone
I believe every redis caches are on the same volume
Yep, only one volume per database engine
We have 5 of them
@vale ibex did you change your status to an RSA hash?
Not quite RSA, but I did change it
Probably a base64 rickroll
I thought it was something close because of the == at the end
Sigh
Lol he got me with the hex
I was disappointed in myself when that happened
Why would you think thatโ
I woooonder
You won't get me again
๐ผ
That's what you think, heheheh
Yep, base64 leading to https://dis.gd/threads. Sigh
is there a weekly topic command?
if not, make a command that can send the weekly topic so that people get to know what the topic for this week is
it helps the users
something like !topic and then it sends the topic with a brief description abt it
and then both the command and the response are autodeleted after around 25 seconds
We are considering this but wanted to do it manually for a bit to ensure we don't over-engineer it from the start
How do you use the paginator? I need it for a command
Are you working on sir-lancebot or python?
Sir lancebot
It's used in a bunch of places, such as:
https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/evergreen/tic_tac_toe.py#L308
You create an embed (with no data mind you, just title, color, author, etc. no fields), and you pass it with a list of whatever you want to paginate
what databases does python use?
There is a minimal reproducible example in the docstring https://github.com/python-discord/sir-lancebot/blob/main/bot/utils/pagination.py#L96
Postgres for permanent data
Ah
though python doesn't do the interaction directly
Thank you
it is handled by the API
We also have redis for data that we want to persist, but wouldn't be the end of the world if we lost
I think the 100K banner needs to be removed from the site seeing as we're already at 160K.
how often do you guys make backups?
cc: @green oriole were you working on something like that
also, an idea, make a live counter or something of the members?
Python could do that.
Using http requests.
and put it on the website?
there's ipc made for this
Any bots can do that as long as they can make http requests.
backup service:
https://github.com/lemonsaurus/blackbox
cc @patent pivot would that be possible to maintain. Maybe a cache?
Discord bot's do that for their websites, so I don't see why Python couldn't.
Though I may be wrong.
We could probably do it
I don't know that it's a worthy investment of time or infra
they use ipc: https://github.com/Ext-Creators/discord-ext-ipc/
๐ A discord.py extension for inter-process communication. - Ext-Creators/discord-ext-ipc
How live are we talking
We have site#453 opened, but I decided to not continue it myself because my web skill pretty much suck
every day or so?
oh yeah that's fairly fine
Created: 4 years, 2 months and 7 days ago
Voice region: europe
Features: DISCOVERABLE, PARTNERED, RELAY_ENABLED, VIP_REGIONS, PREVIEW_ENABLED, INVITE_SPLASH, BANNER, WELCOME_SCREEN_ENABLED, ANIMATED_ICON, MEMBER_VERIFICATION_GATE_ENABLED, NEWS, VANITY_URL, COMMUNITY
Roles: 81
Member status:
47955
114357
Helpers: 91
Moderators: 28
Admins: 13
Owners: 3
Contributors: 36
Category: 27
News: 10
Staff: 54
Text: 112
Voice: 10
I can work on that. I've used Bulma (and still do).
also, could we auto block link shortners?
Oh nice, that'd be awesome!
Can you comment on the issue please?
I think we already do
Do you have a specific one in mind?
Frick, I clicked the button
What exactly do you want to replace the 100K banner?
no, just asking
can we just
not have a banner
I will just ask scrag first, since he had some ideas for it
How would I test it? Should I clone the repo and then open it locally?
Yeah that's the best option
If you're on windows, it may or may not be impossible to run the site without docker
though it isn't too bad
I opened the website locally following the guide, but this is all I see. The css stuff didn't apply. Is there something I need to do differently?
This is the url
file:///C:/Users/myname/site/pydis_site/templates/home/index.html
How do I do that?
well, if you are on windows, that would just be docker-compose up
You may also have to access it through an actual domain, as opposed to something like localhost
How to do that is described here:
https://pythondiscord.com/pages/contributing/hosts-file/
If you follow the instructions there, you'd access the site at:
http://pythondiscord.local:8000/
Thank you!
I may need some help setting up CI for the branding repo ๐ญ
I'm not sure what needs to be done when adding a workflow from a fork
I've added a workflow that should trigger on PRs, un-drafted the PR and resolved conflicts, but it's not being picked up
I think it's a security measure for it to not run workflows on forks
I may have understood it incorrectly, so don't take my word for it.
Maybe not. It is set to allow all
I'm not sure if this setting is applying to workflows or to specific actions.
Yeah it's the latter. So the jury is still out on whether workflows created in forks are allowed.
I'm able to run the workflow in my fork, and if I remember correctly just adding a new workflow yaml is enough for it to start being used
So it probably has something to do with the fork
Can branch protection be set or does the workflow have to run at least once for it to appear there?
I can't find any clear documentation on this.
I'm guessing right now that the workflow has to be present in the target branch, and then the check will run. And even if it is present in the target, I'm not sure what happens if the workflow is modified by source branch that's in a fork.
Okay, it's not the end of the world, I can demonstrate that it works in my fork
Out of pure curiosity, what do you use Github Actions to do? Does it check the code in some way?
Linting, testing, and deployment.
How the hell does this even work? https://github.com/python-discord/bot/blob/f20fa1cfbaf623a5eedfccc456c1945a561a527e/bot/exts/moderation/defcon.py#L162
There's an attribute and a function with the same name...
I guess the function is defined before the attribute, since the attribute is in __init__.
It might work, but it might be cleaner for it to be not the same.
Still nothing on unsplash verification @patent pivot ?
yes, I've heard back from them, just needed to verify that we use the UTM links but otherwise we are good for prod
I'm having an issue with using the hosts file to see the website.
This is my hosts file. When I open http://pythondiscord.local and the others, nothing occurs.
.src earth
I sent them this
can't remember which port we use
Nothing from either of them.
Locally from my computer. I have the github repo cloned.
right, but the local setup uses 8000
what command are you running?
pipenv run start? or using docker
@patent pivot https://github.com/python-discord/sir-lancebot/blob/ff739723f6f7a47bb437170758f4f805b133af56/bot/exts/easter/earth_photos.py#L35 and https://github.com/python-discord/sir-lancebot/blob/ff739723f6f7a47bb437170758f4f805b133af56/bot/exts/easter/earth_photos.py#L51 should be those
I passed on the video, which they said was enough. Weirdly the only verification documents you can add must be video/images
Wacky
lol
Ok lol I didn't watch the video did now
prob because you can't expect people to reveal source code
True even though it's open source
I ran pipenv run start just now and was faced with a bunch of errors.
for us yeah, for most unsplash api things, no
True
o. I will add it to the list of fixes, thanks
I already submitted a PR
Arenโt nominations part getting handled by ks?
why are they in dev bounty board then
Thanks, that was outdated
Yeah, it wonโt work on windows
Like
At all
What do you see when
You type docker container ps
I'm not at my computer right now, but I'll check tomorrow.
@vocal prairie Hi there, i see you're interesting on working on site's frontpage's stage 2 design. With the next stage, most of the work was going to be a few new graphical assets to be placed in prominent positions on the page. If you've done some graphic design / illustration work in the past and feel comfortable getting creative and drawing something up based on a written guideline, let me know. If it feels a bit out of your comfort zone though, that's absolutely fine, we'll get around to it eventually.
I've done some graphics, but not to much.
Placing I can do, but the drawing, maybe not as well.
the placing won't be a problem, as the structure shouldn't be undergoing any major changes.
Stage 1 handled that
sir-lancebot#593 's label needs to changed to status: approved, since chris has already opened a pr for this
and it is approved ig
is it?
sir-lancebot#576 for this too
same thing
as what
as 593
gotcha, just reading them over
https://github.com/python-discord/sir-lancebot/issues/428 label change from deferred to approved
as it is same as https://github.com/python-discord/sir-lancebot/issues/608
https://github.com/python-discord/sir-lancebot/issues/428 same for this one too
you linked 428 twice
Alright cool
https://github.com/python-discord/sir-lancebot/issues/627 if anyone has any more stuff to add let me know ๐
Does sir-lancebot#475 really matter because sir-lancebot#625 was merged?
Oops I meant sir-lancebot#470
Only for tags
hm
shouldn't resources be a tag?
so there needs to be a cooldown on that sub command
!src site_resources
Unable to convert 'site_resources' to valid command, tag, or Cog.
Oh well, it's a command
It's a site subcomand, not sure if there is a reason for that
!src resources
Info about the site's Resources page.
I'd say moving it to a tag would be the better way, the only dynamic thing for it, the faq and others is the url which we don't really care about changing
Also doesn't the rate limit send a large embed too
the cooldown code would need to be generalized if it'd be applied here too so it's not a one line change, but I don't see a good reason for it being a command instead of a tag
So for bot#1451 I'm thinking of splitting the current HelpChannels.idle_minutes into two, idle_minutes_author and idle_minutes_helper, thoughts?
well i'll go with the split for now anyway, we can bike shed the name in the PR
I don't really think we should bikesheed it haha
๐
Just put what you think fit the best
๐
What's that?
the API for the .earth feature
we've been granted access to the higher ratelimit API
5k reqs/hr vs. 50 reqs/hr
Nice!
So this enhancement will likely need us to fetch quite a few message from the history of the channel, to find the last message made by the author
are there rate limit concerns?
atm we do channel.history(limit=1).next() to get the last message every 30 minutes
my current thoughts of implementation would mean we do channel.history(limit=100/200) to get some more history, to determine the last author's message
but this would mean doing so after 10 minutes of in-activity in each channel
The only other option I can really see if to have an on_message listener and store the time of the author of each channel's last message in redis
hmmm, actually it wouldn't be so bad, we can short circuit the check if there is activity in the last 10 minutes
Thanks for being my rubber duck
We donโt need a cooldiwn then ig, since bot can catch for spam
Yeah I like that one better
Yeah that sounds a better approach
didihearchangelogneeded
yesyoudidakarys
.earth
Alrighty
Will finish my cooking and then post the changelog
Ooh what's cookin'?
Assuming that nobody does it in the meantime
A zucchini terrine of some kind, nothing too fancy haha
Will break things if the message was sent while the bot is down
Have the listener only for when the owner last sent the message?
and then this for the last message sent in the channel
So then it won't break when the bot goes down, and we wouldn't worry about rate limits.
Whoa I've been changelogified
I mean yet to be changelogified 
You'll get there
Just contribute to our repos 
Yeah but there're not too many issues that are open and I can actually work on 
is anyone taking bot#1454?
or is it even going to be approved 
Could someone look at sir-lancebot#611
For this issue ^^ should we log anything if someone who isn't "OP" reacts?
bot#1470 is up now! thanks to @whole forge @worthy plume @spare plaza @slim widget and @mellow hare for the group coding ๐
I'm think I'm finished with this, I just want to know what to do.
is this fine?
log.debug("Got reaction from non-whitelisted user")
Do we already have a debug statement on reaction add?
Yes
If so, maybe we can add to that whether its from a whitelisted user?
Haven't seen your implementation, so if the logic is too complicated to do that, another one isn't too bad
no it would be changing one line
Should I change this one too? https://github.com/python-discord/bot/blob/main/bot/utils/messages.py#L19
Would make sense to do that yea
Can I close bot#1454 because of bot#1471?
Or is it better to wait until it's closed by 1471?
No, it should be closed when the implementation is merged, in this case github will do it automatically
I'm new to this Github stuff, so I didn't know. Thank you!
Speaking of bot#1471...it needs some reviewing ๐
This approach doesn't work because it the event will get triggered for any emoji
Or rather, triggered by anyone.
Oh it's in an infinite loop so it tries again
Yep
But why couldn't you just remove the reaction within the check?
Checks are sync functions
Use create_task then. I think the problem with relying on the infinite loop is that you may end up missing a reaction event.
I see
Well..... it's complicated
We have to consider when context switches occur
Cause discord.py will only dispatch the event if the event loop is executing that code
Yeah i think I am right cause await message.remove_reaction causes a context switch and will allow a new event to be dispatched before a wait_for attaches to it again.
Should I edit pagination.py too?
Or not since it already relies on an infinite loop?
pagination.py was what I was talking about
oh
But yeah, both could be in the check I suppose.
That's my opinion anyway
I would agree it's a bit confusing for a predicate function to have side effects like deleting a reaction, but it seems like the most convenient way to have correct behaviour.
would something like this be fine?
try:
return (
# Conditions for a successful pagination:
all((...,
))
)
finally:
if not no_restrictions:
await ctx.bot.remove_reaction(reaction_.emoji, user_)
well not the await
create_task
You don't need try finally. Just save it to a variable and check it before returning it
oh ok
@tawdry vapor I made those changes ๐
Does anyone else want to review bot#1471
Chris, shouldnโt the idle time of the author be less than the others?
in your PR it is the other way round
Looks like same is said in the issue
closes help channels more quickly if the OP (the person who originally opened the channel) has not responded in a while.
Your config default.
"The initial implementation suggestion is that 10 minutes after the last user message, and 30 minutes after the last OP message the channel will be closed."
From the implementation. The intended behavior is that if the OP isn't responding to messages, meaning other people have posted, we close it more quickly
If the OP is still talking and is the last message, we don't necessarily want it to go stale faster
So Chris's PR is correct.
Wait, if the intended behavior is to close the help channel faster if the OP isnโt responding, then shouldnโt that time be less.
Like if the op isnโt responding for 30 minutes and other ppl have went on talking, then it would stop after 30min, since according the comment, it says both criteria to be met
Anytime OP talks, the timer is reset to 30 minutes
If it's been over 30 minutes since the OP has talked, but other people are talking, we lower the time to close the channel since OP isn't part of the convo
So instead of a channel potentially being open for 60 minutes if the OP sends a message and someone responds just before it closes, the channel will only be open for 40 minutes
Rather than the current +30.
In here, instead of adding a extra check, why not just make the author, the restricted user?
well @whole forge , what was the shortest explanation you ppl could come up with?
probably the one in the docstring you also reviewed, _cog.py line 46-48
ok, lemme see
Closes after 30 min since the last message, or 10 min since the last claimant message, or when you do !close.
this is short
ig
I think that's a bit too wordy
can you test it on a int e and show how it looks
I don't have access to int e
But I think this embed should be as short as possible, when opening a new channel you don't need to know the exact details of how it works
What does that mean?
@sleek steppe I'll send it here so we don't clutter #dev-log
The command is pipenv run precommit, notice there's no dash between pre and commit
I think pre-commit runs pre-commit instead Pipenv
yes, but it doesn't install the git hook
Oh ok
also, the check still doesn't return a boolean in all cases:
if whitelisted:
return True
elif right_reaction:
bot.instance.loop.create_task(reaction.message.remove_reaction(reaction.emoji, user))
return False
if both whitelisted and right_reaction is false, then the function returns None
This is what the embed looks like after that change
@short snow @green oriole
Can add it to the PR after work
Nice bot name! And yeah, that footer works well, but what do you think about "closes after a period of inactivity"?
I think that might be a little clearer on what you mean by idle.
Because that's a term used in Discord, and you wouldn't want to cause confusion.
yea, I don't mind that
I just think I'm against trying to explain exactly how it works, since it'll cause more questions
if people are genuinely interested then they can ask here
Trying to explain the complex logic behind it in a short sentence will lead to confusion and people asking for more info
Yeah, the system doesn't need to be explained. I just thought that since "idle" is a term used in Discord, it may be confusing.
Your reminder will arrive in 4 hours!
I like that suggestion too ^
For bot#1432
- Can I take it?
If so:
2: Would increasing the cutoff for difflib.get_close_matches be better or will it make things worse?
3: Would it be better to just take the really long messages like the one in the screenshot and make it say Did you mean: !paste Lorem ipsum dolor... or remove the additional text entirely?
@sleek steppe Take it in a string, cut off everything that isn't the first word, and then provide the suggestion?
I guess that makes sense
Which project are currently your are working
All the people contributing
I will try my best to contribute in the project
I'm working on branding and the site.
If you're interested, feel free to look through any of the issues on the github.
@dusky shore is a good starter project from what I've heard.
.src
Take a look at the issues in this repo and see if any take your interest ๐
@dusky shore is a good introduction to our open source projects
Is increasing the cutoff a good idea?
See the paramaters of the paginate function, and the no restriction check
Ok cool.
I'm still not following.
Oh well nvm, i thought the pr mentioned another change as well.
i will give it a review.
@vale ibex
Here's your reminder: .
[Jump back to when you created the reminder](#dev-contrib message)
@clever wraith this channel
staff members or contributers that are active here are able to answer you better then what i can ๐
Yea, I think your final sentence sums it up quite well
I think there was something to do with privacy reasons
moving the message into a paste
Something something @patent pivot probably remembers more or less why this could possibly be a weird legal thing
because we're moving data from being hosted by discord, to being hosted by us
without explicit consent
But yea, Joe might be able to give us a final view on it
It's a good idea! We appreciate people taking an interest in our projects ๐
It's a pretty dank idea conceptually, but legality is always an odd thing to deal with
I'm no Joe, but the issue was that the user has to explicitly agree for us to process their data. The snippet might be copyrighted and we aren't allowed to host it.
There is a Git functionality when doing interactive rebases that allows you to melt a commit into another, that's what GitHub uses to squash down PRs
What's the command to do that then?
wouldn't something like
!e print("copyrighted content that's more than 10 lines")
do the same thing
No, because in this case the user posted it directly
They implicitly agreed to our privacy policy, at least I believe
Yep
Well
By joining the community
there are a few reasons we've not gone down this route
Joe plz help
it isn't entirely legality/privacy
it's more like
this will just result in huge snippets in the server, it's better to just educate people to use the web ui
a !paste command is fine legality/privacy wise because people have already kinda said "aight" since they are calling a command
the legality/privacy stuff came in when people proposed we yoinked just general code blocks
but yeah, in general we've been fairly against allowing pastes directly from Discord before
@patent pivot
In a hypothetical situation, how would an off-topic name be changed earlier than normal?
...
with the... channel menu?
you seem very fascinated that a channel changed name
well, I wasn't sure if there would be a bot command or not.
not really
no need for that
if we really want to we can generate a name with an eval snippet
yes, I would think that there might be an ot name update command or something to update an offtopic name earlier than normal
oh
if we want to rename all three we can trigger that, else we can make an API call to roll a new name
the current name for the channel you are fascinated by is in the pool
it just won't be marked as used, so the only side effect is it may be used again before the pool is empty
wat
what does it say for you?
yeah I mean I presume it's just a DM channel lol
โฆ
That's probably the DM channel ID. Shows as #deleted-channel for everyone else who can't access it
it is.
smh
๐
kek returning to #ot2-never-nesterโs-nightmare I mean #editors-ides
Do you think bot#1472 should be for sir-lancebot or @stable mountain ?
I wanted it to be a command like !pypi
sir-lancebot, as i said on the issue
I think Sir-Lancebot.
Because it's like this thing.
Not mandatory, but it's a nice added benefit.
it's kinda nice, but not mandatory
A lot of python's commands aren't "mandatory"
like !reddit is the equivalent to this
The reason I opened it in bot instead of sir-lancebot is so that people can be like: hey, you need foo, there's a github repo for this. !github user/bar
mhm
That's a webhook though
Yes, but Sir Lancebot doesn't do that stuff.
Lancebot is meant to be simple.
And Python controls that webhook afaik.
@sleek steppe Something like !github is not integral to how we run or manage the server, so I would not put it in Python. Python is also much more complicated in terms of development and even getting a running version of it.
sure
The issue can be moved
(that also leaves me curious why pypi is in python, but I'm not quite as in the loop as I should be about our dev projects)
Yeah the pypi command is the only reason I opened it in bot
Because sometimes you want to pip install git+... instead of pip install package
I agree, pypi should be moved to sir lancebot, along sith github issue
wut
@thorny obsidian pypi was put in @stable mountain since I thought of it as a pretty darn useful utility
It is a command to interact with the key python infrastructure, like the !pep command, it think it fits here
For .github, I should change how they send the embed because they're adding empty fields and it looks pretty bad on mobile
#sir-lancebot-playground message look at this, you can put no data available or something like that
using or
By the empty fields I mean
embed.add_field(name="\u200b", value="\u200b")
oh ok, what difference does it cuz, can you show visually
!embed \u200b
\u200b
Guess it escapes characters like that, nevermind ๐
!source github
Unable to convert 'github' to valid command, tag, or Cog.
I have no idea lol
Yea
for sir-lancebot#630, we can just change the decerator to take the everyone role in roles=. right?
Why do we need the decorator if we want everyone to use it everywhere?
because by defauly, sir lancebot is restricted to only some channels.
.c4
see^
Why is this https://github.com/python-discord/bot/blob/27aacc1e737bc7de69fbac1d2e10458af8bd04d2/bot/converters.py#L349 a classmethod?
It uses the class attribute
Yeah it uses cls
i.e. ALLOWED_CHARACTERS
Right, missed that, thanks
we can add a good first issue label to it then.
@tawdry vapor I don't want to flood the PR with questions, is it fine to make a utility function like this:
def suppress_callable(func: Callable, exceptions, *args, **kwargs):
with suppress(*exceptions):
return func(*args, **kwargs)
bot#1446 sir-lancebot#605 sir-lancebot#614 and sir-lancebot#618 needs review 
Idea: sirlancebot bm command using message references?
I like this idea
maybe make an issue for it
I am confused what you mean
can you explain more ?
.bm
Your input was invalid: target_message is a required argument that is missing.
Usage:
.bookmark <target_message> [title=Bookmark]
Like that would bookmark your message because I referenced (replied to) it
boo
!d discord.Message.reference
reference```
The message that this message references. This is only applicable to messages of type [`MessageType.pins_add`](#discord.MessageType.pins_add "discord.MessageType.pins_add"), crossposted messages created by a followed channel integration, or message replies.
New in version 1.5.
Type Optional[[`MessageReference`](#discord.MessageReference "discord.MessageReference")]
this thing is the reference
oh ok, the time bm command was made reference were not a thing.
Might even pull a PR with a previous pending PR
.src bm
That looks too unwieldy to use. If you're trying to go this route, how about you modify create_task to take in exceptions arguments and pass them to the done callback (hint: functools.partial) so it can suppress them along with the CancelledError?
Alright I pushed
And tested create_task to see if it suppresses it
Also, should the github command really have a 60 second cooldown?
If so, maybe like 3 times per minute or like once every ten seconds?
@gritty wind Apparently, they added empty fields to the github command so that there's 2 inline fields per line instead of 3. This is the old and new embeds in pc:
I don't mind the new one, but if you wanna keep the old one, add comments plz lol
What do you think about this, once every minute is kinda long
imo a minute shouldn't hurt, i'm not linking github profiles and repos more than once a minute at any given time
@tawdry vapor Ignore my last comment, I don't think it'll be that easy. I'll look for a better solution
@tawdry vapor can you review my PR again when you get the chance?
rate limits without authorization are 10 per minute anyways
So, how's this so far?
This is the most I can get without making multiple requests
Awesome
We donโt need github info
just keep it
ToxicKids/sir-lancebot
no need of back ticks also
Can we get stars?
owner is not needed
we can understand that by the embed title
Yeah guess so
Language is only the top one or all of them?
Sometimes it's None, maybe if there's multiple it's None but I'm not sure
wait nvm there's multiple languages in snakebox (technically)
But when I did other repos it came out as None
like bot for example
Add stargazers and license, remove owner
you can possibly add pr and issue count with the help of emojis
Is there pr and issue count?
Right now I'm seeing open_issue_count
Yes thats it
Question. How did you guys make the mailing list channel? Is that webhook service that email services provide, or is it something more complex.
Not complex, but here it is https://github.com/python-discord/bot/blob/main/bot/exts/info/python_news.py
I see. Thank you!
i would keep owner to have a direct hyperlink to the github profile
owner is already mentioned in the embed title, why do you want to put it twice?
so he can click it to go directly to their profile in github
it's quite a common thing to want to do, so i agree it's probably important to keep it (in link form) in some form or another.
Well, you can click on the repo and see the owner profile.
they can, but i'm sure you know we already knew that
yet we still say it's a good addition
that's certainly a good idea too
i don't mind the exact implementation honestly, just so long as it exists
the hyperlinking of individual parts of the repo url though is dependant on how they best want to format the embed
if they have it as a title, it isn't possible
changing the formatting doesn't always necessitate removing something that exists in a part that's being suggested to be changed
if it's mostly the fields that's a sticking point for you (they are for me, but i was going to build an alternative first as a comparison), then it can, like you said, be used elsewhere
You can't do that
why?
the hyperlinking of individual parts of the repo url though is dependant on how they best want to format the embed
if they have it as a title, it isn't possible
it's a set url
Righttt
There is a singular url field you can add
for example, this is how i'm reproducing the existing example above
But that's it
embed = discord.Embed(
title="**`python-discord/sir-lancebot`'s Github Info**",
url="https://github.com/python-discord/sir-lancebot/",
description="A Discord bot started as a community project for Hacktoberfest 2018, later evolved into an introductory project for aspiring new developers starting out with open source development."
)
embed.add_field(name="Language", value="Python")
embed.add_field(name="Forks", value="[144](https://github.com/python-discord/sir-lancebot/network/members)")
embed.add_field(name="Owner", value="[python-discord](https://github.com/python-discord)")
embed.set_footer(text="Repository created at โข 03/10/21")
await ctx.send(embed=embed)
whoops, left in the wrong owner
Add the owner as the author with the Owner's profile pic and name, idk if that's possible
just pretend that it is a fork
How does it look on mobile?

anyways, imma build an alternative like i was saying
and suggest some possible improvements
brb
Hence I was being picky on the fields, maybe just add them as bold text?
**name**
value
but then you can't add manyy "fields"
Ok, I will try some alternatives
if you want to recommend a different formatting, i'd suggest probably trying to build one too
it's so much nicer being able to see it as a real thing
is there a point to showing forks tho 
wouldn't stars be better
even then, probably not all that fussed on either of them
Can you have emojis in the footer?
Markdown hyperlinks don't work in embed title.
\โญ
Only the inbuilt ones.
Oh nice.
What I mean by inbuilt is the field that Discord provides for links in titles.
yeah
I didn't know if it supported so just threw it in to test, looks like it doesnt
emb = discord.Embed(
title="Sir-Lancebot Github",
url="https://github.com/python-discord/sir-lancebot",
description="By [python-discord](https://github.com/python-discord)\n\nA Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development. ",
timestamp=timestamp,
)
emb.set_footer(text="144 โ โข 105 โญ")
await message.channel.send(embed=emb)
It's works, nice!
I should keep the forked from part if it's a fork right
that or created date
goal was to match what other people were using just formatted differently
Timestamp is usually the time that the embed was sent.
that would do, less number of fields, idt forks are needed tho
What I ended up settling on, but just here for ideas
longgg footer, no need of forks i think
https://github.com/python-discord/bot/issues/1474 also should this take users/all like the purge command
#ot0-psvmโs-eternal-disapproval message is a good example for use cases where we may want to purge reactions on many messages in a channel. I don&#...
i kinda like it, but at this point is it just better off going with an author field instead while keeping the rest as is
Yeah
I don't think it should. We can't actually restrict reaction deletion based on user like we can with messages
ok cool! you can assign it to me
"stargazers_count" is this the stars?
Alright got it
Which dot?
No, it's an embed timestamp
Can you make it not a timestamp, and just a value with a date?
Ok, how should I format it?
And this is a fork
That's good.
Would a search command be good also?
Would sir-lancebot#610 need a status: waiting for author label?
I don't know why I wrote it like that, but is there a difference?
Which one
list()
oh wait
They are different
You need the first one, the second will break
!e ```py
stuff = {"a": 1}
print([stuff.items()])
print(list(stuff.items()))
@sharp timber :white_check_mark: Your eval job has completed with return code 0.
001 | [dict_items([('a', 1)])]
002 | [('a', 1)]
yes but list(gen_comp) is the same as list_comp
ones slower
and list(gen_comp) is slower than list_comp
Yeah, but it's not Counter(thing) for thing in stuff, it's Counter(thing for thing in stuff).items()
In the first one I'm turning .items() into an explicit list, the second will give me a list with an items iterator object
oh true, it will too
So it's not a list() with a genexp
a little * can fix it
Unpacking in list comps when
it exists

Oh I didn't see the )
to
