#dev-contrib
1 messages · Page 93 of 1
it is a bit temperamental due to the nature of frontend web apps and backend redirects working together
but for the most part for links posted in discord it should work
(that you did not create)
hm
What happened here???
Alright I've given the help system PR another round of testing and fixed a small bug in our original design, once I fix connection issues I'll push my commits and head off for the night
not sure if that could work
I mean it's possible but that would require a converter
with regex
I pushed btw (sir-lancebot#632)
just use ,join() on it, and then allow it to be handled by
if repo.count('/') != 1:
might wanna open a issue on that?
They were discussing it earlier.
Internally, and then they moved it here.
I'll wait to see if joe, ks123, or kutiekaj9 have any more thoughts on it.
A discussion here will amount to nothing if it's forgotten; they can continue to discuss on the issue if you open one to make sure it's not lost in conversation
They could comment there thoughts on the issue
so we can have everything together
or it would get lost in the history of the chat
Ok, I'll do it when I wake up tomorrow.
are other users allowed to contribute to dewification project?
was willing to contribute if we have any issues open 😄
for site#366 can we use elasticsearch or haystack?
I'm not sure we want to attach external stuff to site after dewikification.
so just a normal search? using fuzzywuzzy?
We don't have very specific specs yet, but this can come later, after all content apps is done
shouldn't site#449 be part of the meta of a wiki.
Like:
title: How to Contribute a Page
description: Learn how to write and publish a page to this website.
+level: beginner
icon_class: fas
icon: fa-info
relevant_links:
Contributing to Site: https://pythondiscord.com/pages/contributing/site/
Using Git: https://pythondiscord.com/pages/contributing/working-with-git/
the experience levels are for resources, not pages
it could fit in site#421, but I'd rather a separate PR after #421 is merged so we don't introduce needless complexity to what is already a big PR
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.
yeah
in simple terms, dataclasses are classes that store data, enums are classes that store constants
dataclasses are just 'wrappers' over regular classes, that let you define classes mainly serve to contain data easily without a lot of the boilerplate of classes
enums are a lot more widely known and implemented in programming languages, and are essentially groups of constants that other code can reference to ensure they are well, constant
with enums you also usually don't care about what the actual values are
elaborating on Num, the values are "banner" and "icon" in this example:
class AssetType(Enum):
BANNER = "banner"
ICON = "icon"
in fact in many other languages, enum variants do not need values
enum AssetType {
Banner,
Icon,
}
they are constants, what makes you think they are data?
any function that takes in an AssetType can only take in AssetType.BANNER or AssetType.ICON, anything else can be assumed invalid (I don't say is invalid here because this is Python and you can do whatever you want, a language with stricter type system will error)
haven't gone through the whole code yet, but are they storing the icon/banner for a event
@green oriole is the description better now?
do we follow american or british english?
it does not, it is just a constant for other functions to state whether the file at download_url is a banner or an icon when applying it to the guild
yeah, went through the full code and understood what you are saying now
ok akars
Is there any desire amongst the maintainers to enforce a more consistent style for log messages & comments, or does it not matter? Some modules prefer to use proper sentences ended with full stops, whereas others use short statements without much punctuation. Is one preferred over the other, or does consistency only matter at the level of individual modules? Logs from the entire project are displayed together after all
The contrib guidelines don't seem to have an opinion
We haven’t really talked about logging in a long time. I’d say that anything above info should have proper sentences as they will trigger Sentry issue, I don’t mind having shorter statement for others, especially for debug or trace as there may be a lot of them
Mmm that's a good point with Sentry
I'm planning to do one more documentation & logging revision pass for my PR so I'm asking in case there's a preference to use full sentences I may as well update the code before I submit it for review
I always find it difficult to write good log messages; it's hard to consider the entire amount of contexts in which they may be viewed
It sure is. Balancing log levels can also be hard, we still only see info and above in production. Is it the PR about the new branding manager?
Yes, but I'm also wondering in a more general sense
For example, I'm facing a dilemma of how to handle the situation where some inner utility function fails to get some resource (i.e. file from github), and returns None as a result. In my code, it will log a warning, which semantically makes sense to me (it's warning that it failed to acquire the resource and that this may cause trouble for the caller), but then the caller will make a decision based on the return being None and log an error
It is the caller's decision to classify the situation as an error, so it makes sense to me for that log to be there also
However, if I understand Sentry correctly, this will create 2 tickets, which is not ideal
But this is more relating to log levels rather than messages
[download_file]: WARNING: I failed to download the file! This is not good, but I don't know what it means for the caller!
[apply_banner]: ERROR: Download failed, we cannot apply a new banner!
Perhaps reducing the warning to an info log would make sense in this case
What about logging both of them as warning and send manually alert to #dev-alerts with ping of some role?
Yeah, it will make two tickets, although I’m not sure if it is an issue
Maybe the first one can be an info indeed
I don't think that's necessary, it's really just a warning, not a critical error that would require immediate attention
In fact, the reason why it logs a warning in the first place is that it cannot ascertain whether it needs developer attention or not
If GitHub decides to respond with a 500, we probably cannot do much about it anyway
But if it suddenly gives a 403, a dev may need to investigate
That’s a good point, although having a Sentry issue will still he easier for us to investigate, I think we would rather have too many issues than missing some
If the first log is info, and the second log is an error, is it trivial for you to see the first log in Sentry? It shows something like breadcrumbs right?
Because the first log would contain the status code, but not trigger a ticket
Yeah, it does show the log history
Mm, then I may just info log it yeah, and let the caller decide whether the situation is an error or not
Awesome, I'll update it
Cool
Got a wrong return typehint in the example on https://pythondiscord.com/pages/contributing/style-guide/
Hah, that's really nice
The return type hint should be float, shouldn't it?
!e print(type(1/2))
@green oriole :white_check_mark: Your eval job has completed with return code 0.
<class 'float'>
Arguably, the type hint is too specific in this case
It would probably be better to use numbers.Complex for both parameters and the return value
but I'd imagine that would confuse a lot of people
I believe there is a number abc that would be a bit clearer, but yeah I don't think that's worth doing for an example like that
Fyi I decided on a completely different approach - instead of returning None, the download utility can raise on non-200 responses with an informative message, and the caller is responsible for handling that in whatever way appropriate, i.e. error-logging the exc message
This way the status propagates out of the utility and can be logged alongside the actual error
I think this is the best approach
Sounds like a good idea
Thoughts on giving the Python bot a stackoverflow scraper? Either in a command, or in response to a question asked in a help channel ("While you wait, here are some resources which could prove useful: https:.//..."). The API allows 10 000 requests for a given app as far as I know, so if the command has a cooldown it shouldn't be a problem. I'd be glad to pr this, but i'm on the fence about its usefulness. On one hand, many questions here can be answered by a stackoverflow search, but on the other hand it may be a lot of hassle when one could just open ones browser and get the information much easier...
I think we already have an issue/PR open for it
But here’s a fair warning
When we last discussed it, we:
- Didn’t want it in help channels or python-general
- Didn’t want on python, but sir lance
Ah, ok! Took a quick search through the GH issues, didn't find it.
No worries, I’m looking through myself to find where that issue went
It may have been decided it isn’t worth the effort
But I’ll look into it more
Yeah, understandable. A google search is really not that much effort!
It was Lancebot: https://github.com/python-discord/sir-lancebot/issues/579
Nice, nice
It’s rather: if we’re not going to allow it in help channels, and channels where people look for help, that diminishes a lot of its potential for good. That being said, more features are always welcome, and if the author is fine with the feature not getting as much use as it otherwise could, then they are welcome to contribute it
The reason we wanted this away from help channels is explained in the issue, but basically we wanted to avoid people dumping links to stack overflow without knowing the content, or helping the person asking the question
That would also be kind of a thing against the CoC.
Because we try not to say "google it".
It's the same situation in a way.
Yeah, "Read the _ manual" behavior is the opposite of useful
On a side note, anyone know is there a specific reason the !user command doesen't have a "trash" reaction? I'm assuming the idea of !user is that non-mods can't get others' information, but leaving the embed open allows others to see ones information. Am I missing something here?
If they're seeing their infractions they probably do it in the staff channels
Not the mods, the regular users have !user too, but only for themselves.
Mhm
Stuff like date joined, creation date....
There isn't too much info that you can't find yourself
Besides joined at
And infractions
True, but some people might want to delete their joindate from the chat anyway, instead of having it there all the time.
Join date it public information anyway
For example, my user ID is 126811506632294400
and decoding that snowflake gives the create date
!sf 126811506632294400
Created at 2015-12-16 22:23:39.225000 (5 years, 3 months and 9 days ago).
That's a really old user 😄
Valid points, all of them, but I wouldn't mind adding the reaction
I think it should be pretty simple with the tools we have available
Yea 😄 #bot-commands message
Yea, it's minimal effort to do, and I think it could be good for sure
There is a issue open by vestergukan on this
It is on bot, and is on planning state
@gritty wind What do you think about using redis for the .bm issue?
use that to cache the bm messages and have a reaction add listener
we can do that, or... just have a regular listener for a few minutes?
Adding redis here feels like adding a lot of unnecessary complexity
Yeah the wait_for is probably better
The major downside with a wait_for is you probably shouldn't have it running forever
which means that feature will only work for x period of time after the original command
but I don't mind that tbh
We could have it active for 5 min and then clear all reactions
Maybe even delete the embed entirely
ok i understand why pypi info was removed
but it would be nice to add a bit of the info back in the footer
cc @vocal wolf with pypi being your baby and all 👀
That could be useful, and pretty un-intrusive in screen real estate
oh god I've changed it like 3 times now lol
What kind of info are you suggesting to be placed at the footer?
i was thinking the author
The Pypi picture takes up more space than the text.
Fitting another line it shouldn't be too intrusive, and wouldn't make the embed longer.
!pypi numpy
Actually, maybe not.
for some packages, maybe
Depends on the description length.
ye
!pypi painful
I thought it was longer
it's a summary so I think it's limited to some length by pypi
it would be problematic if we had the description field instead (from json)
I do have some really long ones from when I was doing testing
let me see if I can dig any up
I don't think it is actually limited
!pypi neuraxle-tensorflow
for names there's
!pypi aws-solutions-constructs.aws-dynamodb-stream-lambda-elasticsearch-kibana
aws likes long names lol
why is that a thing lol
if you visit the user that publishes these packages
there 10 or 20 that look like that
what do you mean?
do you mean the mouse over text?
because that would be nice to be used 👀
how would you add another library to the !d ?
!help docs add
Did you mean:
docs
docs delete
docs set
docs get
!help docs set
!docs set <package_name> <base_url> <inventory_url>
Can also use: docs s
*Adds a new documentation metadata object to the site's database.
The database will update the object, should an existing item with the specified package_name already exist.
Example:
!docs set python https://docs.python.org/3/ https://docs.python.org/3/objects.inv*
sadly if you wanted the docs for set you would have to do !docs get set 
right
lol
when do you decide to add another one?
Feel free to suggest one here or in community meta
having pymongo on there would be useful I think, but i dont know if im the only one who's linking to it
I don't think there are any hard guidelines
@github_group.command(name='repository', aliases=('repo',))
async def github_repo_info(self, ctx: commands.Context, *repo: str) -> None:
"""Docstring here"""
repo = '/'.join(repo)
Is this fine?
works fine
and this is the error message
yay now it needs one approval from a core dev
@tawdry vapor think I've found the cause of the datetime oddity
>>> datetime.utcnow()
datetime.datetime(2021, 3, 26, 22, 8, 47, 441603)
>>> a = datetime.utcnow().timestamp()
1616821624.207364
>>> a = datetime.utcfromtimestamp(a)
datetime.datetime(2021, 3, 27, 5, 7, 4, 207364)
when my computer clock is utc-7
using just datetime.fromtimestamp(a) works as expected
I'm guessing utcfromtimestamp interprets the timestamp as aware, in local tz, and compensates
Possibly want to check the other places that use utcfromtimestamp() just to be safe
Hah serves me right for not reading the docs
@sleek steppe Looks good!
is there a way to manage the split area of the while reviewing a PR
like reducing the red area here
For bot#1136, would something like a subclassed Context work?
there is a issue for a embed helper command, if all embeds use that, we don't need to subclass context
but yeah i think there are the only two possibilities
well subclassing seems a better option, since one can miss using the embed helper
on the other hand, am still not convinced with adding trash option to all messages
fwiw it makes sense on a lot of them
because ugh some of them suck and are spammy and never go away
whereas honestly, it'd be nice for some of the error messages to not autodelete
or the embeds sent in help channels
we can add can_be_deleted argument or something like that tho
That makes sense. I'm thinking something like this
embed = GetEmbed(...)
await embed.send(messagable)
like, for the most part, if a package isn't found, I personally don't want my own invocation to be deleted
Enums are like constants, so is it good to keep put capital cased variable names inside enum classes?
But discord.py uses utcfromtimestamp does that means its datetimes are not in UTC too?
None of them, just wanted to see all of them 😓
We should probably just put all the emojis somewhere at some point
bro what
that's very cool
hmmmmm
@gritty wind apparently
webhooks can also use every single emoji on discord
…that's old news
#reddit does that
yeah and bots can get pretty much nitro emojis :x
but they must share the server
webhooks and channel topics have totally free range
why are all these scripts so big
It's a large project
hi
https://github.com/python-discord/sir-lancebot/pull/642#discussion_r602813409 merge conflicts 😬 😬
Hey
Is there an example of issue being moved permanently from one PR to another, like I know them, but I dunno the original issue number.
looking through concrete examples, most of the issues moved are from public to private pydis repositories.
I will amend the issue to treat 301s as 404s.
!remind 10M fire pr from f1re
Your reminder will arrive in 10 minutes!
I wanted to see what is the json got on 301s
Your reminder will arrive in 10 minutes!
{
"message": "Moved Permanently",
"url": "",
"documentation_url": "https://docs.github.com/v3/#http-redirects"
}
aha
@patent pivot
Here's your reminder: fire pr from f1re.
[Jump back to when you created the reminder](#dev-contrib message)
Does anyone know if this also allows maintainers to push new branches in my fork? The tooltip seems to imply that not
But I'd like that
maybe I'd just have to add them as contributors
Although it warns that they 'potentially' could gain access to other branches
what does that even mean
@patent pivot
Here's your reminder: this.
[Jump back to when you created the reminder](#dev-contrib message)
I think it's only the PR branch
okay, I'll just manually give reviewers access if they want
or I guess they could fork my fork too
Right, so how to get the url of the moved issue. Like if it is moved from bot to Lance, how to get the issue number on Lance
@short snow that is no longer required, see this message I sent earlier
Question. Was it intended that https://git.pydis.com/blackbox still redirects to https://github.com/lemonsaurus/blackbox even though that was moved to Lemon's personal GitHub? Is it because it still relates to PyDis operations?
This isn't something we configured
It's something github does by default
if a resource is moved, it's old URL will auto redirect to the new URL until a new resource is added to the old url
@sullen phoenix review left 👍 https://github.com/python-discord/bot/pull/1486#pullrequestreview-622741233
is there any reason this message was not pinned in the help channel
<#help-burrito message>
Matches up
Bro
Blacbox
blacbox --init
Not blackbox
Shouldn't the bot redeploy with a reconnect rather than a reinit? This would mean that when updated it could get its previous history
The ci environment contains a gh api token. If you execute code checked out from a branch to which others have write permissions, the token could be leaked. If someone has the api token, then they can use the api to write to other branches I guess.
The leak happens via malicious code that would read the token and send it to the attacker's server, for example
Oh right, so it explains the causality there. Maintainers could edit the workflow and through that access other branches, makes sense.
I was struggling to understand exactly what it's trying to tell me
Yeah it's actually really easy I think, compared to the other way around (fork getting access to main)
I find it really difficult to think of everything that could go wrong with the workflows and secret access
I was talking to Sebastiaan about it earlier because I had some doubts, but he explained that the token's scope actually changes depending on where the workflow is being triggered from
I don't know that much about it
cheers, will address them soon
contrib/core dev review on https://github.com/python-discord/bot/pull/1486 would be neato 🙂
Guessing the lack of the space is a mobile bug?
!src server
Returns an embed full of server information.
Yea, it looks like a mobile-only issue
seems like the \ and the lack of {features} being populated is making it miss the newline char?
thanks @patent pivot, @vale ibex, and @cold moon for the quick reviews
oof that review came right after the merge
was a bit too late but submitted my review although not likely, handling for the None paste_link should be added or it'll result in an exception if it does fail
riiight, i can open another PR later today to address those reviews
better late than never!
bot#1471 needs approval from kosayoda, and sir-lancebot#632 needs an approval from a core developer 🙂
@clever wraith Are you planning on finishing this PR off?
sorry, i was afk, i'll work on it a bit
ok, it's waaay behind
ty on the update
how do I pull from the repo and still have my changes
git pull upstream main
You'll still have your changes. If there are merge conflicts then you won't lose your changes, you'll just need to resolve them.
Don't do that
You just create unnecessary merge commits
There are currently no conflicts with master. Your PR is pure text content so there's no benefit for testing to have the latest changes
For bot#1485, should I just add allowed_mentions, or should I filter codeblock escapes as well?
so to be clear,
I'm using an invisible character.
@stable mountain no longer relays dms to staff.
Not automatically, no
what does it look like?
but we are able to get it on request if needed.
okay that's kind of being a dick, python
oh
yeah, we changed it so if required we can pull DMs into a text file, but otherwise don't relay live
well, it relays them to the pastebin, no?
pls add that to the privacy policy now that dms are able to be pulled off of the platform
👀
as that was the reason it didn't need to be in the privacy policy last time i was concerned about this
but now that it may be pulled to a pastebin/stored off of discord, that needs to be properly disclosed, no?
it's already there.
can someone ping me im testing smth
👀
why does it refer to a pastebin
These are the changes I've made:
# bot\exts\info\information.py
# line 450-452
# replace backticks as it breaks out of code blocks. An invisble character seemed to be the most reasonable solution.
# we hope it's not close to 2000
paginator.add_line(content.replace('`', '`\u200b'))
# line 471
await ctx.send(page, allowed_mentions=AllowedMentions.none())
yes im giving you a hard time
autocorrect, amended.
every where else in the privacy policy it refers to it as hastebin
cool
damn its an instant update
are these changes fine?
lol
I think so, yeah
Would appreciate people's opinions on https://github.com/python-discord/sir-lancebot/issues/341#issuecomment-808939964
Looks good 👍
Lgtm
@sleek steppe https://github.com/python-discord/bot/pull/1488#commitcomment-48815459
You're able to edit comments with the three little dots to the right of the post.
I made a mistake on the commit message
ah
.bm 825809428870856746 bm issue
Is this blank line supposed to be here? https://github.com/python-discord/sir-lancebot/pull/644/files#diff-95c311f77020e1a02cceeb127aaf97a7ee6d297bce44caa245f94c0dab4db894R26
smh

i am welcoming bikeshedding on this message
@vale ibex can you re-approve?
@clever wraith Glad you agree, already PR'd it 😄 sir-lancebot#645
@vale ibex I'll leave a review in a bit!
No rush 🙂
hey if you're adding that what about reply support? 
aka message.reference support
hmmmm.. do we want a separate message? you could potentially keep the reaction on the original message, and then DM whoever presses it
And auto-remove the user's reaction
👀 why tho?
imho i hate bots that do that~~
why not?
we do that with our paginators.. keeps things neat
what about removing all of the user reactions when it closes?
It's the same amount of API requests
there is a clear all route
The reason for the embed was mostly for discoverability
yeah but in this case you avoid the bot's reaction
right, but when it ends then all reactions are removed
but after 5 minutes if its inactive it is nice to remove the dead reaction
so whatever we do we'll trigger a remove all at the end of 5 minutes
I guess that's true
This embed is deleted entirely after the timeout too
noice
if you do that but keep them there before they're all done, it would be nice since this is something that multiple would like to get, so keeping the other reactions kinda lets people know that a message was bookmarked
hmm.. it still seems quite bulky to me, but I'm not incredibly passionate about not having it
just feels like an inconsistency to me
because of the nature of what this is, sending a person's msg to dms...
keeping the user reactions there to see who reactions for just a few minutes helps some people be less paranoid 
we keep reactions where the counts are important, like in polls, and remove when not, like in paginators
this isn't important imo
eh, i mean, you remember all the message IDs you send? lol
bear in mind .bm works in DMs lol
I'm not sure I get the argument, you see the result of the reaction in your DM's
yes of course
👀
I'm heading to bed anyways, can you add your thoughts to the PR after this discussion is seen through?
yeah
oh dang
lol
okay anyways imma get back to figuring out how to get rid of these gitshit errors
srsly if someone can help i'll be in #tools-and-devops 
I cannot connect the repo to github 
you need to do uhhh
go to #tools-and-devops
does sir lancebot has a math quiz command
idk whag to contribute so i wanna make like a command that gives you math problems to solve
bump 
bump 
!remind 4h bot#1471
Your reminder will arrive in 4 hours!
how we want to handle bookmarks which are embed?
cc @vale ibex
currently the content is none, so it is blank
site#465 is basically part of the staff pywek project (aaaaAAAA)
That was created before we had a team lol
And it probably won't be done before the competition tbh
@exotic ember
Here's your reminder: bot#1471.
[Jump back to when you created the reminder](#dev-contrib message)
wtf it's been 4 hours already?
@tough imp What do you think about using python3.9 in the branding repo?
Well we can reuse the assets but not the code
It should use the same Python that bot uses
why?
3.8 then because the library devs sucks 😔
yeah ik.
Because it verifies that bot will be able to load the meta.md files, so it should use the same Python and the same dependency versions
That’s nice
right, ok.
In order to/for -> to/for, what do you think about this, since in order to/for becomes too wordy.
You seem to use this alot in your doc-strings and explainations
and about using colorma or rich to give colors to the [PASS] and [FAIL] 😛
no worries!
I don't feel about this in any way, we can use the shorter expression
It would be nice, but I also think that we should keep a very minimal set of dependencies there
unless the contribution makes drastic changes, it will probably only fail 1 event, so the output shouldn't be difficult to read
currently the reqs.txt only declare dependencies that are absolutely necessary for it to function, I see some value in that
i think there is a way to do it without those, using some special characters string
You can but it won’t be portable
On some terminal emulators on Windows (such as cmd.exe) it will look like garbage
hmm
We don't currently do anything with it, so my PR doesn't change that. Maybe we should raise an issue to discuss it
@short snow the image is broken lol
fixed it
tenor gifs go to the page not gif 😦
Noice
maybe if we just add rich to dependencies, won't cuz much harm 🙃
Really doesn’t sound like a very useful feature
Hi guys! Tell me where I can find a link to snakebox on github? (with commits for 2020-2021)
@vale ibex for the .bm, could you make it so it accepts a reference too? 
wydm by reference?
like this
Ahh right, yea that could probably be done. I'd rather keep it for a separate issue though
Do you feel like raising it? 😄
The reaction is to bookmark a message that someone already bookmarked right?
I think they mean to use this as the..first bookmark if I'm explaining that right
So any reply to a message will cause the bot to DM it to you? not sure I follow
The suggestion is that for example if I do
.bm
It will bookmark your last message
I was about to say that
.bm just. Turn. Off. The. Mention.
Mentions can be turned off
Although I uh may have forgotten to turn off that mention intentionally
i obviously
forgot
still didn't review 
Also would it be cool for !raw to take a message reference to?
I don't think we need reply support for bookmarks or raw
as mentioned it relies on people to turn off pings
which is not the default
Well, the default is on and I doubt most people disable them
fwiw almost always its a bookmark within the conversation
Hm
so like, one person replies to it making it easier to everyone see what the bookmark is referencing
what's that based on
.bm
you don't see every bookmark in the server 😄
i'll put it this way
replies only work in the same channel
if its not the current conversation, its much less likely to reply to an old message with .bm rather than using the link in #bot-commands like the bot makes you.
i rarely see people reply to messages from old conversations with a message that doesn't relate, and i feel that the ping wouldn't be too annoying
if it annoys people enough it could be removed, but i doubt it will
I just think that this isn't a great use case for replies, especially if we migrate to slash commands
you intend to migrate?
ngl slash commands do not have the amount of greatness that the current bot system has
arguably i wouldn't migrate
and the api is better
I think it'd just be nice that if I emoji-react to an existing .bm it'll also send it to me. That way we don't have half a dozen people calling the same command on the same message
yknow
It is part of Chris' PR 
hm
at least I think?
I think for some of our simple commands slash commands work very well
instead of the replies then, add a link to the message in the response to people can see what they're gonna bookmark since an ID doesn't give much
or quote the message
some, perhaps. Def not all
any examples?
I'm trying to think of bot command functionality which wouldn't work out of the box
fwiw, the current system is all or none
it isn't, we can migrate components as necessary
so all moderation commands would be nada
no i mean
the slash api is users can see every registered command or none
that's being added
as of now, they haven't changed it yet
they have said they are adding it
coming
(discord.py 2.0)
I'd totally be for a /note command
Like, that's the only command that I would really like to have
Because you wouldn't need to switch to a mod channel to note
I've had a peek through and can't find much that isn't supported with slash commands
So I'm fairly confident that as the feature matures and some QoL stuff comes such as permission locking then we should migrate
I agree
I hope that the UI will be better though
Because we have a good 30 or 40 commands on sir lance
yeah
How can we count how many top level commands we have
Nevermind, there is no int e in lance
limit is 100 fwiw
the biggest concern is
every response is webhook api
so allowed mentions is free range
a large bot didn't fuck that up or anything resulting in thousands of pings for people
It was a bug on discord's end iirc
its allowed mentions
You are too fast Joe
lol
But allowed mentions didn't apply
but yeah I mean... @stable mountain is currently free range with mentions hahaha
we just... disable them
It can ping mods, admins and owners, right?
I really wonder why it can ping owners haha
we figured if people found a way then we'd like to know lol
Hah
@patent pivot will @stable mountain or @dusky shore ever have slash commands?
Yeah, was just saying above how we'd likely eventually migrate
There are some features that need to be added still, but yes that is probably a direction we'll go down
As a service provider, you can partner with GitHub to have your secret token formats secured through secret scanning, which searches for accidental commits of your secret format and can be sent to a service provider's verify endpoint.
^ if someone remembers how I used to talk about the regex for bot tokens, this is how discord bot tokens are revoked when they're uploaded.
That is a general description of the process GitHub uses. It doesn't go into details of Discord's token format.
no ik
but it does mean that discord has an endpoint that could be used to deactivate posted tokens
perhaps something on this page https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-urls
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Sorry, I misunderstood your original point.
basically if one was to upload a token to github it gets invalidated by discord. But rather than use github, I wonder if the https://discord.com/api/oauth2/token/revoke url would actually work for this
Oauth isn’t related to the bots afaik, but if you have the endpoint, you can test
hello!
Hi
So, all our projects are available at github.com/python-discord
But the most frequently contributed to are @dusky shore, @stable mountain, and our website. We have a page describing how to get started with each of the projects here: https://pythondiscord.com/pages/contributing/
Sir-lancebot is specifically targeted at complete beginners for the most part. It's a good starting off point for open source contribution.
The main selling point of sir-lancebot is you can contribute a feature, become familiar with an open source process, then see your work here on the server
All of the features available in sir-lancebot were contributed by someone from the community or staff team
If you're interested in any of these projects, have a look through the issues tab on the github repo (https://github.com/python-discord/sir-lancebot/issues for example), and leave a comment
You may also want to keep this somewhere handy, it's a long list of open source projects organized by language
https://github.com/MunGell/awesome-for-beginners#python
Yeah I ended up monologuing a bit, but feel free to ask here if you're unsure about anything
will definitely do, and thanks for the intro 🙂
Some of these are pretty good
I've been meaning to check out pytest for a while now
they recently got a discord server, which is great
pygit2 isn't bad, just to install it i had to go through 3 different webpages for install instructions for a dependency
lets just say it was recursive hell
pygit2 needs libgit2 which needs cmake and each one had more exposition than explantion
I really hate how dependent some things are on other libraries. I'm by no means innocent, but I've been in dependency hell for a while trying to upgrade a package to 3.9
There simply are waaaaaay too many abandoned packages that probably won't be upgraded in our lifetimes

dependency hell is fun!
out of curiosity why won't some packages just run on 3.9?
All of the ones I have trouble with do run fine on 3.9
and I got the project running locally
thing is, they have no published wheels for 3.9
so I need buildtools
ok, why won't tensorflow then
Tensforflow is huge
pfft, you're talking to a guy who built 3.9 from scratch and then realized that pyenv would just do it nicely
they probably do some super crazy stuff that's directly dependent on python specifications, which can change each version
or maybe they're also in dep hell
ah
smh
anyways, imma head to sleep
Catch you later
👀 👀 👀 👀 nice
but as you might see, a bit of a twist because its a dev bot, so the branch might switch
using pygit2 for that which i THANKFULLY had experience installing when i was self hosting a different bot
so it was actually already installed 
fwiw i actually only looked at the src of @stable mountain to see the Path usage, I actually wrote everything myself
I wouldn't steal code
Lol it's MIT licensed
without including a license obviously
hehe if you check my admin cog i stole that verbatim from a different bot
granted the purpose for that was, I don't wanna spend time writing a load cog command
or an eval command
not when learning to write those without them already would be kinda hard
so I just copied it so I would have a framework to use
The cog I borrowed from a different bot is mozilla 2.0 licensed so I have no idea what that really means 
Hey
Hello!
Can you describe it or demonstrate it in some way?
Do you want to work on that issue?
yes
It's already assigned and has a PR open
But for that what should i do
There isn't much left to do for that issue. It has already been reviewed, and now it's waiting for the author to address the review
If you want to review it, feel free to
But the code is already there
so did Any issue that I can work on it
If you're looking for an issue to work on, this will filter the search to approved issues that aren't assigned
https://github.com/python-discord/sir-lancebot/issues?q=is%3Aopen+is%3Aissue+label%3A"status%3A+approved"+no%3Aassignee
The ones labeled good first issue are usually the best starting point
https://github.com/python-discord/sir-lancebot/issues/643
This one or what
If you'd like to work on that one, it is available
just leave a comment on the issue
Okay
what is "that" here?
It was deleted lol
@keen valley if you want to work on that issue, you have to leave a comment first
Otherwise we end up with miscommunications
It doesn't have to be anything crazy, just: "I want to work on this"
Defiantly I will
If I take some time to solve that issue then it will not a big issue I guess @gritty wind
I think it should be fine
#dev-log message discord just removed it xd
@turbid cedar Recruitment isn't allowed on this server.
looks like xith is back on duty, poking ppl 🙃
I've been back for a while
do we have a policy on full stops in logs
not afaik
full sentences isn't full stops
I don't think we do it, and if we do we probably shouldn't
commas, however, is of course fine
uhhh it is not needed imo, but commas can be be good to break sentences while reading the logs
commas are necessary in some places, full stops aren't necessary in most places
ok well, that upon part was from grammarly, and I wasn't sure about it, so i added probably @green oriole
Sure, no problem
I added full stops to log messages in that module, so for the sake of local consistency that line should have it too
but I'm unsure because overall the project isn't consistent
hmm
some modules have them, some dont, some mix
there is a issue open on that, on sir lance
we're having discussions internally on stuff like trace logging, maybe setting out some grammar stuff could go alongside that
there's a similar inconsistency for comments
yeah
I used to never end comments (proper comments, not docstrings) in full stops
but sometimes you want to write something longer
and then you either have to write an awkwardly long sentence, or introduce inconsistency
so for this PR I tried something new with the full stops
but of course if maintainers lean one way or the other, I'll comply
last time I asked I had the feeling that there's no consensus
yeah, we don't have consensus
if we do then we'll make that clear in guidelines somewhere

the way I see it is that no full stops may even encourage writing better, more expressive logs and comments
and that was my preferred style for a long while
but I also come across situations where you just cannot push everything into a single sentence
and I'd rather have stops everywhere than inconsistency
Well, in my opinion I don't think full stops are necessary in logs.
but yes for comments
it doesn't matter, 'to ensure that we provide embed' is wrong, the article should be there
were you using some kind of software for the grammar?
the sentence can definitely be improved, but not by removing the article
Grammarly
@vale ibex I think the timezones are still wrong in the PR. For example, there's a case where utcnow(), a naïve UTC datetime is being added with fromtimestamp(), a naïve local datetime (cause the function converts to local time). utcfromtimestamp is technically fine. The problem is calling datetime.timestamp() on naïve datetimes; it will always assume they are in local time. Since discord.py returns naïve datetimes in UTC, created_at.timestamp() results in a timestamp that's relative to local time despite the original time being relative to UTC.
I think I'd feel safest by making everything tz-aware, as ugly as that may make the code.
I think the code was previously tz-aware, before this PR anyway
I'll give it a look this evening
I have it open now and I have some time
I could take care of it now
I also wonder if using arrow will result in nicer code here. It's already a dependency for something else apparently.
I think it's currently only used in the init for logging timestamps
but yea, I imaging it'll be much nicer
Some parts were tz aware others weren't it seems
feel free to work on it 😄
But the calc used to be much simpler so tz-aware didn't play a role
idle_time = (datetime.utcnow() - msg.created_at).seconds
yea, that's true
Now it does since we need to be mindful of converting timestamps back and forth
Such a headache 😔
I try to avoid timezone work as best I can at work 😄
Apparently arrow was only used for arrow.utcnow() once in the branding cog
Can't say I agree with keeping the dependency when porting it over
But that's history now
well, maybe it can become useful if we already have it
Yes I am using it now
👍
Ahhh, it's in lancebot where it's used in the init
Also, correction: it relied on humanisation from arrow too
Though IIRC we already have a util for humanisation
yea, bot.utils.time.humanize_delta
Interesting dotted path haha
Haha
When linting takes longer than getting code reviews smh
reviewing #1470 now
uhhh
ah
what are the possible values of closed_on?
I see "cleanup", "command", "claimant_timeout"
what is the first one?
cc @vale ibex
# If for some reason we have more than `max_available` channels available,
# we should move the superfluous ones over to dormant.
It's done on init, ig if the max available is lowered
right
so the reporter doesn't differentiate between closed after claimant and closed after non-claimant?
ah right
is that documented somewhere that I am missing
either way I have a pending comment for a docstring update so I will continue having a gander
from what I can see, it's not documented
I didn't write that part, so I'll have a look around
So the docstring on _cog.unclaim_channel has some examples, but not an exhaustive list
It looks like it's only missing deleted and others_timeout
deleted being for when the claimant deleted their message, so we use the shorter timeout
review left
actioned your comment about the docstring
I prefer naïve when reading docs or w/e, but usually write naive just because I'm lazy
That wasn't an approval. It was a comment.
huh wait, I updated the docstring in unclaim_channel() since that's where it was previously
didn't notice that you had tagged your comment against the _stats func
should we add some info there too?
I think it's fine
It's more visible on unclaim_channel anyway
Oh I see what you mean
The docstring for the stat function still describes it as a boolean
Yeah it'd be good to fix that
By the way, I was considering making it an enum but decided against it cause it felt like it was over complicating it.
yea, the docstring is just wrong since it's not is_auto anymore
I just feel iffy about passing around strings, especially since we compare against one.
If you think so too then go for it
Strings are kind of evil since they're more prone to programmer error
hmmm, would _stats be the best place for the enum?
Yeah
👍
uhh
we compare against it in the main file as well though right?
so it should go in _channel
imo
Either one works for me 🤷
Hah lucky we did, found a reason that I didn't mention
will have a re-review of that and then we need one more staff/contrib review and we can merge
👍
Well, I reviewed it
It probably doesn't count cause I made commits but we can overlook that
Just glance over this pls
if you'all are good with it, just force
yeah, need to alter a branch protection rule to have the option to force
i altered it it's all good
it's just an "Include Administrators" toggle
which we can flip off for single PRs like this where there is a strong review consensus anyway
addressed some of your comments in bot#1491 @brazen charm
I don't think we get access to either of those lol
We should once they're out of beta then
they're part of the paid plan
GitHub Advanced Security
GitHub makes extra security features available to customers under an Advanced Security license. These features are also enabled for public repositories on GitHub.com.
All public repos on GH have it
And this just means it expanded to private repos
Like python-discord/secret-project
🎉 It didn't crash and burn on upgrade
The docs you linked say that at the end too.
Is that a clone or actually this bot
actual bot
mods + core devs can access prod logs
yea, now we just gotta wait until the first close for a new reason
For what reason 
my favourite logs are metricity
We changed how help channels work slightly, expect a changelog soon ™️
Personal thing about this but should it let the user know when a mod views their dm logs?
haha yea, the constant syncing spam
Damn
I don't think so? We only look into DMs for moderation purposes + we do state in our privacy policy that we have that capability.
is this the 10 minute and 30 minute thing?
yea
Ah
Although we may play with those numbers
The autohotkey discord runs a variation on the help channel system here.
We've heard
Yes you've heard from me
We inspired the one on the TypeScript server as well lul
I don't think it's too helpful to compare since we have a much larger community and much higher volume of questions
It's a good system provided you don't have as many members as we do 💪.
they have uh
18k lmao
Is that the one?
hahahahaha
Seriously?!
yes, it's lower volume
Holy
and it's verified 
When we were that size we could probably have had similar
So do they have problems that take longer to fix or what
they work with msft
less questions
oh I see
We can't be verified as we aren't officially python, since the PSF doesn't do that kind of thing rn
Ngl this server is like one of two partnered servers in my entire server list and I'm on 100 servers
Granted, the verified icon takes presidence over partnered, so I'd have to double check
bot#1492 just a small PR to fix incorrect reporting of close reason
based off https://github.com/primer/octicons
O dope
You can also use any that you have on your keyboard as far as I could tell
If on windows, try windows + .
the links in codeblocks aren't displayed properly https://pythondiscord.com/pages/contributing/contributing-guidelines/supplemental-information/#logging
cc @green oriole
Your reminder will arrive in 20 minutes!
Notion exported the links as
`[text](link)`
```That's silly
we might have a feature freeze in the wiki soon while I migrate content to dewikification
@green oriole
Here's your reminder: fix it.
[Jump back to when you created the reminder](#dev-contrib message)
Also can we get freeze for resources?
freeze meaning?
we haven't made many amendments to resources anyway as of recent, but yeah
@cold moon @exotic ember how close are we in terms of getting those migrations done? I'm fine with calling a freeze now unless critical
Basically content app itself is ready, there is PR open for improvements. My resources PR is waiting for review.
Event pages are already migrated
I will do redirects after resources PR get merged
@cold moon if you want you can start work on it, there shouldnt be any major changes left for the resources PR
Okay
So you have any estimated time for the freeze?
There isn't much to redirect, I think. Only resources and events.
@green oriole should be a week at most, then changes should target dewikification
Is anything urgent?
That's pretty fine then
Okay, I've made necessary amendments so we have no private pages in the wiki anymore
@cold moon guides content will need redirects too, I'll get you the changes when I work on the migration
hahaha
what is freeze, again?
stopping all new content
No changes during this period
oh ok
So we should enter the freeze now?
like no commits until dewifikation happens
No wiki changes in this case, if I understand correctly
no wiki/resource changes, site wide feature freeze won't happen until a quite a bit later
all articles on site
to access them, pythondiscord.com/pages/{id} can be used as a shortcut
danke
https://github.com/python-discord/site/issues/459 i have left a comment here, would be good if someone can reply 😄
@exotic ember I think I need resources routes for redirects.
@cold moon alright then, I'll try to get that merged as soon as I can
What's Xithrius on github's discord username here?
lol
@vocal wolf
sticking to the theme 
@vocal wolf , yo I got your message on github. My laptop broke recently and so I can't make the changes until it is repaired, I am really sorry for this
allow someone else to take over or wait until lappy gets fixed?
Hey @gritty bolt, do you know how long it will take before you can continue the PR?
Depends on how quickly my laptop can get fixed, but if I were to give an estimate, I would say a week from now
Alright, I think it is okay for us if you want to pursue the PR, it isn't really time sensitive
In that case, then I can work on it when I get my laptop back
Can sir-lancebot#632 get an approval from a core dev?

I'm going to resolve some of the addressed comments on bot#1463, getting hard to read things now
No problem, I hope everything works out for you. Thanks for the update.
cool go ahead, I don't think i can do that
If you created the discussion you should be able to
I think this is one of weird things of GH
pending comment for you here: https://github.com/python-discord/bot/pull/1463#discussion_r604729943
@patent pivot https://github.com/python-discord/bot/pull/1463#discussion_r604270842 for the text wrap thing you mentioned
right, i will have a look at it tomorrow, too sleepply rn
https://github.com/python-discord/bot/pull/1463#discussion_r602640328 this is not resolved as of now
It appears to be on an outdated diff anyway, let me double check
I think the response from kwzrd clears it up, the code is fine functionally
Actually, the logging comment probably isn't worth it since we're considering removing trace logging soon, it shouldn't be in production
uhh it is basically you need to log fetch succesfull messages, and before raising runtime error, just log a message, so it closes the log.debug("Fetching..., i will comment on the pr, once i get back to my pc
right, I can see to that, it'd be nice to get it merged by today which is why I'm having a look now
ok cool, anyway i will give it a
tomorrow, tested it locally and worked like a charm
tomorrow meaning, 6-7 horus
the runtime error will propagate through anyway won't it


