#dev-contrib
1 messages · Page 95 of 1
I've tested this smh
er, im not too familiar with lancebot so i cant tell you what would be affected tbh
It's the cache. It keeps pulling old assets, and if discord deleted them, it 404s
I think you should find one from me in the logs
right, but this is weird because it should get a new user object on each message payload
but that doesn't invalidate the member cache
Does it? Seems like a discord bug then
But I would've thought it just gets basic user info
hang on
Haven't worked with the API before
Nah, it gets an avatar key
it should be updated by gateway user_update events
yeah, but we have member intent disabled
that comes from cache

hmmmm
lemme turn of my member intent
do we get user update?
.int sockets when
hmmmmmmmmm
link
i need that site for my own bot lol
well this is weird
what part
why ctx.author is pointing to dead data when it should get new data in the msg object
right, because it's in the message object
you'll always get a value, it's just whether that value is the correct one and is being updated with the latest information

I made my intents none()
didn't turn on messages tho
aight so
with just message intents
you can get the pfp
technically the pfp should update from one of several places:
- user_update gateway events
- message_create and message_update gateway events
- voice_state_updates
why it isnt is beyond me
also this is why im very interested in that eval command for black night, my eval command uses eval or exec depending on the length of the messages and everything
right but again, we can always get a profile picture, it's just whether the information is the latest
yeah
ironically sir lancebot doesn't have an int e
so you can't get what it sees for my pfp
yeah, we have that info in sentry
test
{'type': 0, 'tts': False, 'timestamp': '2021-04-05T13:36:37.951000+00:00', 'referenced_message': None, 'pinned': False, 'nonce': '828624172270747648', 'mentions': [], 'mention_roles': [], 'mention_everyone': False, 'member': {'roles': ['267627879762755584', '267628507062992896', '277914926603829249', '267629731250176001', '267630620367257601', '295488872404484098', '323426753857191936', '409416496733880320', '463658397560995840', '491583790448246785', '585529568383860737', '587606783669829632', '764802720779337729', '797752289771126784', '807415650778742785', '721459198839357490'], 'premium_since': '2019-06-10T19:07:12.423000+00:00', 'pending': False, 'nick': None, 'mute': False, 'joined_at': '2017-01-10T17:41:35.518000+00:00', 'is_pending': False, 'hoisted_role': '267627879762755584', 'deaf': False, 'user': {'username': 'joe', 'id': 165023948638126080, 'avatar': '790115a90ca5f3ab6876c49354d63366', 'discriminator': '6000', 'bot': False}}, 'id': '828624173063733319', 'flags': 0, 'embeds': [], 'edited_timestamp': None, 'content': 'test', 'channel_id': '635950537262759947', 'author': {'username': 'joe', 'public_flags': 131842, 'id': '165023948638126080', 'discriminator': '6000', 'avatar': '790115a90ca5f3ab6876c49354d63366'}, 'attachments': [], 'guild_id': '267624335836053506'}
that's what lancebot is seeing for that above message
including the avatar key in the author property
I wish you could just do cdn.discordapp.com/avatar/userid.
anyone want to change name or avatar lol
I can.
i'm looking at the raw events lancebot is receiving now
I changed it.
i already changed pfp twice this hour iirc
if joe agrees, run .8bitify in #sir-lancebot-playground
You can always do one more change
yeah okay, no USER_UPDATE events received (appreciate it!)
Delete your pfp
right, but I only started looking at events 3 minutes ago lol
edge case ffs
Should I run 8bitify?
my point was i can't, ratelimits
not that im not willing
yeah you can try run it in #sir-lancebot-playground
so we're not getting the first event at all
huh...
what should be the name of the asset folder in quackstack?
time to head to ddevs
i wonder
do you get them in the smaller guilds?
the bot test guild
if one were to type in it
what would happen
or if one who is in that server and sent a message, what would happen
that's ironic af
That’s discord
although arguably if someone is typing in dms with modmail and there's an open channel with that user.….
DM typings don’t work for python either
well it'd be actually nice to paradoy the typing indicator
It does do that
ohshit okay
we get them on all of them, just ot from this guild
DM typing works for lancebot
Yeah that’d what I meant
all else fails the ratelimit for GET /users/{user.id} is 30 per 30 which should be more than enough
'x-ratelimit-limit': '30', 'x-ratelimit-remaining': '29', 'x-ratelimit-reset': '1617630308.888', 'x-ratelimit-reset-after': '30.000'
oh.
Where else do we have the bots lol
so guild size probably
the dev emoji server 😔
Modmail works with this guild size
?about
This is an open source Discord bot that serves as a means for members to easily communicate with server administrators in an organised manner.
11d 20h 48m 34s
117.44 ms
3.9.1
kyb3r, Taki, fourjr
OTHER
Follow the installation guide on GitHub and join our Discord server!
This bot is completely free for everyone. We rely on kind individuals like you to support us on Patreon (perks included) to keep this bot free forever!
That feels like it wouldn’t work for a command someone can spam
shouldnt things like that have cooldowns anyway though?
Unless that’s seconds
it is
Anytime after pfp changes, Lancebot is failing at 8bitify.
So the way it receives the event seems to be off.
We don't disable that anywhere
and I've validated with a local copy that we don't get those events at all on lancebot
So does it seem like an API issue?
seems it
i could pr in a fix using get_user for the time being if wanted
test
hmmmm
okay so
i've enabled members intent on my local copy
let me change name on a alt
or wait
i can just uhh
yeah
no update events with or without members intent
should i do this in the meantime while the api is sad? code is super simple and ready
yeah, go for it
I need an eval command on lancebot to get the session ID lol
wait no I don't
@fervent sage ^
@crude gyro Where should the the masks go? they weren't specified in your layout
oh nvm got it
you mentioned to get rid of it
aight, sir-lancebot#657
uhm
its not just that command
i'd just
not make a fix
until sir-lancebot#597
hmm, after moving the assets to quackstack, pycharm is automatically closing whenever i open it
added a comment on https://github.com/discord/discord-api-docs/issues/2655

So this guild is not blocked from getting typing events, but it is quite large and is on a newer internal infrastructure for large guilds
aka gets beta features early
It says internal.
that was relays, yeah
Internal means on their side, not ours, right?
yeah
^
we knew it was active, but it was transparent to us
knew what
sharded bots when
that we were on the new backend
lol
what is relay enabled
but it's fully transparent to users and bots
has relay enabled lol
relay being the 'new guild infra'
oh okay understandable have a great day
relay is the new backend for scaling, the intricacies are fairly unknown yeah
i'd assume from the name it means relaying events between gateway servers until it finds the correct client so you dont need 150k people connected to one gateway
hey joe, did this server ever hit a member limit?
The member limit is 730K, isn't it?
and needed to be raised by discord
went up then, used to be 700k
OH DAMN DID IT GO DOWN
that used to be 700k
now its 500k
The only thing I know about RELAY_ENABLED is that #mod-log choke on it on every guild edit
innersloth was never raised above 500k
it was
wdym what happens
innersloth was at 700k lol
i was the guy that kicked the members hahahahahaha
lol
Servers with millions of members when?
you're a mod there?
contractor
When you pay for better infra yourself
how did you get to kick 200k members lmao
Once Discord adds Bypass Slowmode permissions.
yes, a few times
It always think that this flag has been added or removed
because they asked lol
Presence limits were fun
the suppress embed thing?
there are issues™️ with superlarge guild scaling which believe me i'd love to get into but i could waste hours talking about it
Do an at-everyone and the guild goes down
which arguably I wish that non bots could unsuppress embeds
client setting for allowed mentions when 
I hope if Microsoft buy Discord we can get guilds with millions of members
innersloth was at 730k, just checked
as a mod: would rather not
i hope they bring a lot of bot features to user accounts
its okay you don't have to mod all of them
If server have millions of members, then channel-specific moderators is required
there are so many issues with superlarge guilds, but one of the main ones excluding infrastructural limits is that moderating them would be awful
being able to manage allowed mentions for ourselves would be fricking nice
lul
Just hire 1000 moderators and assign all of them to one specific channel
lmfao
i moderated wallstreebets for a brief time and with 400k members that was awful
with only boosters allowed to talk
holy shit
took a couple of days
during the whatever-the-fuck-happened-in-january period?
mhm
ouch
why did you not use the discord purge feature which doesn't ratelimit as much afaik
it was... interesting to say the least
Prune?
yeah
because that wasn't what I was told to do lol
ah
the accounts we kicked were active on discord, but not on the innersloth server
purging was not going to be the solution
ah
fwiw at that point
that's when id create a second or third bot account
and set them all up on the same client 😂
brb reading tos
It was fine leaving it for a few days
I think we did batches of 30k/day
Discord were the ones that connected myself and Innersloth, so they knew it was happening
we didn't want to kick everyone out at the same time as well because that would be hell for the mods
Did you kick random people, or just the inactive ones?
why?
Just everyone ping that you'll be kicking :) what could go wrong :)
or better still
because as soon as we freed up space, new, active accounts joined, and that put more pressure on mods
mass dm them
inactive ones
better discord 
yes
tos has entered the chat
With the increased infra, could I possibly bring up re-enabling member intents for lance?
bulk delete but for sending DMs, what could go wrong
With what purpose?
why would it need to be enabled? it does everything just fine
Yikes, the issues cog on lance is pretty broken
Some of the current functionality was built around member intents being enavled
We did rip out some features
Like the lovefest stuff was a bit broken without it
Hit really hard last February for valentines
Oh I see why it is like that
Yeah, Lovefest did get pretty broken
https://gist.github.com/66e1a19a10dbba69955551bff31528a9 What do you think about this?
does it require the member cache to be populated or just being able to do member stuff? if it doesnt require the cache to be saturated fully then we could just not request the members on start
is it a good readme for the duck builder directory?
requires cache, because it picked a random member
ah
:3 lance is my fave cause events so I'd be happy to champion it and actually write up some good reasoning
then why were they disabled?
realistically 170k members shouldnt be too hard for a bot to handle
Because it wasn't necessary and we were stressing our previous infra
gtao's bot deals with ~300k in a few seconds on start and is fine
We run several services and dropping member and precense intents dropped CPU usage like 10%
How many active members does this server have?
Joe the stat man to the rescue
@patent pivot do you have that awesome graph thing from when presence and member intents was disabled?
There's even an api! Check the pins in #community-meta
That doesn't have anything about active members. Are there any numbers on that?
I feel like we’ve been infiltrated
Lol
-_- joe I was like half a second from warning because I thought it was a troll
lol
Hahaha get an alt banned to pump up your mod stats 👀
i'm testing if we are on relays
apparently the RELAY_ENABLED flag might not be entirely tied to it
im gonna say that i don't find this graph too interesting, is it possible to make this in comparison of how many help channels there are instead? Or possibly based on the member count, but I think it'd be nicer to see how many help channels existed at a specific time as well.
Short sum: update this with a line of how many existed at each time.
Joe has like 10 alts
Oh wait, that's Joe?
if the concern is long starting times which used to be an issue a while ago, that should no longer be an issue
Everyone is joe
Where did the devops role go
yeah, i have 3 alts for when I wrote https://dis.gd/dma103
No, I'm Joe
bruh lol
hide your embeds
Joe has devops lead.
OH THAT'S WHY ALL OF THE SCREENSHOTS ARE LIGHT
don't tell me how to use my embeds lol
that was for readability
lol
im still procrastinating on dma421 
Why didn’t you get 420 😔
yeah vco
hang on
why didn't you get 420
LOL
bruh
DMA420: Making custom bots for your community
Lmao
How does Discord even assign people to these?
LMAO, also vco your bot guide is like half the reason the duckify command happened at all in time
!kick @mortal turtle nerd
:incoming_envelope: :ok_hand: applied kick to @mortal turtle permanently.
bruh
what?
lmao
||it's joe's alt||
nerd
Kicked permanently 
testing if we are on relays by seeing if event dispatches are received immediately
inb4 joe kicks every devops member to be the only devops remaining
he cant be a devops daddy if there are no devops children though
good point
bruh what
why
hmm true
permanent kick is basically a ban
unless
you made it so whenever it rejoined it'd be kicked again 
But the wording could be better.
How do you kick permanently tho
time for my 3rd pr of the day cracks knuckles
!otn a applied-kick-permanently
:ok_hand: Added applied-kick-permanently to the names list.

i want to make a otn embed thing
so at every morning an embed with a link to where it was started and by who
We wanted to do that
if in a staff channel, only disclose who made it
but sadly we don't have the information for the older otns
sad
DROP table otn
does it collect info now?
We have most of the context. The one ones were really just volccy turbo adding them
Also some channels were reset
Unless the history has been saved, it is probably impossible to get back
How many days of otns do you have on average at any given time?
!otn list
Dang.
Only a year worth of
NO LEAKIN
But part of the charm is not having the context available imo
ILLEGAL
lol that's the first otns
we should ban them outside of mods really
the lack of context is what makes them great
we should ban them outside of mods really
We can do that
dare
only !otn list
we already have a policy in place
I mean i have no control but
to not search or list
can helpers otn a?
nop
no
don't think so
but

!otn a helpers cant otn a
Helpers can list via the site iirc
:ok_hand: Added helpers-cant-otn-a to the names list.
do we want to svgs of ducky/accessories/outfits @fervent sage ? If yes, then it currently fails on
filename.stem: Image.open(filename) for filename in (ASSETS_PATH / "ducky/accessories/outfits").iterdir()
so should i modify it to only list the files in the directory and not he sub directories
apparently works, @fervent sage
Didn't Akarys do that?

no ofc not
Or am I blind?
Who's akarys? 🤷♂️
He did, not quite fast enough on the delete
yes, akarys didn't do it and then delete his message at all.
who is this dumbass of akarys?
er i'm not sure what's happening regarding svg stuff, that's more lemon's area of expertise
woooosh
My brain isn't big enough
cc: @crude gyro , so sorry for the ping, but could you please let me know what to do here?
this can be closed, right? https://github.com/python-discord/bot/issues/1295
i mean
closed by this https://github.com/python-discord/bot/pull/1287
it never got updated
I confused myself, myb
Lol
isn't that just the svg for the glasses? Fuck it, just get rid of it. We'll make a full set of accessory svgs someday.
Ok 👌🏻
@fervent sage Do you mind if we move sir-lancebot#657 into sir-lancebot#597?
I imagine the issue you fixed will be the same for all the pfp modifying commands
yeah sure
597 moves them all into the same cog, so can just be a helper function
i have DM'd a discord eng so
we'll see if we have news there
i have DM'd a discord eng so
Are there any plans for improving logging on the bots? During local development I don't find the difference between the debug and trace levels very useful, with traces from some modules being somewhat spammy. Creating some sort of interface to selectively enable the trace logging on modules would allow for more verbose trace logs along while keeping the logs clean with only the logs of relevant modules going through
We are discussing removing trace logging entirely. The goal of trace logging was to be almost a print substitute locally and it shouldn't enter VCS tracked code but we didn't codify that anywhere.
I think they are useful for things like the codeblock cog logs which are probably the most noticeable when running Python as they trigger on every message, but with them being logged always it just creates noise
What is difference between trace and debug?
going by our definition:
I share similar sentiments to Numerlor
I disagree with completely removing the trace logs from the code
They have been useful for me when working on/debugging certain features.
However, most of them are not useful to always be enabled.
hmmm
I already had the thought brewing that they should be all off by default and have a way to easily enable them for certain features when as needed.
having a delve through the code, yeah, I think I agree
I don't think that'd be too hard to achieve
As for whether we should merge trace and debug levels, the jury is still out.
comma separated list in env var of the loggers you want to have trace logging, or something along those lines?
Maybe we should do something like Rust envlogger
Debug is like... stuff that's only useful for debugging but that we would want to see in production to help us reproduce issues.
For this is info I think?
But sometimes I feel like issues are so difficult to reproduce on the bot so having trace logs in production can have value.
info and debug have semantic differences. debug is for debugging only.
info just generally describes what's going on
Hey @vale ibex this is late but congrats on making core dev!
Thanks 😄
I never read the dev announcements when they come out...
Yes, of course!
should i close the pr i made for it
@green oriole are you planning on doing this?
Hmm, I'm not sure, my PR is quite big and still needs 2 core dev reviews, so might be a while until it's merged
I wasn't, but if needed I don't mind
https://github.com/python-discord/bot/pull/1234 This pr is up for grabs, if anyone wants to take it.
I have a comment on that
Yeah, I saw. But the pr still exists.
better for the api to err on the side of caution for libs that may not have updated to v8 rather than switch and break something before v6 is beyond deprecated
how to read image data from an avatar request like what
is it possible convert a png to svgData ?
trying to see if i can repl the sir lancebot bug and well, i can't read image data
thanks
Isn't Kubernetes deprecating its support for Docker?
Yes - but not in the way you’d think with docker containers like what we use
It’s in the internals of kube, and how it handles things, this won’t affect most prople
Oh, so it won't change the way PyDis does stuff?
Docker Engine, but not docker images is the tl;dr, right?
No
Yeah container runtime
Kube released a write up on it
I’ll see if I can dig it up
Authors: Jorge Castro, Duffie Cooley, Kat Cosgrove, Justin Garrison, Noah Kantrowitz, Bob Killen, Rey Lejano, Dan “POP” Papandrea, Jeffrey Sica, Davanum “Dims” Srinivas
Kubernetes is deprecating Docker as a container runtime after v1.20.
You do not need to panic. It’s not as dramatic as it sounds.
TL;DR Docker as an underlying runtime is being d...
TLDR on the first line
So docker images still work, but the runtime won't?
AFAIK we already made the switch
No idea what the difference is though
But it is done, we are all good
(docker engine is traaaaaaaaaaaash anyway... totally not bitter still about it crashing a dozen times for no reason during setup for something internal.... totally not >_>)
Basically it’s the way it runs the actual container
Idk if docker engine is necessarily connected
I see, makes sense.
Possibly is
Basically, there are tools to build a container and tools to run containers
tl;dr k8s deprecated support for docker's runtime because it kinda sucks and because docker images are compatible with some format they work on other standard runtimes anyway
We use docker to build, containerd to run iirc
The write up above is aimed at people that know docker, but don’t know what the hell runtimes and all the underlying BS is
Like me
Check it out for a better explanation than a 10 word TL;DR
Understood, ty

You see, the thing we call “Docker” isn’t actually one thing—it’s an entire tech stack, and one part of it is a thing called “containerd,” which is a high-level container runtime by itself.
so uh
you mind explaining that a little farther, akarys
So containers are stacks and stacks of tools and standards
Docker is both a container builder, which will create a standard container file using the Dockerfile system, and a runtime, DockerRT (or something like that) which can take those standard containers are run them
The cool thing about this standard is that you can put any builder with any runtime
You may build with a rudimentary tool and use Docker for the runtime, or in our case build with Docker and run with containerd (or runc)
we didn't make the switch yet, Linode will make the switch (probably to containerd)
it's deprecated in our version of k8s but not removed
we're on uhh
1.20
but it will be a seamless transition most likely
the only notable change we'll have to make is switching from packageauthor/publisher:1.2.3 to docker.io/packageauthor/publisher:1.2.3
docker images are CRI compliant and that is good and nice
Please take back !ask
Should I make an issue for this somewhere so it can be tracked?
We removed the !ask tag because of the frequency which it was used in a hostile manner to target individuals, and the wording of it was particularly abrasive. Most of what the !ask tag said can be reciprocated in nicer, more personable, ways.
That sounds like a plan, yeah
Yeah and feel free to copy+paste my messages about it into the issue
If not I will get around to commenting later
Alright cool
I wanted to make an issue about making a !ext-like command to change logging level at runtime, but I may have totally forgot about it
Adding it to my task list
Don't think it needs to be runtime-configurable
As far as I am concerned, it already is anyway since we can unload extensions and chances are if you don't want trace logs from it you don't even need it to be loaded at all.
Few exceptions maybe, but whatever.
I was thinking an env var something like ```bash
$ BOT_TRACE_LOGGERS=bot.exts.help_channels._cog,bot.exts.utils.snekbox pipenv run start
I was thinking of an arg or env var, switching it at runtime doesn't sound that necessary although it shouldn't be complex
Config system supports env vars so we can chuck it in there
We already needed to switch log level at runtime in the past, we tried to use int e but it didn't work
I think every time we tested it, we tried it with things that didn’t have any logs at all lmao
But yeah a command would be 10000 times better
It should just be a matter of getting the logger and setting its level
I never needed to change level at runtime 🤔
If we can change it without restarting the bot that would be a nice time save, but ultimately as long as we don’t have to make changes to the repo or something, anything would be an improvement
It is just a small QoL thing, nothing too major
By the way @tawdry vapor I don't know if you seen it but I addressed most of your comments in smartconfig
Yes
I'm curious, what exactly didn't work there?
root = logging.getLogger() # root
root.setLevel(logging.TRACE)
yea.….
logging.getLogger().setLevel(5)
should totally work
@celest charm https://github.com/python-discord/sir-lancebot/pull/586#discussion_r576466175 what was our reasoning for this, again?
seems like it's a bit more intuitive to leave the response code checks where they are imo
If the YouTube API responds in an unexpected way or doesn't even respond, it's not something the command logic (the thing you're implementing) can handle
The bot will tell the user that something went wrong anyway, right?
hi
did you install discord or discord.py
i assume discord.py
so
check what version
!d discord.Intents
class discord.Intents(**kwargs)```
Wraps up a Discord gateway intent flag.
Similar to [`Permissions`](#discord.Permissions "discord.Permissions"), the properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools.
To construct an object you can pass keyword arguments denoting the flags to enable or disable.
This is used to disable certain gateway features that are unnecessary to run your bot. To make use of this, it is passed to the `intents` keyword argument of [`Client`](#discord.Client "discord.Client").
New in version 1.5.
`x == y` Checks if two flags are equal.
`x != y` Checks if two flags are not equal.
`hash(x)` Return the flag’s hash.
`iter(x)` Returns an iterator of `(name, value)` pairs. This allows it to be, for example, constructed as a dict or a list of pairs.
`value` The raw value. You should query flags via the properties rather than using this raw value.... [read more](https://discordpy.readthedocs.io/en/stable/api.html#discord.Intents)
how do i check?
but also that's fucking weird so @patent pivot wtf
?
it should install through the docker container right
i have latest versions of discord.py installed
did you use docker
i git cloned it
there's no requirements
yeah, do you have pipenv installed?
nor does joe
pip install pipenv and then pipenv sync should be enough
i'll try it now
whats sentry dsn
ugh same error still :/
AttributeError: module 'discord' has no attribute 'Intents'
fwiw are you trying to set up the bot to contribute or to use as your own bot?
@fervent sage why are we not using the same approach with make_color and make_colors in ducky generator?
uhhh got a code link?
i did python3 -m bot @patent pivot
you need to run with pipenv
pipenv run start
you'll need to have site running as well in order to contribute to the bot
oh, difference there was probably because i was accomodating for the fact that users can request specific colours through the api, and it's easier for people to work with rgb rather than hsl, where computers dont really care when its random
god damn it lol
Error: the command start could not be found within PATH or Pipfile's [scripts].
ok, so i will do the same on man duckies
for random duckies I'm tempted to say we should go with colorsys hsv/hsl because it gets nicer colours
not removing support for rgb, but using hsv/hsl for our randomness
i dont really understand hsl, but i'll make a request issue for it
colour ;)
yes i like to spell correctly 
apparently i dont have the discord module installed but i do
H = hue, degree on that circle
S = saturation, distance from the center
V = value, brightness of the colour
we probably want HSV
quackstack#26
ah wait i've found a great graphic
oh :(
courrectly
has this server got any stage channels
We tested it a bit. I have plans to use a stage channel for an upcoming thingy
there's a test server
HSL (hue, saturation, lightness) and HSV (hue, saturation, value, also known as HSB or hue, saturation, brightness) are alternative representations of the RGB color model, designed in the 1970s by computer graphics researchers to more closely align with the way human vision perceives color-making attributes. In these models, colors of each hue a...
@patent pivot is there a way to install all of the requirements with pipenv
not easily
fyi the bots will probably need to run discord.py 1.7 to properly use stage channels without throwing errors
docker I guess
pipenv sync
we don't need the bots to use stage channels, ever really
on the plus side
at least discord.py doesnt crash with unknown channel types
cough eris
look, if you're logging channels, it does have the unknown channel types
so uh, it will probably throw errors
i managed to crash zep the other week by making one on gtao lol
we're not lul
i can't say how well the bot is coded
we tend to check like
but i tried to get a channel object with my bot and errors galore
I don't think we'll -- what joe said
"is text channel" rather than "is not voice channel" for those sorts of things
we'll figure it out soon enough if things do break
if youre not explicitly interacting with stage channels below d.py 1.7 you'll have no issues
what version are you on rn
!int e import("discord").version_info
In [1]: __import__("discord").version_info
Out[1]: VersionInfo(major=1, minor=6, micro=0, releaselevel='final', serial=0)```
ah
wait
does the int e command work as a repl session
like
if you were to set a variable in the first command
could you access it in the second command?
Nice!
don't think we do that, no
do you host the python bot from just one server? @patent pivot
k8s right?
the python bot itself runs on a single server at one time, yes, but the actual cluster of nodes powering all of our services (bot, site, lancebot, quackstack, etc.) consists of three physical servers
i have checked out from the relayout branch, so that I can use the new layout, so should i wait for it get merged or pr it anyway
ah
ImportError: cannot import name 'api' from partially initialized module 'bot' (most likely due to a circular import) (/root/bot/bot/bot.py)
🥲
@patent pivot am i good to do things like merge on quackstack since im fairly familiar with it
just wanna be sure
in terms of are you allowed to
yes
in terms of can you
idk i haven't checked the perms lol
go for it
the review policy says that anyone in the pydis org can leave an approving review iirc
aight, layout is merged
currently it is just a copyish of the aaaAAAA
ah i see
providing it's not devops staff approvals are 
i really need to familiarise myself with devops, actions, and pr checks way more
most of it is all done for you, policy bot won't let you merge a devops PR unless it gets a devops approval
like this
did we set up auto-deploy on quackstack yet
last few weeks of contributing to pydis stuff has been really fun tbh, it's nice to be working with other people on stuff, 99% of my stuff is open source but mostly limited to just me
dont think so
also what is the url for quakstack?
lol it appears so
ok
those names are annoying lol
also, what's the pipenv command for installing the dev environment?
pipenv sync --dev
thanks
i might PR names going back to normal lol
yeah, im all for ducks everywhere but ci/cd stuff is not included in said everywhere 
lul
lol
pr made btw
https://github.com/python-discord/quackstack/issues/2 close this issue
In order to procedurally generate ducks, we need duck templates and accessories. Currently, these are available in https://github.com/python-discord/aaaaAAAA/tree/main/assets/duck-builder, and shou...
yes
lol, even that was my first generated ducky
You’re running from the wrong directory. Make sure you run pipenv start from the folder that has the Pipfile (go one directory up basically)
Did you see the getting started guide?
This int e snippet
import logging
logging.getLogger("bot.exts.backend.sync._syncers").setLevel(logging.TRACE)```No idea why though, I haven't investigated it
I hate precommit
where is the getting started guide? @gritty wind
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.
Each of the repositories has their own specific setup guide too, if you click on the title in the cards on that page
is sentry dsn a requirement to run the bot
Nope, only if you want to test/make changes to sentry 🙂
what's that?
it's a service that you can post errors to
ah
and it groups errors together and gives useful info on them
is it automatic
automatic in what sense? I don't think anyone uses it in development
Not quite, we have a cog that listens for errors and pushes it to sentry
where is the "getting started" guide?
Click the name of whatever project here: https://pythondiscord.com/pages/contributing/
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.
Whether that's Sir Lancebot, Python, or the website.
i get stuck with this part
i don't see guild.id in the config file
ah
It isn't guild.id
YAML uses the thing before the dot as the category, and the id as the item.
it's the id item under the guild category
same goes for urls
now i just need to somehow set up the webserver and figure out what redis is
But if you're curious: https://redis.io
you're best of following the instructions in the linked guide
it gives me an error for redis when i run it
use_fakeredis: true
Yup you probably don't have redis installed, or setup locally
or is it no use
You can use fake redis yeah
It just pretends to be redis, but does everything in memory
fake redis is on line 18 in the config
ok i set it to true
for the site, do you have docker locally?
i dont think its installed no
That would make setup much simpler, but either way, you can clone the site repo and follow the setup guide here
https://pythondiscord.com/pages/contributing/site/
The API is a requirement of the bot project
Okay
are you running everything with docker?
i was using pipenv
for?
but to start the containers i am missing .env
No, there are env vars.
oh wait, you are running site?
Yeah, they are.
docker-compose up
Do you have docker installed?
wait, now you are using docker.... uhh
yes
The site uses docker.
^
everything can run with or without docker
so it should be working then? @gritty wind
what are you stuck at?
it can run without docker too
it won't let me install docker 😔
much errors
what are you getting?
What packages?
docker-ce docker-ce-cli containerd.io
Have you added the apt source?
yes
and apt update?
normally on ubuntu you can get basically all of docker and compose working with just apt install docker.io docker-compose
Also the automatic installer isn't bad tbh
curl -fsSL https://get.docker.com | sudo sh
i'll try that @green oriole
didn't seem to work
: docker
Command 'docker' not found, but can be installed with:
snap install docker # version 19.03.13, or
apt install docker.io # version 19.03.8-0ubuntu1.20.04.2
See 'snap info docker' for additional versions.
docker-compose ?
what errors come when you do:
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
If you run on docker, do you need to run on the host? (site)
lots @short snow
remove those repo for docker
i can do docker-compose but it just says i am missing the .env file in the bot directory
and use this:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
then run sudo apt update
and see if it errors out or works
how do i remove them
uhh, not sure, lemme google
ah there, https://askubuntu.com/a/310
well, do you have an .env file in your bot directory?
it's not part of the repo, it's where you specify your bot token
nice, found a guide to install docker on 20.04, there you go @swift flower,
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
i don't, i have my token in config.yml
@cold island is there a template to make .env file
it's in the guide iirc
bot or site?
Wait, are you doing both at once?
Yes you can…
it gives me an error
BOT_TOKEN=""
BOT_API_KEY="badbot13m0n8f570f942013fc818f234916ca531"
it you aren't using the bot's docker compose, you do need site
idk what is happening
Or do you need bot for the site?
they started this by trying to setup the site
Yeah.
bot*
This is getting a bit messy, would you like to hop in voice lol
me?
yeah
sure give me 5 minutes
are you running bot with docker?
or bot with pipenv run start,
and site and postgres with docker
i'm running bot
ik, but how
pipenv run start
like this?
yes
ok, did u get docker isntalled perfectly?
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host pydis-api.default.svc.cluster.local:80 ssl:default [None]
2021-04-06 13:16:58 | bot | CRITICAL | Could not connect to site API. Is it running?
I got this error when running pipenv sync --dev
RuntimeError: location not created nor specified
run the site first, and then run the bot
how do i run the site?
docker-compose up --no-deps site
What's --no-deps?
uhh can u put it in a bin?
Docker isn't running
prevents Compose from also recreating any services which site depends on.
ugh
Does this mean anything to anyone?
I have no idea, sorry
haven't seen that one before, what folder are you in?
i run everything with docker as of now, so nope
The site repo.
are you on linux?
Windows
please help me fix docker @short snow
here
Hmmm
yes but i have broken docker
Try sudo systemctl status docker
i think if i try to install it anymore times it will break
Tell us what it says
Unit docker.service could not be found.
Wait, me or 60x?
That's.. problematic
60x
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
dawn wait, lets figure out 60x's stuff first
Okie.
ok i did that
@vocal prairie from a quick look up it seems like your Python install might be broken
@short snow I don't think dropping the same link over and over is really useful
Crap. Time to reinstall Python.
i got some errors just doing apt-get update lol
Err:1 https://download.docker.com/linux/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Err:3 https://dl.yarnpkg.com/debian stable InRelease
The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:58 and /etc/apt/sources.list.d/docker.list:1```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - did u run this?
Oh! I have Python 3.10 installed.
no
That's probably screwing it up.
run everything step by step in that link i shared
yeah bro but i've still got issues and i'm not even on the first step
uhh, you need to remove the keys, lemme see how to do that
yeah this
Err:1 https://download.docker.com/linux/ubuntu focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
NO_PUBKEY 7EA0A9C3F273FCD8
I don't need the key in my server's keyring anymore. Is it possible to remove it? I added the key using this command:
curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add -
Thanks...
i dont see them in the list
you need to add the key
This should be the right command
You should be able to run apt update then
remove that key
i dont see it in the list when i do sudo apt-key list though
try doing this: sudo apt-key del <key>
What is the return code of the apt-key add command?
ok
i got some work, so ping me when your reply
i think i will take a break too because nothing is working and its giving me a headache
You should never be randomly removing developer keys
You can try manually adding the repo
we are doing that right now, but when they do sudo apt-get update it errors out on the yarnpkg keyring
I just uninstall my old version and installed Python 3.9.4, but I'm still getting the same error.
