#dev-contrib
1 messages Ā· Page 94 of 1
it will, but it will keep the logging statement "unclosed", otherwise there is no need of logging the error message
I think an informational success log is all that is necessary here, the error will be handled through other flows
right, same here.
ok am computer, will approve it
a couple of info level logs in the fetch_directory and fetch_file methods and then the open one about a minor comment wording change
both optional to implement, I'm approving now
and pipfile merge conflict
ah yeah
let me catch up with the conversation
is left to mention
wait dont merge it the target branch is still set to my fork
yeah don't worry, won't merge
and, did you guys have a discussion about the new file preview feature
would you run checks on the file content?
oh ok
depending on some implementation details we might run checks, we'll see
#community-meta is talking about that right now.
Btw, for sir-lancebot#605, the orignal logo is not soo visible so would we want to create a personal logo for it?
regarding the fetch utils, a failed fetch looks like this
it reaches sentry, but its logged by the caller, such that it can say what it was trying to fetch
this way you dont have to look at logging breadcrumbs to figure out exactly what happened
i will add a log on success
i'll try to address everything tonight, need to finish some work first & have something to eat
yeah don't stress on it š
@tough imp debug is fine with me š

i'm sure it will, thank you for the contribution!
Will I be changeloged? 
fosho!
did we ever changelog .github for users?
ah that's an old feature isn't it, so probably not
changelogged! @sleek steppe
Thanks!
This PR is now up for grabs: https://github.com/python-discord/bot/pull/1303
Hello every body i need some help please . I try to create a contact book ( MVC app) with PyQt . I want to create a "search field" someone can help me please ?
Hi! please check out #āļ½how-to-get-help. This channel (#dev-contrib)is specifically for discussions around Python Discord projects.
Ok thanks.

~~formatting bug on mobile
Needs to have a \n between both ```
So it becomes
```
Fan of Python, Yada Yada yada
```
And not
```Fan of Python```
So it becomes
Fan of Python, Yada Yada yada
And not
Fan of Python
Is there an easy way to work on a PR like this? is it possible to move the code from their fork to a branch on the main repo?
Not completely sure, usually what I do it just checkout the branch to continue working on it with gh pr checkout 1303 and just push to that branch
Alright I'll give that a quick try and see how it goes
you would need the github cli installed tho
I think you can probably just checkout their branch, make a new branch off it, and push it into the upstream
That wasn't in my PR though
I have an alias setup cpr = "!cd ${GIT_PREFIX:-.} && git fetch origin refs/pull/${1}/head && git checkout FETCH_HEAD #"
or just continue working on their branch if that's ok
I'm going to checkout branch and push it up
it'll make a new PR though, so I'll action all of the comments first
What is && VS ;
Those literally look the same on my phone lol
Mobile's code blocks are weird.
You have an iPhone, this is an android bug
(right?)
Discord is an Android bug
You see the screen shot fwiw?
Yeah
What do you mean? I can't see && VS ; in that command?
I don't even see code blocks on android.
&& vs using ;
lol
Oh I mean what does the ; character do VS using &&
I just see the ones that are like print("hello"). Everything looks like that.
echo abc; echo def; vs echo abc && echo def
Yeah ^^
the differencce iss
I was using && for a period and now was using ;
; continues ignoring the previous error code
Ohhh
one works on windows one doesn't 
Oof
Btw is precommit a pydis specific thing?
Like, a tool written and used in the repo?
Nah itās a standalone package
Pretty nice tool when it works
I still don't get why pipenv run precommit runs differently than pipenv run pre-commit
precommit installs the hook
Two different commands
pre-commit runs it
Precommit is a custom one we defined
Which just runs āpre-commit installā or something along those lines
oh cool
doesnt have to be pipenv btw
its a executable that lives in your git hooks folder
can easily be run manually without pipenv
Does a user lose roles when they leave a server?
uh
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.
very out of date template
yes
Cool, I don't have to care about this case then, thanks
lol
it's up to date
that's a 1-to-1 copy of the server we use for testing bot features now
did you just update it?
does the....... when ducky logo appears it is shown first in log
or after the time expires ?
i think the one here was the very first duck, nice
It isnāt the same structure as the main server
no
Wait that was a thing...I didn't have to make it from scratch?
Itās just enough to get you all the things you need
Canāt add those so
about that
idea: make a public bot that fetches all of the emojis in the test server and has one command, to add emojis to the server when invoked by the server owner
You can put any emoji, it doesnāt have to be the trash can
then instantly leaves the server
things are planned for easier setup, will happen sometimeā¢ļø
The main package for that has been in review cycles
Probably since I joined staff but still
Review cycles
you mean, review closed loop?
At this point, basically lol
https://pythondiscord.com/pages/contributing/bot/#server-setup also the reddit link is to an archived site
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.
Iām pretty sure thatās intentional
It was archived before that guide even existed
I've raised bot#1493 as a replacement for bot#1303
I actioned the comments from @tawdry vapor and gave it a pass myself, then tested it locally.
I was planning to give it another read through to make sure there wasn't anything else that I missed, but it's getting late, so I'm going to head to bed for now.
this had the ninja duck smh
The first one, so that's what that was
already_allowed = any(Roles.video == role.id for role in user.roles)
Could be changed to
already_allowed = user._roles.has(Roles.video)
Maybe? Also I don't know why it's called user when it's a member object
Yea that is a huge simplification, I think I remember lines like that in a few places in that cog
Could you add a comment against one of them to prompt me when I look tomorrow?
Ok
I don't know if I agree
It seems like a bad idea to rely on private APIs
We currently rely on the http client but it has strong advantages and also seems like something that would be more stable.
Also discord.py has some attributes/functions that are named like they're public but aren't documented. I remember asking about one and was told that despite being undocumented it was virtually guaranteed to be part of the stable API
I don't remember why they said it isn't documented but I do remember that the reason didn't really make sense to me.
doesn't bot make its own client?
Yes but I don't see why that is relevant
was a question, because i know that the commands.Bot class has its own bot.http class
basically a help question
Client.HTTPClient is responsible for making requests to the discord api
and it doesn't belong the commands.Bot it belongs the Client
This was the conversation I had #381965515721146390 message
It eventually did get documented
I'm pretty sure discord.utils.SnowflakeList is made so that you can do operations like that and it's more efficient. Plus I've seen many people in that server including danny using it so ĀÆ_(ć)_/ĀÆ
well, danny could be an exception because y'know
Many people using it doesn't necessarily imply it's stable or if discord.py would respect that and avoid breaking changes.
You're probably right though. It hasn't changed in 3 years.
The reason it isn't public is cause it'd require some extra design considerations
e.g. the current thing is mutable and a public API shouldn't allow the cache to be mutated.
sounds interesting
Hey @short snow, has anyone approved https://github.com/python-discord/sir-lancebot/issues/651 ?
nope, it has the planning label, so that tells it
Well, by putting a lot of efforts into writing an issue without coordinating with us you are risking to loose a lot of time
We have other plans to make duckies, Iām afraid we are not interested in that
Because the UI will be terrible
hmm true
That said, we could think into integrating the secret project into sir lance
Is that something youād be interested in?
Sorry if my github message sounded a bit harsh, I didnāt mean to
yeah
no problems, it wasn't harsh š
Alright, Iāll make sure to assign you once the issue is created
but i need to know the secret project first
cool 
well @green oriole how about a duckify command which would put the person's pfp instead of the duck on the board, or make a duck pond ish on the bottom, like a layer on the bottom
Hmm that sounds interesting
I believe @thorny obsidian is running this bot, I think thatās something we would want in sir lance at the end of the event
we could do some improvements like that
i thought you were talking about that, this one means sir lance?
I was talking about integrating @spare tapir in @dusky shore
oh ok
i never noticed they were two different bots š¤¦āāļø
is the repo private?
I thiiik they are private for the time being
You can extract the source code of @opal ridge
even that is private
link?
#sir-lancebot-playground message the issue with random duckies, hence i asked about building your own ducky
We'll probably make the repository public at some point, but the container is open yeah if you really want to poke around
^
ok lemme see if i can find it
hahaha done š
Lmao I don't think I remembered to actually git init or make any commits to the Become a Duck bot
lol
@green oriole I thought we wanted vco's thingy as a potential lancebot command after this event?
But the code is real bad. I'd want to properly write it with good commits
The issue opened wasn't for random ducks with that API, but instead for a generator (select accessories, colour)
so it's whether we can pull off an implementation of that which is a) resource friendly b) has nice UX
Aaah, okie doke
i could do that
yes that is what we discussed above, with few more features/improvements , whatever you call them, to it
well yes,
(a) we can do this, by caching random ducks, and generating new ones, every x minutes. and then sending a random one from them. Well for the building your own ducky, if we keep maxconcurrency and a cooldown it would be good
(b) am not sure of this
it's not a random duck generator
that's fine and doable because we have an api for that
we could make an api for that then.
(which would take the resources like the dict i said in the issue, and then it would generate the ducky)
yeah, if we write an API for the planned site generator then using it on lancebot should be no trouble
I'm of the opinion that it's a neat idea, but we should implement it on site and see how that goes and if that scales we look at Lancebot
lemon could update his issue
Yup, that was the idea. One of the biggest issue with having a ducky maker with your own settings inside discord is that we would have to rerender and upload the new image to discord every time a setting is changed, which would hurt rate limits and resources quite a lot. I think it is better to just redirect users to the site web if they want to do that.
We could make that this renders image at server using query parameters
that's what i meant, pass in something like the dict i mentioned in the issue
like joe said, we are probably making an api for it and then using it
Well I mean, if we have to trigger another render every time you click an arrow while going through the equipment list it will probably be too heavy (CC @patent pivot )
i thought just displaying the final image at the end
and in the list, add them as emojis
like:
Yeah that makes a lot of sense~ Thanks for the clarification :D
no idea without benchmarking really
Emojis would be too small I think
Alright, we can benchmark our aaaaAAAA implementation
looks like there is quakstack project, probably our super secret project
i will go through it and then comment on the issues regarding duckies on lance
i.e. mine and lemon's
That isnāt the super secret project either :3
btw can i contribute in the quakstack project, or is restricted to the staff
bruhhh, this is getting ...
haha, our super secret project technically doesn't need to be super secret anymore, but you'll hear more about it closer to May
!remind 8h Look into quackstack and comment on sir lancebot issue 651 652
Your reminder will arrive in 8 hours!
that's good news, gives a bit relief
do we really want a separate ducky bot (ves' status), and not put it into sir quaksksalot
but Chris's thing was originally going to be our April Fools event for this year, but it ended up being really awesome so now it's going to be it's own thing.
It will be integrated to lance, Seb is probably working on something else
hmmm, and is quakstack a api or a package to generate random duckies?
comeee on spill it!
I won't spoil it for Chris and the rest of the team working on it~
š
It will be everything
if I understand the project correctly, it will be a core PyPI package with a microservice and a CLI
cya
ok, thanks
is it going to be used with our projects?
Which part with which project?
the quakstack with site and lance
Yeah sure
so no need to write an api for it?
Iām not too sure about the structure of the project itself, Iād say letās see when we get to it
discord.Guild.fetch_member uses an extra API call, instead is using discord.Guild.get_member better?
context: chris' stream PR
Yea, we are using get_member first
if that fails (because the user isn't in the cache) we fall back to fetch
@tawdry vapor hah! I actually thought of the arrow thing before bed last night, so made the changes already. The only difference is that scheduler.schedule_at needs a naive datetime, so I use arrow.utcnow().naive
yea, it also raises a few other things too, which aren't documented sadly
right
so you are right on that comment on mark ig
yea, those are the ones we're already capturing, so should be good.
both forbidden and discordservererror are handled elsewhere, as they wouldn't be limitted to this cog if they start happening
btw is quakstack open for contributions or limited to staff
oh god, these ducky names, i need to click everytime on the person to see who it is
same
there is our ninjaducky lurker
@green oriole I'm not implementing it, no. my contribution was to specify all the issues, the rest is up to you all.
one more thing, instead of putting the whole branding repo, and opening the project time taking, why not just put the ducky assets tehre
Alrighty
well https://github.com/python-discord/quackstack/issues/6 is already mentioned ig, i see poetry.lock there
I think branding is a good place to centralize all of our content
You donāt have to hunt it here and there, it is all in one place
and if we want to share assets between projects we have a common place
@fervent sage is way too fast haha. Can we close this issue?
should i go ahead and do this? https://github.com/python-discord/quackstack/issues/4
go for it
cool
@green oriole https://github.com/python-discord/sir-lancebot/issues/651 can we do this, since we have quakstack now? and if not, we can write an api for it
Letās wait until quackstack is ready and talk about what we can do then
uhh ok, we could possibly keep it open and with defferd label, so even others could share their input
as expected, it took quite some time cloning it
Alright, now that we discussed it I donāt mind leaving it open
Hmmmm
lemon has another issue
Whatever, letās keep both open

I don't think we need both to be open. I feel like my comment in https://github.com/python-discord/sir-lancebot/issues/651 was pretty clear.
@short snow
to be even clearer - https://github.com/python-discord/sir-lancebot/issues/652 replaces #651. But if you want to handle it jason that's still fine, I don't want to do it.
Description A command to fetch a random duck from QuackStack. https://github.com/python-discord/quackstack Proposed Implementation This command can be called in two ways: With .quack, you simply ge...
Alright, if we agree to not have a ducky builder letās close it then, but I thought some people still wanted to discuss it
š what are you using that has thee nice cli
and the branch and such
zsh and spaceship
another thing, quacken, should I use flakehell or just install them normally?
@tawdry vapor Just to double check, since I'm still new to dealing with timezones. Do you think this diff would work for changing schedule_at()? ```diff
- delay = (time - datetime.utcnow()).total_seconds()
- delay = (time - datetime.now(time.tzinfo or timezone.utc)).total_seconds()
It works in testing at least, for both naive and aware
Looks fine and if you say your tests work then go for it
There's no decision
Wait
That diff may be wrong
Because if you pass a naĆÆve time it will use timezone.utc which makes the other operand aware.
So just delay = (time - datetime.now(time.tzinfo)).total_seconds() then, makes sense
since tzinfo being none means naive
but that doesn't offset to utc
I believe datetime.now(time.tzinfo) if time.tzinfo else datetime.utcnow()
Though at that point it wouldn't look nice in-line
yea, I'll expand it to a full if statement
@short snow
Here's your reminder: Look into quackstack and comment on sir lancebot issue 651 652.
[Jump back to when you created the reminder](#dev-contrib message)
you can use oh-my-posh for that which despite the name is crossplatform and cross-shell. https://ohmyposh.dev/
#changelog message perfectt!
we're switching back to pyweek branding š
should open a issue for this?
@fervent sage https://ducks.vcokltf.re/duck/ilcheese2 there seems to be some issues with the ducky here, the beard and outfit.
lmao that's perfect imo
perfect?
oh yes, perfect.
Lol
welp, but yeah we could either make some cases which don't match together or edit the assets to make it match
like making the beard end smoothly
@patent pivot https://github.com/python-discord/quackstack/pull/14/commits/068ad5b97d271a063fcea50cf9923041af12da59 this the bug you are facing on olli
probably
looks like that
that would explain the sheer number of warnings
hahahah yeah
but annotation works on my pr correctly
it is
Two minutes long linting hahaha
so the site packages are in the same dir as the project
now I just need a docker image and we shoooooould be good to go to prod
yeah
apologies for dev log today lol
i do bring good news though, olli now deploys successfully
lol, now it would be easier for me to add it to quakstack
nope
sir-lancebot#577 just needs 1 more review on it, it deals with the bot.exts.evergreen.error_handler ERROR: Unhandled command error: 'User' object has no attribute 'roles' we see in the service logs
~~Its also the last branch on my fork, so I'll finally be able to delete it š ~~
Your reminder will arrive in 8 hours!
If someone gets to it first, delete that please lol
!remind 470M 386599446571384843 check review and delete remind if it's done
Your reminder will arrive in 7 hours and 50 minutes!
Lmao
š
even this
lol
That was a pretty small diff lol
Random thought. The in-site thing for customizing ducks would be cool if it was like https://lemonsaur.us
completely agree, lemon did a really neat job of that
okay moment of truth for olli š
let's see if this release actually works
need to fix the tagging
but otherwise
v good!
What's Loki?
The thing that powers service logs on grafana
Huh that's cool
@patent pivot https://github.com/python-discord/olli/pull/1
lmfao
Delete /
Ung, not alpine
And I donāt understand why they donāt just have the alpine
Whatdidyoujustsay
Well look at it this way
Musl SUCKS
How often will you need the bigger image outside of dev
we'll have musl wheels soon, which might ease some of the pain
well, I guess it's a draft, but we'll see
Don't support this
I don't think it's like
a goal to switch from libc to musl
it's just a move to try support both lol
I tried googling musl, but my phone took me to a muslim dating site lmao
Are you actually on pypi yet
But by supporting both you are saying that musl is fine
But it is NOT
who
Akarys is being paid by big anti musl
it's not fine yet 
Ollie
!pypi olli
Near
I am the anti musl
Ooh, fancy.

Tbh we are already issuing warning for missing channels
seasonal bot not sir-lancebot
issue isn't the warning its the reference to the old name
that's fine
posting a link here is fine and all, but there's no point mobilising someone else for a one line change
if it's a huge problem for you we'll accept a PR
@vale ibex
Here's your reminder: 386599446571384843 check review and delete remind if it's done.
[Jump back to when you created the reminder](#dev-contrib message)
!remind delete 1845
You can't modify reminders of other users!
oh lol, rip @gritty wind
!remind delete 1845
That reminder has been deleted successfully!
WINNER
saving scaleios one reminder at a time
wait chris pinged him anyway wow chris
gottem
!src something that doesn't exist
Unable to convert 'something that doesn't exist' to valid command, tag, or Cog.
so... why do some error messages delete and others don't?
kinda wish the docs command error messages wasn't an auto delete but a trashcan
Lancebot is much more restrictive than bot lmao
intentionally
Ah
Fwiw I was talking about the src command not being allowed in the same channels as bot source
sir-lancebot#653
lmao bug
Ye, because it only looks for the "bot" part.
After it checks for sir-lancebot.
Which wasn't there.
Which is why dyi5fsefcsebot#653gy6gfrtt works
mhm
@cold island @patent pivot I've got that fix to issues here https://github.com/python-discord/sir-lancebot/pull/577
hah
slightly different implementation, since it assumes the config is setup right
so it only fails in DMs
my last commit was to resolve that
š Can delete my fork now too š
@vocal wolf #dev-log message what do you think would be a good explaination here?
@fervent sage opened lint and ghcr pull requests on quackstack 
can we add quackstack to #dev-log
What's quackstack?
naturally
Neat
i will add it now
done
also reviewed your PR
how does the https://git.pydis.com links work?
We use a Traefik middleware that looks like this:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: github-redirect
spec:
redirectRegex:
regex: ^https://git.pythondiscord.com/(.*)
replacement: http://github.com/python-discord/${1}
so basically any request to git.pythondiscord.com/* has that last bit captured and then we redirect to github.com/python-discord/<whatever was in *>
ah interesting
Traefik Documentation
right thanks
i probably don't need to be setting something like that up for myself haha
there are other ways to achieve things like that, it's entirely doable through cloudflare or just pure nginx
i'll look into it, thanks š
perfect!
can I suggest one addition to the .bm or .bookmark command?
for sure
okay.
would you be able to give a quick summary for why you've chosen traefik over nginx?
primarily really nice integration with kubernetes
we use the traefik CRDs (custom resource definitions) so that we can declare ingress routes into our cluster in the same way we'd declare a deployment or a configuration file
like uhhh
what is the con with nginx in kuber?
let me find a nice ingress
so.. it would be nice if other users get a dm from the bot too when they react with šØ on the message that the user sent. Currently you have to resend the .bm message to find out what the bot dm'ed. but reacting with the emoji to make the bot send it to you too would be a nice addition
.bm 827886705603772486 by reacting to the emoji below š
oops
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: site
spec:
entryPoints:
- websecure
routes:
- match: Host(`pythondiscord.com`) || Host(`api.pythondiscord.com`)
kind: Rule
services:
- name: site
port: 80
- match: Host(`staff.pythondiscord.com`)
kind: Rule
services:
- name: site
port: 80
middlewares:
- name: site-cloudflare-access
tls:
certResolver: cfresolver
domains:
- main: "*.pythondiscord.com"
sans: [pythondiscord.com]
here is an ingress for traefik
it's in a readable format and is quite easy to follow, but to explain a bit:
entrypoint is the port that traefik is responding on
routes are the route entries that this ingress is responsible for, in this case pythondiscord.com, api.pythondiscord.com and staff.pythondiscord.com, you can see that the last one has a middleware configured which verifies that requests to it are from authenticated users from our SSO provider
tls is just TLS config, traefik will automatically generate and serve SSL certificates (big pro over nginx which needs a separate cert-manager deployment). you can see we use *.pythondiscord.com as the main name and for site we also add in pythondiscord.com as a SAN (subject alternate name)
mm yeah, the kubernetes integration is probably not that interesting to me right now but the SSL management sounds awesome
basically traefik is a lot more bundled together and is a simpler setup process imo
what provider are you using for deployment? it has a lot of integrations
sounds interesting, used nginx before, never heard of traefik until on now.
i'm not even using docker right now, it's nginx -> gunicorn -> flask directly on the host, and I deploy via git pulls š¤”
but I'm trying to learn
hahaha
traefik also has a nice set of middleware
we're also doing stuff like client authenticated TLS pulls
so when our traefik instance gets a request as well as presenting a certificate for pythondiscord.com it also asks the client to present a certificate so we can verify it comes from either Cloudflare or a member of the DevOps team
i may try to migrate my app to traefik for the sake of experience
I'd like to containerize everything but last time I was looking into it, I didn't see an obvious way to use certbot in the nginx container
and that's what I got stuck on
oh yeah, traefik 100% solves that
we use the DNS-01 ACME challenge with the Cloudflare integration, entirely transparent with auto-renew
traefik also has metrics 
The real reason joe likes traefik: graphs
Also someone needs to clear the mentioned issues on quakstack
like adding assets to branding, and poetry setup
on it
https://github.com/python-discord/quackstack/pull/15 i have a suggestion here
ok, will have a look
fixed.
https://github.com/python-discord/quackstack/issues/6 this is already done
if i approve 17, will u merge it 
looks like more whitespace fixes are needed
one second
I'll bundle them into this PR
ahh yeah there are loads of linting fixes needed
yeah, vco should fix those ig
since it is his code, he knows it th best
Linting should be pretty easy to fix without knowing context too much
i was talking about doc strings mainly
ah, most are self-explanatory through code though, there isn't loads of code
yeah, do it or i can do it in 2-3 hours
branding is such a pain to clone jfc
I'm 2.5 minutes in and it hasn't got past Cloning into '/Users/joseph/Desktop/Python/quackstack/branding'...
Is it the size?
If thatās it, we can move the duckies out to another repo, and have quack stack pull only those
I think it's the size, but it might also just be because I'm on a slowish connection
but yeah, I can't start the app
but that's fine, I was only testing a return value but I got it anyway
yeah, i had suggested it before too, in this chat
to just catch a release containing only duck assets
or a branch with only duck assets
taskipy is cool
it took 2min40 sec for me
branch will still have the same problems
yeah I was still going at 5 minutes so I killed it
same problems meaning?
huge clone time
- that's not the intended usage of branches, branches should always be mergeable
^
i was just a second too fast
Yay!
also update your branch name joe.
pipenv run precommit
The instructions for each project are also included in the projectās Readme
not for all.
the contributing guide has
I'd say that Duckstack should use API to fetch all ducky assets file paths and then pull these
that is something like what joe suggested
Most of the ones that get contributions have the setup guide linked in the readme
pulling of a zip, as a background task
i feel ks's idea is better, to fetch all ducky asset in that the quakstack folder on the branding as a background task
you can't rename a pull request branch
isn't that my idea?
oh ok
very very similar.
we can download just the quackstack folder
but I like the idea of a zip rather than individual assets
yeah, just downloading the quakstack folder
i learned this the hard way once.ā¦
yeah
i renamed the branch
and github was like: nah you deleted it and created an identical branch tyvm
cc @fervent sage the quackstack docker image does not work
it doesn't fetch branding submodule
FileNotFoundError: [Errno 2] No such file or directory: 'branding/quackstack/silverduck_templates'
from prod
git will need adding to the build image but otherwise should be good
am available to review a PR
git submodule update
maybe needs a git submodule init as well? I forget
im too busy for implementing that rn, but someone will probably take on an issue since its pretty simple
git submodule update --init
aha
I cannnnnnn
oh hm
hmmm
we need to do that after copying the code right
yeah
that sucks, build times are going to shoot up
should just be this right?
cc <@&409416496733880320> for approval on that as well, it'll need a devops sign off
I can't test it locally because no docker so if someone wants to do that I'd appreciate it, but I think that should be correct
I'd recommend you to create an unprivileged user and run the actual app as that user, but we typically don't do that yet in all of our dockerfiles and it's out of scope for this PR
It looks fine, but I'll try to build it locally
Yeah, that is a good suggestion
Do I need to do anything special to reproduce this bug?
I'm really out of the loop on this project
you need to ensure you don't have the branding submodule already cloned I think
I'm not too knowledgable either
just running the docker-compose should trigger the error in the old situation?
Or do I need to make a request?
Right
api_1 | for name in self._accessor.listdir(self):
api_1 | FileNotFoundError: [Errno 2] No such file or directory: 'branding/quackstack/silverduck_templates'
alright
now try the fix
looks good, project deployed
That's the valid BSD value for a connection error š
Also, I'm not ignoring your first question, i just don't know the answer
!exit
Exiting Programmatically
If you want to exit your code programmatically, you might think to use the functions exit() or quit(), however this is bad practice. These functions are constants added by the site module as a convenient method for exiting the interactive interpreter shell, and should not be used in programs.
You should use either SystemExit or sys.exit() instead.
There's not much practical difference between these two other than having to import sys for the latter. Both take an optional argument to provide an exit status.
Official documentation with the warning not to use exit() or quit() in source code.
...why did it boot twice if it didn't deploy?
Maybe it was an internal thing?
!ping
You are not allowed to use that command here. Please use the #bot-commands channel instead.
there are a lot of cases where the bot restarts
way more than just auto-deploy
Hm?
if we detect a node is performing suboptimally we transition the pod off it
im def not updating to 1.7 at 2am
we also transition to better balance resource usage across the cluster
There isn't much to migrate to for d.py 1.7 so it shouldn't be too big of a job
yeah
its not so much that its the new features
and oh my
the new features
THESE ARE SO GREAT
Ok
In the case of python bot and sir lancebot neither really use anything of the major changes with the bot, so I think for the most part it's gonna be an easy swap.
I just took two bots and bumped the requirements and they run fine.
Hey @short snow, I have some pretty big concerns about https://github.com/python-discord/sir-lancebot/issues/655
It may work in a small server such as gurkult, but here it will probably just turn into a moderation mess
moderation mess like?
#dev-log message and what do you guys think of this, the solution part
Well, Iām afraid bonk will be used in a bad way, to mock other users and it will turn into a heated discussion
Hmm yeah
also https://github.com/python-discord/quackstack/issues/3#issuecomment-812958499 am I right here?
I'm of the opinion that lancebot should be a learning experience primarily. Essentially dropping in completed cogs or commands or features from other servers is not something I'm interested in seeing.
i had asked the orginary owner to do it here too ( @hahastinkypoop#8591 ), they are quite active here also
can confirm
Anyone know if this pesky ⢠can be easily removed? (In embed footers)
no way sadly, implemented by Discord
š
You can potentially finagle it by not setting a timestamp for the footer and instead formatting it yourself, but that loses the user-datetime-adaption discord does for you there
https://github.com/python-discord/bot/blob/47d535c82af5463699b7d8e4533ba415fd4e964a/bot/converters.py#L492
is this converter necessary now, as the UserConverter already fetches from the API if the user wasn't found in cache (since 1.6)
https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.UserConverter
Oh, didn't know about that, can the userconverter be used here https://github.com/python-discord/bot/blob/stream-and-revokestream-commands/bot/exts/moderation/stream.py#L46-#L50 ?
if a User is all you need there, sure
that's fetching/getting a Member there though
Converters are for strings so I don't see how that would be better
i guess the code there becomes 2 lines if you use a converter, not much of a point other than that
Heya folks! Totally random, but if anyone familiar with the mock roles used in the bot tests is free, would you mind taking a peek at https://github.com/python-discord/bot/pull/1499#issuecomment-813159304? Thanks!
yeah, you would need to edit the unittests a bit, i will look into it, and comment on the changes required
Ah thanks a bunch - take your time!
turns out the MemberConverter also lazily fetches from the API (since 1.5.1)
- embed.colour = user.colour if user.colour != Colour.default() else Colour.blurple()
+ embed.colour = user.colour if user.colour.value else Colour.blurple()
Maybe?
In the test_information file, i.e. https://github.com/python-discord/bot/blob/main/tests/bot/exts/info/test_information.py, you need to introduce a new parameter named colour, currently it mocks a Role and then adds a .colour attribute to it, like shown here: https://github.com/python-discord/bot/blob/main/tests/bot/exts/info/test_information.py#L314.
You can make few constants in the file with the colour codes, and then use it where ever there is a MockMember instance. Well this is the first step, now another thing is required, since it was using top_role.colour earlier, you can remove all of that code, since it is not being right now.
Hopefully this should work, š¤
imo, user.colour != Colour.default() seems more understandable
that would depend on user.colour becoming None right? but it won't, it'll just give default color if there was no colour
or does the value of default color give None?
Default color is technically 0 I believe, but I felt Colour.default() was more understandable
Thanks so much, Iāll work on this and let you know how it goes!
user.colour always returns something iirc?
and default colour has a value of zero
right makes sense
@short snow Thanks so much again for your help, I was able to get the tests passing! š„³
perfect, i will give it a review soon!
Sounds good, couldn't have fixed this without you!
#sir-lancebot-playground message these are flooded in the bot history, am not sure if anyone even notices them
sus
it's not the result of the command š
The avatar commands do sometimes error out though
Espcially if you just updated your PFP
then make a helper function to get the pfp and it fetches the new one if the cache file errors
Sounds reasonable, can you open an issue?
*opens issue*
lol

but to what repo
done
Too quick
flexing my short URLs
@fallen patrol Just wanted to let you know, there are PRs open to the API docs to document stage channels.
discontinued project
bug report or feature...
Bug report I think
is it public?
no, it was a closed source security bot
The Black Knight provides a number of security features to our admins. This bot is not open-source, for security reasons.
from #welcome at the time
This bot is not open-source, for security reasons.
ahhh, security by obscurity.
ew~~
seems it was used in one place
Why was the !f command removed?
The command for free help channels?
Isn't that free?
!f
We don't have free help channels anymore?
It was kept for a while during the transition afaik
that rings a bell
But now we just have #āļ½how-to-get-help
It used to link to a static help channel that didn't have activity for a while
yeah
But it's usage went down quite a lot with the new system
Makes sense.
discontinued why?
Yeah, pretty much that.
Does defcon also do it?
There were a few reasons, but we didn't need the project in the end.
Or is that different?
Defcon limits who can join the server
defcon is pretty useful in cases of raids
It's part of it, but not everything that was planned for that project
it's only one protection
fwiw i've never seen it error so uh, do you have a place where its errored handy?
Yup that's the one I pulled haha
chris's pr should fix this
It isn't silent on our end š
guess that's a second bug.ā¦..
Does it? Isn't chris' PR about rates
an error handler not outputting anything
it is mostly because of too much resource burning
That's unrelated to this bug
or it is because of pfp not found?
Yeah cache things
sir-lancebot#649
we did have a spike in cpu throttling the other day didn't we
that one?
This would be unrelated, but yeah (on the throttling comment)
try running .8bitify a lot of times
sir-lancebot#597
yeah ik, i was just telling
ffs i need to change my pfp anyways
Ah, okay
@patent pivot are you able to share the eval command for black night?
as akarys commented on that pr
sir-lancebot#653
I donāt know if that was ever written š
ves wrote it
Anyways, last time this was discussed, someone said Sebaatian will be handling it
my actual interest is in the implementation 
Canāt open it, in mobile lol
Someone will PR it shortly so it'll be public then
can you paste that in a gist? 
just wait for it to be PR'd, I'm sure someone will take it fairly soon
how taxxing would it be to just fetch the new link every time
probably fine
lol
Members intent
ah
does the bot not ask for it?
Not sir-lance, no
The only intent we get is members on python, everything else is off
so
why is this erroring
Wdym?
https://canary.discord.com/developers/docs/resources/channel#message-object author here should be a user
Integrate your service with Discord ā whether it's a bot or a game or whatever your wildest imagination can come up with.
But thatās just a cache object, no?
and surely ctx.message.author pulls from that?
seems it gets a lot of users
Or is it hmm
Yeah members is on?
Itās off for sir-lance
members is on for bot, off for lance, yeah
Where the image processing is
yeah I don't think this is a cache thing
*closes issue*
do we have a sentry error for this
its still a bug but something else
lol
Look for 404s basically
is there a specific reason this creates an instance of Intents() before calling all()?
Idk lol
fair enough 
good question
š„
would it?
50/s for general routes iirc
Is that lance?
is it this error?
Yeah
fwiw even if this isn't an error, that error handler doesn't return any response if something did go wrong
26 occurrences
btw is there a problem if i create branches on the main repo?
If you have a dummy account, switching pfp should reproduce
nah, staff can go for it
That preferred for staff
should, we say
at minimum
.8bitify
well at minimum
its still my old pfp
no I'm going to restart it

@fervent sage)
