#dev-contrib

1 messages · Page 95 of 1

patent pivot
#

@fervent sage what would happen if we totally disable member cache

gritty wind
#

I've tested this smh

patent pivot
#

lol

#

what is the ansewr

fervent sage
#

er, im not too familiar with lancebot so i cant tell you what would be affected tbh

gritty wind
#

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

patent pivot
#

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

gritty wind
#

Does it? Seems like a discord bug then

#

But I would've thought it just gets basic user info

fervent sage
#

hang on

gritty wind
#

Haven't worked with the API before

patent pivot
#

Nah, it gets an avatar key

fervent sage
#

it should be updated by gateway user_update events

fallen patrol
#

gets the hash

patent pivot
fallen patrol
#

all that needs to be done is

#

well

patent pivot
fervent sage
#

not member update

#

user_update

fallen patrol
patent pivot
#

hmmmm

fallen patrol
#

lemme turn of my member intent

patent pivot
#

do we get user update?

fervent sage
gritty wind
#

.int sockets when

patent pivot
#

hmmmmmmmmm

fallen patrol
fervent sage
fallen patrol
#

i need that site for my own bot lol

patent pivot
#

well this is weird

fallen patrol
patent pivot
#

why ctx.author is pointing to dead data when it should get new data in the msg object

fallen patrol
#

uh so

#

I turned off intents

#

and still get it

patent pivot
#

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

fallen patrol
#

I made my intents none()

#

didn't turn on messages tho

#

aight so

#

with just message intents

#

you can get the pfp

fervent sage
#

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

fallen patrol
#

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

patent pivot
fallen patrol
#

yeah

#

ironically sir lancebot doesn't have an int e

#

so you can't get what it sees for my pfp

gritty wind
#

I mean, we do

#

It’s the result of the command

patent pivot
#

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

vocal prairie
#

I wish you could just do cdn.discordapp.com/avatar/userid.

patent pivot
#

anyone want to change name or avatar lol

vocal prairie
#

I can.

patent pivot
#

i'm looking at the raw events lancebot is receiving now

vocal prairie
#

I changed it.

fallen patrol
fallen patrol
gritty wind
#

You can always do one more change

patent pivot
gritty wind
#

Delete your pfp

patent pivot
fallen patrol
vocal prairie
#

Should I run 8bitify?

fallen patrol
#

not that im not willing

patent pivot
patent pivot
fervent sage
#

huh...

gritty wind
#

Sounding kinda familiar

#

typing

patent pivot
#

I wonder if this is related to us not receiving any typing events

#

lol

#

yeah

short snow
#

what should be the name of the asset folder in quackstack?

patent pivot
#

time to head to ddevs

short snow
#

assets or duck-builder?

#

or something else

fallen patrol
#

do you get them in the smaller guilds?

#

the bot test guild

#

if one were to type in it

#

what would happen

gritty wind
#

We get them on some of the bots here

#

Like modmail

#

But not python

fallen patrol
#

or if one who is in that server and sent a message, what would happen

fallen patrol
gritty wind
#

That’s discord

fallen patrol
#

although arguably if someone is typing in dms with modmail and there's an open channel with that user.….

gritty wind
#

DM typings don’t work for python either

fallen patrol
#

well it'd be actually nice to paradoy the typing indicator

gritty wind
#

It does do that

fallen patrol
#

ohshit okay

vocal prairie
#

Would this be a d.py code problem, or a discord api issue?

patent pivot
#

DM typing works for lancebot

gritty wind
#

Yeah that’d what I meant

fervent sage
#

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'

gritty wind
#

Where else do we have the bots lol

fallen patrol
#

so guild size probably

fallen patrol
gritty wind
#

Modmail works with this guild size

fallen patrol
#

?src

#

?about

#

?code

#

uh

gritty wind
#

?about

slow boneBOT
#

This is an open source Discord bot that serves as a means for members to easily communicate with server administrators in an organised manner.

Uptime

11d 20h 48m 34s

Latency

117.44 ms

Version

3.9.1

Authors

kyb3r, Taki, fourjr

Hosting Method

OTHER

Want Modmail in Your Server?

Follow the installation guide on GitHub and join our Discord server!

Support the Developers

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!

fallen patrol
#

got it

fallen patrol
gritty wind
fervent sage
#

shouldnt things like that have cooldowns anyway though?

gritty wind
#

Unless that’s seconds

fervent sage
#

it is

gritty wind
#

Ah

#

Seems fine then

vocal prairie
#

Anytime after pfp changes, Lancebot is failing at 8bitify.

#

So the way it receives the event seems to be off.

patent pivot
#

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

vocal prairie
#

So does it seem like an API issue?

patent pivot
#

seems it

gritty wind
#

What is it with discord and missing API events here

#

Kinda weird lol

fervent sage
#

i could pr in a fix using get_user for the time being if wanted

patent pivot
#

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

fervent sage
patent pivot
#

yeah, go for it

#

I need an eval command on lancebot to get the session ID lol

#

wait no I don't

short snow
#

@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

fervent sage
#

aight, sir-lancebot#657

fallen patrol
#

uhm

#

its not just that command

#

i'd just

#

not make a fix

#

until sir-lancebot#597

dusky shoreBOT
short snow
#

hmm, after moving the assets to quackstack, pycharm is automatically closing whenever i open it

patent pivot
fallen patrol
#

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

vocal prairie
#

It says internal.

patent pivot
#

that was relays, yeah

vocal prairie
#

Internal means on their side, not ours, right?

patent pivot
#

yeah

fallen patrol
#

^

patent pivot
#

we knew it was active, but it was transparent to us

fervent sage
#

sharded guilds when mmLol

#

cough, wallstreetbets

fallen patrol
fallen patrol
patent pivot
#

that we were on the new backend

fallen patrol
#

oh wait.

#

how?

patent pivot
#

lol

fallen patrol
#

how did you know

#

did they tell you internally?

patent pivot
#

& yeah I spoke with the eng who implemented that feature

fallen patrol
#

what is relay enabled

patent pivot
#

but it's fully transparent to users and bots

fervent sage
#

relay being the 'new guild infra'

fallen patrol
#

oh okay understandable have a great day

patent pivot
#

relay is the new backend for scaling, the intricacies are fairly unknown yeah

fallen patrol
#

ah

#

so servers can go past 700k members

fervent sage
#

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

fallen patrol
#

hey joe, did this server ever hit a member limit?

vocal prairie
#

The member limit is 730K, isn't it?

fallen patrol
#

and needed to be raised by discord

fallen patrol
#

OH DAMN DID IT GO DOWN

#

that used to be 700k

#

now its 500k

green oriole
#

The only thing I know about RELAY_ENABLED is that #mod-log choke on it on every guild edit

fervent sage
#

innersloth was never raised above 500k

patent pivot
#

it was

patent pivot
#

innersloth was at 700k lol

fervent sage
#

oh

#

huh

patent pivot
#

i was the guy that kicked the members hahahahahaha

fervent sage
#

lol

cold moon
#

Servers with millions of members when?

fallen patrol
patent pivot
#

contractor

gritty wind
#

When you pay for better infra yourself

fallen patrol
#

how did you get to kick 200k members lmao

vocal prairie
patent pivot
green oriole
patent pivot
green oriole
#

Presence limits were fun

fallen patrol
fervent sage
#

there are issues™️ with superlarge guild scaling which believe me i'd love to get into but i could waste hours talking about it

green oriole
#

Do an at-everyone and the guild goes down

fallen patrol
#

which arguably I wish that non bots could unsuppress embeds

fervent sage
#

client setting for allowed mentions when pleading_ice_cream

fallen patrol
#

heck, access to allowed mentions on a user account would be nice too

#

Yeah

green oriole
#

#mod-log is doing some weird stuff with feature flags

cold moon
#

I hope if Microsoft buy Discord we can get guilds with millions of members

patent pivot
#

innersloth was at 730k, just checked

patent pivot
fallen patrol
green oriole
#

Yeah uuuhhh

#

millions of people in one server

#

not good

fallen patrol
cold moon
#

If server have millions of members, then channel-specific moderators is required

fervent sage
#

there are so many issues with superlarge guilds, but one of the main ones excluding infrastructural limits is that moderating them would be awful

fallen patrol
#

being able to manage allowed mentions for ourselves would be fricking nice

patent pivot
cold moon
#

Just hire 1000 moderators and assign all of them to one specific channel

fervent sage
#

i moderated wallstreebets for a brief time and with 400k members that was awful

#

with only boosters allowed to talk

fallen patrol
patent pivot
#

took a couple of days

placid ermine
vocal prairie
#

So we just need to wait for Discord to do its thing?

#

And hopefully tell us stuff?

placid ermine
#

ouch

fallen patrol
fervent sage
#

it was... interesting to say the least

vocal prairie
#

Prune?

fallen patrol
#

yeah

patent pivot
fallen patrol
#

ah

patent pivot
#

the accounts we kicked were active on discord, but not on the innersloth server

#

purging was not going to be the solution

fallen patrol
#

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

patent pivot
#

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

fallen patrol
#

ah

#

damn

#

v cool

patent pivot
#

we didn't want to kick everyone out at the same time as well because that would be hell for the mods

vocal prairie
#

Did you kick random people, or just the inactive ones?

thorny obsidian
#

Just everyone ping that you'll be kicking :) what could go wrong :)

fervent sage
#

or better still

patent pivot
#

because as soon as we freed up space, new, active accounts joined, and that put more pressure on mods

fervent sage
#

mass dm them

patent pivot
fallen patrol
patent pivot
#

was a fun time building a bot that could handle that guild

#

we're doing more soon

thorny obsidian
#

With the increased infra, could I possibly bring up re-enabling member intents for lance?

green oriole
patent pivot
#

With what purpose?

fallen patrol
green oriole
#

Yikes, the issues cog on lance is pretty broken

thorny obsidian
#

Some of the current functionality was built around member intents being enavled

gritty wind
#

We did rip out some features

thorny obsidian
#

Like the lovefest stuff was a bit broken without it

gritty wind
#

Hit really hard last February for valentines

green oriole
#

Oh I see why it is like that

patent pivot
#

Yeah, Lovefest did get pretty broken

short snow
fervent sage
#

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

short snow
#

is it a good readme for the duck builder directory?

patent pivot
fervent sage
#

ah

thorny obsidian
#

:3 lance is my fave cause events so I'd be happy to champion it and actually write up some good reasoning

fallen patrol
#

then why were they disabled?

fervent sage
#

realistically 170k members shouldnt be too hard for a bot to handle

thorny obsidian
#

Because it wasn't necessary and we were stressing our previous infra

fervent sage
#

gtao's bot deals with ~300k in a few seconds on start and is fine

thorny obsidian
#

We run several services and dropping member and precense intents dropped CPU usage like 10%

vocal prairie
#

How many active members does this server have?

gritty wind
#

Joe the stat man to the rescue

thorny obsidian
#

@patent pivot do you have that awesome graph thing from when presence and member intents was disabled?

vocal prairie
#

I had no idea that existed.

#

Thanks!

thorny obsidian
vocal prairie
#

That doesn't have anything about active members. Are there any numbers on that?

patent pivot
#

hmmm

#

hmmmm

gritty wind
#

I feel like we’ve been infiltrated

patent pivot
#

wait o

#

id eleted mesages

gritty wind
#

Lol

thorny obsidian
#

-_- joe I was like half a second from warning because I thought it was a troll

patent pivot
#

lol

gritty wind
#

Hahaha get an alt banned to pump up your mod stats 👀

mortal turtle
#

i'm testing if we are on relays

#

apparently the RELAY_ENABLED flag might not be entirely tied to it

fallen patrol
#

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.

green oriole
#

Joe has like 10 alts

vocal prairie
#

Oh wait, that's Joe?

fervent sage
#

if the concern is long starting times which used to be an issue a while ago, that should no longer be an issue

green oriole
#

Everyone is joe

sleek steppe
#

Where did the devops role go

mortal turtle
vale ibex
#

No, I'm Joe

fallen patrol
#

hide your embeds

vocal prairie
fallen patrol
patent pivot
patent pivot
#

lol

fervent sage
#

im still procrastinating on dma421 blob_pain

patent pivot
#

i have a uhhh

#

4XX one yeah

#

on children

#

lol

gritty wind
#

Why didn’t you get 420 😔

patent pivot
#

yeah vco

fervent sage
#

hang on

patent pivot
#

why didn't you get 420

fervent sage
#

420 isnt taken

#

ok

#

420

patent pivot
#

LOL

placid ermine
#

bruh

fervent sage
#

DMA420: Making custom bots for your community

gritty wind
#

Lmao

vocal prairie
#

How does Discord even assign people to these?

thorny obsidian
#

LMAO, also vco your bot guide is like half the reason the duckify command happened at all in time

fervent sage
#

the google doc has been officially corrected

mortal turtle
#

guess who's back

#

back again

patent pivot
#

!kick @mortal turtle nerd

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied kick to @mortal turtle permanently.

placid ermine
#

bruh

whole forge
#

what?

green oriole
#

lmao

placid ermine
patent pivot
#

alt account

#

yeah

whole forge
#

nerd

sleek steppe
#

Kicked permanently kekwait

patent pivot
#

testing if we are on relays by seeing if event dispatches are received immediately

green oriole
#

inb4 joe kicks every devops member to be the only devops remaining

fervent sage
#

he cant be a devops daddy if there are no devops children though

whole forge
#

good point

green oriole
#

hmm true

fallen patrol
#

permanent kick is basically a ban

#

unless

#

you made it so whenever it rejoined it'd be kicked again Honk

green oriole
#

It isn't lol

#

It is just a kick

fallen patrol
#

permanently kicked akarys

#

shit, he rejoined. kicked again

vocal prairie
#

But the wording could be better.

green oriole
#

Oh

#

I see

sleek steppe
green oriole
#

LMAO

#

That's golden

fervent sage
#

time for my 3rd pr of the day cracks knuckles

green oriole
#

!otn a applied-kick-permanently

stable mountainBOT
#

:ok_hand: Added applied-kick-permanently to the names list.

fallen patrol
#

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

green oriole
#

We wanted to do that

fallen patrol
#

if in a staff channel, only disclose who made it

green oriole
#

but sadly we don't have the information for the older otns

fallen patrol
#

sad

fallen patrol
#

does it collect info now?

thorny obsidian
#

We have most of the context. The one ones were really just volccy turbo adding them

green oriole
#

Also some channels were reset

#

Unless the history has been saved, it is probably impossible to get back

vocal prairie
#

How many days of otns do you have on average at any given time?

green oriole
#

!otn list

vocal prairie
#

Dang.

green oriole
#

Only a year worth of

patent pivot
#

NO LEAKIN

thorny obsidian
#

But part of the charm is not having the context available imo

patent pivot
#

ILLEGAL

green oriole
#

lol that's the first otns

patent pivot
#

we should ban them outside of mods really

fervent sage
#

the lack of context is what makes them great

patent pivot
#

we should ban them outside of mods really

fallen patrol
#

don't

#

you

green oriole
#

We can do that

fallen patrol
#

dare

patent pivot
#

???

#

lo

green oriole
#

only !otn list

patent pivot
#

we already have a policy in place

fallen patrol
#

I mean i have no control but

patent pivot
#

to not search or list

fervent sage
#

can helpers otn a?

patent pivot
#

uhhh

#

try it lol

green oriole
#

nop

fallen patrol
patent pivot
#

don't think so

fallen patrol
#

but

fervent sage
fallen patrol
#

!otn a can helpers otn a

#

try it

fervent sage
#

!otn a helpers cant otn a

vale ibex
#

Helpers can list via the site iirc

stable mountainBOT
#

:ok_hand: Added helpers-cant-otn-a to the names list.

short snow
#

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

fallen patrol
vocal prairie
#

Didn't Akarys do that?

fervent sage
fallen patrol
vocal prairie
#

Or am I blind?

vale ibex
#

Who's akarys? 🤷‍♂️

thorny obsidian
#

He did, not quite fast enough on the delete

fallen patrol
green oriole
#

who is this dumbass of akarys?

fervent sage
fallen patrol
green oriole
#

My brain isn't big enough

short snow
timid sentinel
fallen patrol
#

i mean

timid sentinel
fallen patrol
#

it never got updated

timid sentinel
#

ignore me lol

#

yeah

fallen patrol
#

dormant != available

timid sentinel
#

I confused myself, myb

sleek steppe
#

Lol

crude gyro
vale ibex
#

@fervent sage Do you mind if we move sir-lancebot#657 into sir-lancebot#597?

vale ibex
#

I imagine the issue you fixed will be the same for all the pfp modifying commands

fervent sage
#

yeah sure

vale ibex
#

597 moves them all into the same cog, so can just be a helper function

patent pivot
#

i have DM'd a discord eng so

#

we'll see if we have news there

#

i have DM'd a discord eng so

brazen charm
#

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

patent pivot
#

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.

brazen charm
#

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

cold moon
#

What is difference between trace and debug?

patent pivot
tawdry vapor
#

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.

patent pivot
#

hmmm

tawdry vapor
#

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.

patent pivot
#

having a delve through the code, yeah, I think I agree

#

I don't think that'd be too hard to achieve

tawdry vapor
#

As for whether we should merge trace and debug levels, the jury is still out.

patent pivot
#

comma separated list in env var of the loggers you want to have trace logging, or something along those lines?

cold moon
#

Maybe we should do something like Rust envlogger

tawdry vapor
#

Debug is like... stuff that's only useful for debugging but that we would want to see in production to help us reproduce issues.

cold moon
#

For this is info I think?

tawdry vapor
#

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

clever wraith
#

Hey @vale ibex this is late but congrats on making core dev!

clever wraith
#

I never read the dev announcements when they come out...

vocal prairie
#

Yes, of course!

gritty wind
#

Yeah, most of our projects are MIT licensed

#

Rules of the license are here

fervent sage
#

should i close the pr i made for it

vocal wolf
#

@green oriole are you planning on doing this?

vale ibex
green oriole
vocal prairie
vocal prairie
#

Yeah, I saw. But the pr still exists.

fallen patrol
#

understandable discord have a good day

#

(||Doesn't look like anything to me||)

vocal prairie
#

It's strange.

#

Default is deprecated.

fallen patrol
#

and v7?

#

is just --

fervent sage
#

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

fallen patrol
#

yeah

#

bruh

#

how to

clever wraith
#

Guys

#

i have a question

fallen patrol
#

how to read image data from an avatar request like what

clever wraith
#

is it possible convert a png to svgData ?

fallen patrol
#

trying to see if i can repl the sir lancebot bug and well, i can't read image data

clever wraith
#

if so how

#

please help

clever wraith
#

thanks

vocal prairie
#

Isn't Kubernetes deprecating its support for Docker?

gritty wind
#

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

vocal prairie
#

Oh, so it won't change the way PyDis does stuff?

thorny obsidian
#

Docker Engine, but not docker images is the tl;dr, right?

gritty wind
#

Yeah container runtime

#

Kube released a write up on it

#

I’ll see if I can dig it up

#

TLDR on the first line

vocal prairie
#

So docker images still work, but the runtime won't?

green oriole
#

No idea what the difference is though

#

But it is done, we are all good

thorny obsidian
#

(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 >_>)

gritty wind
#

Basically it’s the way it runs the actual container

#

Idk if docker engine is necessarily connected

vocal prairie
#

I see, makes sense.

gritty wind
#

Possibly is

green oriole
#

Basically, there are tools to build a container and tools to run containers

fervent sage
#

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

green oriole
#

We use docker to build, containerd to run iirc

gritty wind
#

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

vocal prairie
#

Understood, ty

fallen patrol
#

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

green oriole
#

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)

patent pivot
#

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

dusky rose
#

Please take back !ask

brazen charm
patent pivot
#

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.

patent pivot
tawdry vapor
#

Yeah and feel free to copy+paste my messages about it into the issue

#

If not I will get around to commenting later

green oriole
#

Adding it to my task list

tawdry vapor
#

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.

patent pivot
#

I was thinking an env var something like ```bash
$ BOT_TRACE_LOGGERS=bot.exts.help_channels._cog,bot.exts.utils.snekbox pipenv run start

brazen charm
#

I was thinking of an arg or env var, switching it at runtime doesn't sound that necessary although it shouldn't be complex

tawdry vapor
#

Config system supports env vars so we can chuck it in there

green oriole
#

We already needed to switch log level at runtime in the past, we tried to use int e but it didn't work

gritty wind
#

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

brazen charm
#

It should just be a matter of getting the logger and setting its level

tawdry vapor
#

I never needed to change level at runtime 🤔

gritty wind
#

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

green oriole
#

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

tawdry vapor
#

Yes

brazen charm
fallen patrol
#
root = logging.getLogger()  # root
root.setLevel(logging.TRACE)
#

yea.….

#

logging.getLogger().setLevel(5)

#

should totally work

cosmic moat
#

seems like it's a bit more intuitive to leave the response code checks where they are imo

celest charm
#

The bot will tell the user that something went wrong anyway, right?

swift flower
#

hi

fallen patrol
#

so

#

check what version

#

!d discord.Intents

stable mountainBOT
#
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)
swift flower
#

how do i check?

fallen patrol
#

but also that's fucking weird so @patent pivot wtf

patent pivot
#

?

fallen patrol
#

it should install through the docker container right

swift flower
patent pivot
#

did you use docker

swift flower
#

i git cloned it

patent pivot
#

we don't use that

#

we use pipenv

swift flower
#

there's no requirements

patent pivot
#

yeah, do you have pipenv installed?

swift flower
#

idk how to use pipenv joe

#

:(

fallen patrol
#

nor does joe

patent pivot
#

pip install pipenv and then pipenv sync should be enough

swift flower
#

i'll try it now

#

whats sentry dsn

#

ugh same error still :/

AttributeError: module 'discord' has no attribute 'Intents'
fallen patrol
#

fwiw are you trying to set up the bot to contribute or to use as your own bot?

swift flower
#

i'm going to contribute

#

if i can get it working lol 🤣

patent pivot
#

hmm

#

what did you run to get that error

short snow
#

@fervent sage why are we not using the same approach with make_color and make_colors in ducky generator?

fervent sage
#

uhhh got a code link?

short snow
swift flower
#

i did python3 -m bot @patent pivot

patent pivot
#

pipenv run start

#

you'll need to have site running as well in order to contribute to the bot

fervent sage
#

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

swift flower
#

god damn it lol

#
Error: the command start could not be found within PATH or Pipfile's [scripts].
short snow
#

ok, so i will do the same on man duckies

patent pivot
#

not removing support for rgb, but using hsv/hsl for our randomness

fervent sage
#

i dont really understand hsl, but i'll make a request issue for it

swift flower
#

colour ;)

fervent sage
#

yes i like to spell correctly mmLol

patent pivot
#

okay so

#

imagine we have a point on that circle

swift flower
#

apparently i dont have the discord module installed but i do

patent pivot
#

H = hue, degree on that circle
S = saturation, distance from the center
V = value, brightness of the colour

#

we probably want HSV

fervent sage
#

quackstack#26

patent pivot
#

ah wait i've found a great graphic

fervent sage
#

oh :(

patent pivot
fervent sage
fallen patrol
#

I'm in lighting design and would love to see the rest

swift flower
#

has this server got any stage channels

fallen patrol
thorny obsidian
#

We tested it a bit. I have plans to use a stage channel for an upcoming thingy

fallen patrol
#

there's a test server

patent pivot
# fallen patrol source?

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...

swift flower
#

@patent pivot is there a way to install all of the requirements with pipenv

patent pivot
#

not easily

fallen patrol
patent pivot
#

docker I guess

fallen patrol
patent pivot
fervent sage
#

on the plus side

#

at least discord.py doesnt crash with unknown channel types

#

cough eris

patent pivot
#

lol

#

true

fallen patrol
#

so uh, it will probably throw errors

fervent sage
#

i managed to crash zep the other week by making one on gtao lol

patent pivot
#

we're not lul

fallen patrol
#

i can't say how well the bot is coded

patent pivot
#

we tend to check like

fallen patrol
#

but i tried to get a channel object with my bot and errors galore

thorny obsidian
#

I don't think we'll -- what joe said

patent pivot
#

"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

fervent sage
#

if youre not explicitly interacting with stage channels below d.py 1.7 you'll have no issues

fallen patrol
#

what version are you on rn

patent pivot
#

!int e import("discord").version_info

stable mountainBOT
#
In [1]: __import__("discord").version_info
Out[1]: VersionInfo(major=1, minor=6, micro=0, releaselevel='final', serial=0)```
fallen patrol
#

ah

patent pivot
#

we'll bump at some point

#

it's not urgent

fallen patrol
#

wait

#

does the int e command work as a repl session

#

like

#

if you were to set a variable in the first command

short snow
#

ducky man!

#

boom, it works

fallen patrol
#

could you access it in the second command?

fervent sage
#

Nice!

patent pivot
#

don't think we do that, no

swift flower
#

do you host the python bot from just one server? @patent pivot

fervent sage
#

k8s right?

patent pivot
short snow
#

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

swift flower
#

ah

#
ImportError: cannot import name 'api' from partially initialized module 'bot' (most likely due to a circular import) (/root/bot/bot/bot.py)

🥲

fervent sage
#

@patent pivot am i good to do things like merge on quackstack since im fairly familiar with it kek just wanna be sure

patent pivot
#

in terms of are you allowed to

#

yes

#

in terms of can you

#

idk i haven't checked the perms lol

fervent sage
patent pivot
#

go for it

#

the review policy says that anyone in the pydis org can leave an approving review iirc

short snow
#

i will pr it within an hour, just need to double check

#

and improve code

patent pivot
short snow
#

currently it is just a copyish of the aaaAAAA

patent pivot
#

providing it's not devops staff approvals are greenTick

fervent sage
#

i really need to familiarise myself with devops, actions, and pr checks way more

patent pivot
#

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

fervent sage
#

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

fervent sage
short snow
#

also what is the url for quakstack?

patent pivot
#

lol it appears so

short snow
fervent sage
short snow
#

ok

patent pivot
#

those names are annoying lol

cosmic moat
#

also, what's the pipenv command for installing the dev environment?

patent pivot
#

pipenv sync --dev

cosmic moat
#

thanks

patent pivot
#

i might PR names going back to normal lol

fervent sage
#

yeah, im all for ducks everywhere but ci/cd stuff is not included in said everywhere kek

patent pivot
#

lul

short snow
#

lol

#

pr made btw

fervent sage
short snow
#

lol, even that was my first generated ducky

gritty wind
#

Did you see the getting started guide?

green oriole
green oriole
#

I hate precommit

swift flower
#

where is the getting started guide? @gritty wind

vale ibex
#

Each of the repositories has their own specific setup guide too, if you click on the title in the cards on that page

swift flower
#

is sentry dsn a requirement to run the bot

vale ibex
#

Nope, only if you want to test/make changes to sentry 🙂

swift flower
#

what's that?

vale ibex
#

it's a service that you can post errors to

swift flower
#

ah

vale ibex
#

and it groups errors together and gives useful info on them

swift flower
#

is it automatic

gritty wind
#

automatic in what sense? I don't think anyone uses it in development

vale ibex
#

Not quite, we have a cog that listens for errors and pushes it to sentry

swift flower
#

where is the "getting started" guide?

vocal prairie
#

Whether that's Sir Lancebot, Python, or the website.

swift flower
#

i get stuck with this part

vocal prairie
#

What's the issue with that?

#

Is there a certain part you're stuck on?

swift flower
#

i don't see guild.id in the config file

gritty wind
#

look for a guild category

#

and in that is an ID item

swift flower
#

i did a search for "guild.id" and there was no results

gritty wind
#

line 134

swift flower
#

ah

gritty wind
#

It isn't guild.id

vocal prairie
#

YAML uses the thing before the dot as the category, and the id as the item.

gritty wind
#

it's the id item under the guild category

swift flower
#

it makes sense now

#

why i couldnt find it

gritty wind
#

same goes for urls

swift flower
#

now i just need to somehow set up the webserver and figure out what redis is

gritty wind
#

you can skip redis

#

but for the server

vocal prairie
gritty wind
#

you're best of following the instructions in the linked guide

swift flower
#

it gives me an error for redis when i run it

sleek steppe
#

use_fakeredis: true

gritty wind
#

Yup you probably don't have redis installed, or setup locally

sleek steppe
#

or is it no use

gritty wind
#

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

swift flower
#

ok i set it to true

gritty wind
#

for the site, do you have docker locally?

swift flower
#

i dont think its installed no

gritty wind
#

The API is a requirement of the bot project

swift flower
#

Okay

short snow
#

are you running everything with docker?

swift flower
#

i was using pipenv

short snow
#

for?

swift flower
#

but to start the containers i am missing .env

vocal prairie
#

This section ^

short snow
#

it is taking config.yml

#

not env variables

#

iirc

vocal prairie
#

No, there are env vars.

short snow
#

oh wait, you are running site?

vocal prairie
#

Yeah, they are.

swift flower
#

docker-compose up

vocal prairie
#

Do you have docker installed?

short snow
#

wait, now you are using docker.... uhh

swift flower
#

yes

vocal prairie
short snow
gritty wind
#

everything can run with or without docker

swift flower
#

so it should be working then? @gritty wind

gritty wind
#

what are you stuck at?

short snow
swift flower
#

when i do pipenv run start i get:

gritty wind
#

yeah, you need to set up the site as well

#

the error is at the very bottom

swift flower
#

it won't let me install docker 😔

#

much errors

gritty wind
#

what are you getting?

swift flower
#

the packages are missing

#

i tried to install them with apt

green oriole
#

What packages?

swift flower
green oriole
#

Have you added the apt source?

swift flower
#

yes

green oriole
#

and apt update?

swift flower
#

i followed all of the steps correctly up to this part

#

yes but i will run it again

fervent sage
#

normally on ubuntu you can get basically all of docker and compose working with just apt install docker.io docker-compose

short snow
#

it should work

#

i used those

green oriole
#

Also the automatic installer isn't bad tbh

#

curl -fsSL https://get.docker.com | sudo sh

swift flower
#

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.

sleek steppe
#

docker-compose ?

short snow
#

what errors come when you do:

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
swift flower
#

i mean

#

docker-compose works @sleek steppe

vocal prairie
#

If you run on docker, do you need to run on the host? (site)

swift flower
#

lots @short snow

short snow
#

psot them on pastebin

#

and put the link here

short snow
#

remove those repo for docker

swift flower
#

i can do docker-compose but it just says i am missing the .env file in the bot directory

short snow
#

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

swift flower
#

how do i remove them

short snow
#

uhh, not sure, lemme google

#
cold island
#

it's not part of the repo, it's where you specify your bot token

short snow
swift flower
#

i don't, i have my token in config.yml

#

@cold island is there a template to make .env file

gritty wind
#

it's in the guide iirc

gritty wind
#

bot or site?

vocal prairie
#

Wait, are you doing both at once?

swift flower
#

at this point i dont even know

#

i cant run the bot without the site

vocal prairie
#

Yes you can…

swift flower
#

it gives me an error

short snow
#
BOT_TOKEN=""
BOT_API_KEY="badbot13m0n8f570f942013fc818f234916ca531"
gritty wind
#

it you aren't using the bot's docker compose, you do need site

vocal prairie
#

But they're setting up the site.

#

Aren't they?

gritty wind
#

idk what is happening

vocal prairie
#

Or do you need bot for the site?

gritty wind
#

they started this by trying to setup the site

vocal prairie
#

Yeah.

gritty wind
#

bot*

vocal prairie
#

Oh.

#

I thought it started with site.

gritty wind
#

This is getting a bit messy, would you like to hop in voice lol

swift flower
#

me?

gritty wind
#

yeah

swift flower
#

sure give me 5 minutes

short snow
#

are you running bot with docker?

#

or bot with pipenv run start,

and site and postgres with docker

swift flower
#

i'm running bot

short snow
#

ik, but how

swift flower
#

pipenv run start

swift flower
#

yes

short snow
#

ok, did u get docker isntalled perfectly?

swift flower
#
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?
vocal prairie
#

I got this error when running pipenv sync --dev
RuntimeError: location not created nor specified

short snow
#

run the site first, and then run the bot

swift flower
#

how do i run the site?

short snow
#

docker-compose up --no-deps site

vocal prairie
#

What's --no-deps?

swift flower
#

lots of errors lol

#

this mean anything to you? @short snow

short snow
#

uhh can u put it in a bin?

green oriole
#

Docker isn't running

short snow
swift flower
vocal prairie
green oriole
#

I have no idea, sorry

gritty wind
#

haven't seen that one before, what folder are you in?

short snow
#

i run everything with docker as of now, so nope

vocal prairie
#

The site repo.

green oriole
#

are you on linux?

vocal prairie
#

Windows

swift flower
#

please help me fix docker @short snow

green oriole
#

Hmmm

swift flower
#

yes but i have broken docker

green oriole
#

Try sudo systemctl status docker

swift flower
#

i think if i try to install it anymore times it will break

short snow
#

purge on docker

#

and reinstall it

green oriole
#

Tell us what it says

swift flower
#
Unit docker.service could not be found.
vocal prairie
#

Wait, me or 60x?

short snow
#

ok yeah, do a purge

#

60x

green oriole
#

That's.. problematic

swift flower
#

a purge?

#

sudo apt-purge docker?

green oriole
short snow
#
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

vocal prairie
#

Okie.

swift flower
#

ok i did that

green oriole
#

@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

vocal prairie
#

Crap. Time to reinstall Python.

swift flower
#

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```
short snow
#

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - did u run this?

vocal prairie
#

Oh! I have Python 3.10 installed.

swift flower
#

no

vocal prairie
#

That's probably screwing it up.

short snow
#

run everything step by step in that link i shared

swift flower
#

yeah bro but i've still got issues and i'm not even on the first step

short snow
#

uhh, you need to remove the keys, lemme see how to do that

swift flower
#

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

short snow
swift flower
#

i dont see them in the list

green oriole
#

you need to add the key

green oriole
swift flower
#

ok

#

i just added it

green oriole
#

You should be able to run apt update then

swift flower
#

rip

short snow
#

remove that key

swift flower
#

i dont see it in the list when i do sudo apt-key list though

short snow
#

try doing this: sudo apt-key del <key>

green oriole
#

What is the return code of the apt-key add command?

swift flower
#

that docker one is the one we just added not the one giving me problems

short snow
#

remove the one with name yarn packing

#

the one above docker

swift flower
#

ok

short snow
#

i got some work, so ping me when your reply

swift flower
#

i think i will take a break too because nothing is working and its giving me a headache

green oriole
clever wraith
short snow
vocal prairie