#dev-contrib

1 messages · Page 82 of 1

eternal owl
#

i c

#

so most of halloween events are restricted but not all of the commands

gritty wind
#

Not everything is restricted

#

Why? who knows ¯_(ツ)_/¯

surreal venture
#

Okay sure! I'll just open an issue real quick

short snow
#

bump on SO command question

gritty wind
#

With discord's short word count

#

I think it'd be easier to just link it

short snow
#

pagination

#

but it looks bad

gritty wind
#

Yeah no no one is going to paginate through a single answer lol

short snow
#

so only link and tags look good

gritty wind
#

But if you can make a short snippet look good, go for it

#

Either way, the answers aren't mandatory

short snow
#

we can default a tag python

gritty wind
#

Since it seems @surreal venture is going to be working on it, I'll leave it up to his discretion how exactly it will look. You are free to work with Jason if you so desire, or implement your solution from the ground up

short snow
#

i can share how i did it to you, if needed

surreal venture
short snow
#

cool!

#

another way is using the stackoverflow api wrapper

#

using that we can even get the answers

#

you can look how it is done and implement it your own, or just use that

surreal venture
#

Also, is there a specific format for naming new (feature) branches that is followed?

gritty wind
#

not really, but keep it short and simple

#

If you'd like, you can also follow the feature/<name> standard, some people do

surreal venture
#

I guess I'll just name it feature/stackoverflow?

gritty wind
#

sounds good

short snow
#

i follow this:
fix/<fix_name> and feature/<feature_name>

surreal venture
#

Also, the README.md is an executable for me

#
$ l
bot/  CONTRIBUTING.md  docker-compose.yml  Dockerfile  LICENSE  Pipfile  Pipfile.lock  README.md*  sir-lancebot-logo.png  tox.ini
gritty wind
#

Ah right I remember that lol

#

Let me uhh

#

fix that

surreal venture
#

The fix is just a chmod -x README.md right?

gritty wind
#

Yesh I think

surreal venture
#

And we create a new branch using git checkout -b <branch name> right?

patent pivot
#

links and tags I think

short snow
#

make sure u are on master before creating one

#

if i delete my feature branches will my commits go?

#

the merged branches

gritty wind
#

They will be lost locally

#

but anything you have on github can be cloned again

#

And if the commits are on master, they will remain there

short snow
gritty wind
#

The PR will still appear on the repo, and the commits will appear on your contributions graph

#

all the changes will be local only

#

You can also safely delete the branch on your fork

surreal venture
#

I'm confused about docker. I understand what it is ( somewhat like a light VM ), but what is Kubernetes now? and how do I get started using docker on Ubuntu 20.04?

gritty wind
#

Kubernetes is a way to use containers (not just docker) with support for scaling and easy mangment

#

Basically

#

it's mostly useful as a deployment/production tool

#

not really for development

#

To get started with docker, make sure you install it first from the website, it if it doesn't come bundled

surreal venture
#

What do I need to install? Docker Desktop?

gritty wind
#

Uh I'm trying to see if the GUI version supports linux

#

I know they have one for windows and mac

#

But I'm only familiar with the CLI for ubuntu

#

Oh well

#

Type docker and if nothing shows up

#

You can follow these instructions to install on most ubuntu systems

surreal venture
gritty wind
#

This is the underlying driver which is included in desktop

#

but its only cli

surreal venture
#

Ah I see

#

thanks!

gritty wind
gritty wind
vale ibex
#

The have some CI that failed on my changeset, which was related to latencies

#

(I am assuming my 1 line change isn't responsible for this, but something in their CI)

weary vector
#

@gritty wind here is the pfp, its actually a wallpaper so it is high res, but i dont think that should cause a problem because it works fine on other bots

gritty wind
#

Thank you

short snow
#

Does the code work locally for you?

#

like the code of 8bitify

#

And i will pr the changes to cht.sh once scaleios’s pr gets merged

gritty wind
#

Hmm it seems to have worked locally with that

#

It is possible it got compressed along the way

weary vector
#

hmmm

gritty wind
#

I'm going to try a couple more images

weary vector
#

alright

gritty wind
#

Alright, reproduced with a larger image

#

But that was actually an issue with the CDN nvm

#

One thing that does seem to happen is the command can run into 404 if you run it right after updating your pfp

#

And I'm seeing it in the error log

weary vector
#

but why is it having 404?

gritty wind
#

I'm guessing it's something to do with cache

weary vector
#

ooh

gritty wind
#

We don't have member intents on sir-lance

weary vector
#

i did recently update my pfp, but it was 5 hours ago or something

gritty wind
#

I don't think it'll update until a restart

weary vector
#

ooh

gritty wind
#

Let me think of a solution

vocal wolf
obsidian patio
#

I’ll have a look soon, unless someone is quicker

vocal wolf
#

@gritty wind re-requested review for sanity reasons

gritty wind
#

is this dynamic message?

vocal wolf
#

yes

short snow
#

Yeah

gritty wind
#

Alright

obsidian patio
#

!remind 1h Review

stable mountainBOT
#
Sure thing!

Your reminder will arrive in 1 hour!

wet wadi
#

Hi

vocal wolf
short snow
#

My reviews won’t count in the approve count right?

vocal wolf
#

They unfortunately will not

short snow
#

Okh

vocal wolf
short snow
#

since scaleios has one with me and ks123’s approval

gritty wind
#

That will also need another review to be merged

#

But still more reviews == more trust in PR

obsidian patio
#

Yep! We still value your reviews

vocal wolf
#

btw I'm taking over bot#1237

dusky shoreBOT
vocal wolf
#

gonna make another PR

#

this one's a bit old

#

and I kinda want to rewrite it

short snow
#

Also the prs of 14 days no author reply, i told yesterday

vocal wolf
#

he replied not too long ago

#

saying that I can take over

#

so some timing lol

short snow
#

Not that, on sirlance

vocal wolf
#

ah

#

right I'll get to that soon

gritty wind
#

can you merge master into 1396

vocal wolf
#

np

vocal wolf
gritty wind
#

Yesh

#

I was going to give it another test though

#

Should be easy enough to do locally

vocal wolf
#

yeah

gritty wind
#

We'll have to update the test servers for your PR to work xith

#

It includes the how-to-get-help channel in the message right now

obsidian patio
#

Hmm

gritty wind
#

Are you using the test server?

obsidian patio
#

Yeah

#

Using the default config

gritty wind
#

The default config in the bot or on notion?

obsidian patio
#

Notion

gritty wind
#

Right hmm

#

What ID is in that lol

obsidian patio
#

This is the channel ID: 704348336760815697

#

It doesn't seem to e in the config file

gritty wind
#

It does go out of date from time to time

obsidian patio
#

I'll just add it to my own config and then to notion

gritty wind
#

How to get help is new in xith's PR

#

yeah go for it

gritty wind
#

Not on the testing server apparently, but it did for mine

vocal wolf
#

sorry I thought you were talking about something else

gritty wind
#

Because its in a different category

obsidian patio
#

Hmm, it seems like the cooldown channel in the (notion) config is using the #704348336760815697 id

vocal wolf
gritty wind
#

It does

#

Let me get a screenshot

vocal wolf
#

oh no

gritty wind
#

It will be fine on the main server

#

But it needs to be mirrored on other servers

vocal wolf
#

Right

gritty wind
#

Cooldown is ignored correctly

#

I wouldn't mind adding the how-to-get-help to the ignore though

gritty wind
obsidian patio
gritty wind
#

Yeah, go for it

obsidian patio
gritty wind
#

Can you delete the old one

obsidian patio
#

This happens when I try to claim a help channel. I assume it's because the "Available help channel" embed is by another bot

#

Is that the way we use to try it out?

vocal wolf
#

You're trying to edit a github webhook

obsidian patio
#

Am I?

vocal wolf
#

wait

#

on the test server, you would be

#

yes

obsidian patio
#

Which is not a webhook (right?)

vocal wolf
#

It shouldn't be editing that one

#

The only message that the bot attempts to edit is that one

#

oh wait no sorry, that was the old implementation

#

the bot tries to search for a previous message, but it doesn't detect the webhook as a message.

gritty wind
#

Did you take your bot down?

vocal wolf
#

so if a message isn't found to edit, discord.NotFound is raised

#

and it sends a dynamic message

vocal wolf
gritty wind
#

nah vest's

obsidian patio
#

I didn't

gritty wind
#

Is it erroring out when claiming the channel then?

obsidian patio
#

Yes

gritty wind
#

The traceback makes me think it's the available channel message

#

but can you log the message id

#

should just be log.info(self.dynamic_message.id) on line 499 of help_channels/_cog.py

obsidian patio
#

Let me try

#

For the record, everything seems to be sorted

stable mountainBOT
#

@obsidian patio

It has arrived!

Here's your reminder: Review.
[Jump back to when you created the reminder](#dev-contrib message)

obsidian patio
#

Done

gritty wind
#

The site

#

let me have a look

#

Ok moment of truth

cold moon
#

This takes some time to build container

vocal wolf
#

I'm waiting for the check to pass

#

then I'll merge

gritty wind
vocal wolf
#

I want that sweet green merge button

gritty wind
#

What checks aren't passing?

vocal wolf
#

they're running

gritty wind
#

Oh merge

vocal wolf
#

not not passing

gritty wind
#

I thought you were merging directly, hadn't realized you added another commit

vocal wolf
#

ah

#

alright

#

merged

#

please don't explode lol

obsidian patio
# gritty wind The site

The site is up and running. I believe it's also required for things like infractions, but these work

gritty wind
#

Yeah the site has to be fully up in order to start at all, so this is a bit strange

obsidian patio
#

For sure

vocal wolf
#

@gritty wind if this works it may be worthy of #changelog

gritty wind
#

Yesh, do you have perms to put an entry?

vocal wolf
#

nope

obsidian patio
#

Definitely changelog worthy

vocal wolf
#

I think it's reserved for admin+

obsidian patio
#

Kind of. Kat sent announcements when she was a lead, but yeah, it's generally just admins+

cold moon
#

I have change Dockerfile and make this putting SHA at end of Dockerfile, because currently this breaks caching

vocal wolf
#

oh shit

gritty wind
#

If something is needed for CI, be sure to put it in ops

vocal wolf
#

connected

gritty wind
#

and we're live people

obsidian patio
#

Moment of truth

vocal wolf
#

hmmmmmmmm

#

please work

cold moon
#

Errors

gritty wind
#

ok

vocal wolf
#

oh no

gritty wind
#

it has no cooldown

vocal wolf
#

oh god oh fuck

gritty wind
#

it'll send an error for every message in the server haha

cold moon
#

This is spamming

gritty wind
#

I'll mute the error

obsidian patio
gritty wind
#

and rollback

#

it runs on message

#

and tries to update the hook

#

and generate another error

#

every time

obsidian patio
#

Oh no

vocal wolf
#

see it worked on the test server because it tried to edit that message

#

and then failed

#

I think if we just try/except notfound and forbidden we should be fine

#

why did it break here, and not back there?

obsidian patio
#

Huh, I didn't get a single error

gritty wind
#

Well I'm guessing it's due to the original message

#

let's just add a check

surreal venture
obsidian patio
#

It automatically sends a new webhook when none exists on the test server

gritty wind
#

I think it's reading the original message as the hook

obsidian patio
#

That's very strange

vocal wolf
#

So in this case, doing except (discord.NotFound, discord.Forbidden) should fix it

subtle kraken
#

I don't think simply catching error is proper way to fix such thing

#

we should instead ensure ahead of time that the message is edit-able by the bot

#

rather than sent an API call that we know will fail

surreal venture
#

Is @dusky shore Allowed to run in #bot-commands?

gritty wind
#

Should be yeah

surreal venture
gritty wind
#

It doesn't really matter what goes in #bot-commands

#

and the sir-lancebot channel may see changes in the future

#

but for now anything can go in either channel

surreal venture
#

Hmmm okay

#

Also, do I need to run all the docker commands with sudo?

cold moon
#

No, I don't think so.

vocal wolf
subtle kraken
#

¯_(ツ)_/¯

vocal wolf
#

no error message in my console

subtle kraken
#

code says otherwise

vocal wolf
subtle kraken
#

last message id can be id of message that has since been deleted
in test server you open up bot
delete message
then try to fetch it
bot throws not found as last message id was deleted thus is not found
meanwhile
on prod last message is webhook id
So bot finds it and tries to edit it and since we dont even check what kind of message it is
It edits message it didn't send thus errors out

#

I propose checking if the message fetched is of the bot and only then editing it
And if its not simply sending new message

gritty wind
#

Can we add an author check

obsidian patio
#

That makes sense. And explains why the bug wasn’t present on the test server

subtle kraken
#

heres discord's persistence for you

vocal wolf
#

I'll restore the branch

subtle kraken
#

goood thing being that
At least we didn't edit out the webhook message
so theres that

gritty wind
#

So good thing @obsidian patio

#

my ping command is also broken lol

#

This will make testing much easier though

obsidian patio
#

Ah, okay

#

That’s both good and bad hahah

subtle kraken
#

also worth noting that theres another error that this code can throw

obsidian patio
#

What error are you referring to?

subtle kraken
#
    raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In message_id: Value "None" is not snowflake.```
#

if channel is new and never had any message

obsidian patio
#

That should be a pretty easy fix, I recon

subtle kraken
#

sure

#
                self.dynamic_message = await self.how_to_get_help.fetch_message(self.how_to_get_help.last_message_id)``` that line fwiw
vocal wolf
#

welp

obsidian patio
#

Probably not useful for internal testing or prod, but for users just starting the bot, it could be a real pain in the

subtle kraken
#

yes

vocal wolf
#

this was fucked

#

I'll fix things up soon

gritty wind
#

@obsidian patio it's a bug with the url being passed to the ping function

#

I'll look into it

#

but basically it passes pythondiscord.local:8000 (replace address with whatever) instead of pythondiscord.local

obsidian patio
#

Aah, I see

obsidian patio
green oriole
#

-400ms haha

obsidian patio
#

The bot is speeding up

subtle kraken
#

I mean isn't it good?
Our bot predicts your movements

obsidian patio
#

It’s fantastic

#

The thing is, I think Scaleios got that response before even sending the message. It’s incredible

gritty wind
#

Can not confirm or deny

short snow
#

should i open a pr for the cht.sh headers fix or someone will do it on master directly?

gritty wind
#

What headers need to be added?

short snow
#

curl

gritty wind
#

And since it isn't critical, we can probably PR it first to test it

short snow
#

it can be called critical, since the command won’t work until that

gritty wind
#

I still don't know what that is? Is curl a header? I know its a terminal utility

short snow
#

Lemme show one min

#

The headers

gritty wind
#

is that diff on the bot repo?

short snow
#

Yeah on sirlance

gritty wind
#

Can you link it please

green oriole
#

@short snow do we want to add those headers or delete them?

gritty wind
#

Add

#

I'm confused, when were they removed

#

are there multiple issues

green oriole
#

They aren't in master

gritty wind
#

They were in the PR at some point, and it was surely working when things got merged

short snow
#

Yes

#

one minute lemme show chris’ response

green oriole
#

Oh, okay

hardy gorge
#

Can I get a tl;dr?

#

Because I don't quite understand what's meant with "the repo reverted the change in the deployment"

gritty wind
#

Cheat sheet fetches from a remote website, Chris added a PR to that to return an API response from aiohttp headers

hardy gorge
#

Basically, a deployment of the bot doesn't change the repository in any way

gritty wind
#

So we didn't need to fake a user header

#

that was reverted in the cheat sheet website deploy

#

And when I say deploy, its the active deployed master branch of that site

hardy gorge
#

What I mean is, is the current code in the "master" branch of the repository as it should be?

gritty wind
#

Not anymore

#

.cht

green oriole
#

Right now, we need the headers in lancebot

gritty wind
#

sir lance, you there?

hardy gorge
#

Alright, that is not related to a deployment

green oriole
hardy gorge
#

But could be related to someone reverting the changes accidentally while resolving merge conflicts

green oriole
#

Well, the source website reverted the changes

gritty wind
hardy gorge
#

I think I'm a bit lost on what the situation exactly is

#

I thought we were talking about code that was committed to our repository, but has been reverted to some kind of prior state

#

But an external dependency has reverted what it reponds?

gritty wind
#

Well, change in one of our dependencies broke the feature, now we need to change our feature to work with the dependency

#

yeah pretty much

#

It now returns an HTML response instead of a well formatted text one

short snow
#

Hence, to be on the safe side, i am asking if it is okay to use curl as user agents

gritty wind
#

If we need to fix it immediately, I'm okay with it, it doesn't matter too much

#

But if chtsht can fix the PR, I'd much prefer we do it that way

short snow
short snow
#

even know ot

gritty wind
#

They don't acknowledge accept types, how rude of them 😛

#

Do you know if they will reimplement your PR @vale ibex

#

it found 1.7k usages

obsidian patio
#

Welp

gritty wind
#

This is going to be a painful migration, I wonder if we should just fix things as they break

obsidian patio
#

What did you search for?

gritty wind
#

It's a regex of a bunch of member intent keywords

#

Features that need to be reworked/fixed to handle the lack of member intents

#

on_member_join|on_member_remove|on_member_update|on_user_update|get_all_members|chunk|fetch_members|get_member|members|roles|nick|premium_since|avatar|discriminator
This is the search lol

obsidian patio
#

Aah

#

Why are you searching for that?

vale ibex
#

unrelated to my change

#

So I assume it will hit prod at some point

gritty wind
#

Alright, thanks for the update. In the mean time, I think it'd be alright for us to use other headers

gritty wind
#

Certain things do break because we don't have member intents on

obsidian patio
#

Ah. Did we ever have intents on Lancebot?

gritty wind
#

Yes, before you could turn them off

#

I.E, before intents were a thing

obsidian patio
#

I meant after that. But yeah, makes sense

short snow
#

Make sure to checl inclide only project files

#

To reduce swarch redults

gritty wind
#

yeah

vale ibex
#

i was looking around lancebot and noticed a few of the commands could be change to handle being invoked from a DM better (some error, so behave weirdly). Should I raise an issue per cog I think has an issue, or one issue for the topic in general

vale ibex
gritty wind
#

!remind 12H review 808077631463489546

stable mountainBOT
#
Of course!

Your reminder will arrive in 12 hours!

short snow
#

@gritty wind PRed the fix for cht.sh

short snow
#

found a bug @gritty wind sorry for the ping

#

(thanks to vester and vivax)

#

from dpy server:

The problem with unicode is that some emojis are in fact made up of more than 1

#

using emoji library is better

#

since the regex would pollute the file

#

and easier to understand too

#

re-requested review from ou scaleios since i have made changes

surreal venture
#

I'm not able to start sir-lancebot...

#

socket.gaierror: [Errno -2] Name or service not known

surreal venture
#

No just simple pipenv run start

#

I did do the .env file

#
BOT_TOKEN=1234
BOT_GUILD=1234
BOT_ADMIN_ROLE_ID=1234
ROLE_HELPERS=1234
CHANNEL_ANNOUNCEMENTS=1234
CHANNEL_DEVLOG=1234
CHANNEL_COMMUNITY_BOT_COMMANDS=1234
BOT_DEBUG=True
#

And my redis-server is running

sullen phoenix
#

you can just add USE_FAKEREDIS=true

#

so you won’t need redis

surreal venture
#

Why isn't it running with redis though?

sullen phoenix
#

you need to set the host and port for redis

#

and password, if needed

#

REDIS_HOST, REDIS_PORT, REDIS_PASSWORD

#

i assume you’re not running in a kubernetes cluster, so you can’t use the defaults haha

surreal venture
#

Ah I'll just use FAKE_REDIS

sullen phoenix
#

haha yeah, makes development a bit easier

surreal venture
#

and the BOT_TOKEN is supposed to be the bot ID or the client secret?
Because it's saying discord.errors.LoginFailure: Improper token has been passed. even though I pasted the client secret

sullen phoenix
#

there should be a bot token in the discord developer portal

surreal venture
#

there's no bot token

#

there's CLIENT ID, CLIENT SECRET and PUBLIC KEY

sullen phoenix
#

did you click on the bot section?

surreal venture
#

No in the general information

#

ah I see

#

thanks!

short snow
#

@gritty bolt Have you mentioend the requested changes? I like to see the command as soon as possibl

gritty bolt
#

Hi sorry, got caught up with things in real life, I am going to re plan my deadlines with the cog. I will let you know

short snow
#

sure! No problem.

gritty wind
#

Do you know which emojis are affected?

short snow
#

🗣️ 🧑‍🦲 are few of them

#

i haven't tested for others

#

(currently on the pr i have pushed using the emojis lib version)

gritty wind
#

I really don't like the idea of adding a 3rd party dependency

#

for something that isn't critical, for a single feature

short snow
#

we could implement the thrid party library on our own as a util function

short snow
subtle kraken
#

I don't think that putting the maintenance burden on us is a good way

short snow
#

🤷 , either use the

  1. longgg regex
  2. emojis lib
  3. implement the lib as a util function
  4. let those errors stay as they are rare cases
  5. or rmove custom otkens
gritty wind
#

Eh people typically think of X and O for tictactoe, I don't know it'll see much use there either

#

But more importantly

#

Even if we wanted to support emojis for all the games, we don't have to support everything

#

I'm fine with only supporting enough things for the games to feel customizable to some extent

short snow
#

alright so should i revert the commit?

#

also how to revert a commit

gritty wind
#

git revert COMMIT_SHA

#

will reset back to the state at COMMIT_SHA

short snow
#

wait, idk if this works or but we could change it >2 instead of >1, since every non-server emoji is gonna have more than len 2 as :: is of len 2

gritty wind
#

Don't revert it yet though

short snow
#

ok

#

will the SHA be of the commit i did (last) or the one i want it to have (2nd last)

gritty wind
#

The one you want to have

short snow
#

ok

#

lemme me know when decided

gritty wind
#

I'll just check back on the vote in a bit

short snow
#

ok, no votes till now except yours scaleios

green oriole
#

Don’t we already use an emoji library

#

Doesn’t seem like we do

#

Either way, I think this is a better solution

short snow
#

the problem is i can't cast a vote rn 😦

#

anyway mine is using emoji library

#

can we merge sir-lancebot#580

dusky shoreBOT
hardy gorge
#

Is there a good description of the problem the vote is for somewhere?

short snow
#

it is just a fix for headers we discussed yesterday

gritty wind
#

Tl;dr

hardy gorge
#

If you want people to vote, you need to make sure that you've got a small write-up of the problem nearby so people can easily know what it's about

gritty wind
#

We want to take emojis as command input but

hardy gorge
#

A tl;dr

short snow
#

and sir-lancebot#560

dusky shoreBOT
gritty wind
#

some aren't easily processable except with a very long regex or an outside library

#

most emojis work already though

green oriole
short snow
#

yeah, vivax and vester found the bugs

#

🗣️ 🧑‍🦲 as of now

green oriole
#

I don’t see any issue with using a library tbh

#

We would have to maintain the regex ourselves, and I really don’t want to

gritty wind
#

I'm in favor of ignoring those emojis, because so far there only seem to be a few that don't work

short snow
#

i would choose either option 2 or 4

#

and using dice on polls is nice lol

gritty wind
#

We have a vote command, but that's restricted to mods+ for some reason

short snow
#

can u make a poll here?

#

also should we do a samething on ttt, on allowing users to choose their tokens

gritty wind
#

Yours is fine for now, as people have already case their votes

#

If you'd like to cast yours, I can have the bot react to the message

#

I'll just do that

short snow
#

and even the upgrade channel_override one (pending one review)

green oriole
#

@short snow if you can add a code comment explaining why we use those headers, I’d happily merge it 😄

short snow
#

in the code or in the pr?

green oriole
#

Im the code

#

*in, I am not the code

short snow
#

lol, also isn't it self-explanatory?

green oriole
#

The code is pretty explicit about what it does, but not why it does it

short snow
green oriole
#

Except for the typo, it looks good

short snow
#

yeah

gritty wind
#

Might be a tad long, but its fine

short snow
#

html*

#

done. @green oriole

green oriole
#

Oh, we are one review short look at @gritty wind

gritty wind
#

nah i lost my review keys

short snow
#

done

green oriole
#

Thanks

#

review keys?

short snow
#

now a review needed for upgrade override so cht.sh can work like a charm

green oriole
#

Which one?

short snow
#

sir-lancebot#578

green oriole
#

Laaaaaaaancebot?

#

.issue 578

dusky shoreBOT
gritty wind
#

add a comma

#

. sir-lancebot#578

dusky shoreBOT
short snow
#

sir-lancebot#578

dusky shoreBOT
short snow
#

nah

#

the bot was down

#

ig

gritty wind
#

right, redeploy

green oriole
#

Ah

gritty wind
#

Hmm no is it

#

idk

short snow
#

it is

short snow
gritty wind
#

but why did it come back online

#

it isn't ready yet 👀

short snow
gritty wind
short snow
#

hmm yeah

green oriole
#

Is it not showing the online thingy

short snow
#

it works

#

any errors?

gritty wind
#

yesh

short snow
#

and what is it?

green oriole
#

Haha

gritty wind
#

broken permissions after the migration

green oriole
#

The bot doesn’t have permissions to post in #dev-log

short snow
#

wait how?

#

it did have few days ago

green oriole
#

Somebody nuked the permission 4 or 5 days ago, I think

short snow
#

well atleast you have fixed it now lemon_sweat

gritty wind
#

mmm did I though

#

only one way to know

short snow
#

merge another pr

green oriole
#

murder him!

short snow
#

him?

green oriole
#

Sir Lancebot

#

I’m assuming it is a he

gritty wind
#

I think only dev-ops has the power for such a hideous crime

#

we'll just wait for another merge

short snow
#

ye, yours

#

but one review is needed

green oriole
#

Hmm

short snow
#

or c4, the only 2 near

green oriole
#

I wonder if we can reload the extension

short snow
#

restart the bot?

green oriole
#

Too bad we don’t have any int e

green oriole
gritty wind
#

It isn't an extension

#

so it would require a full reload

#

i mean I can always rerun actions

#

I think

short snow
#

that's what i told, restart the bot

#

or rerun action

green oriole
#

Ah yes, we can re-run it

gritty wind
#

but we'd need to get devops here lemon_sentimental

green oriole
#

And we will have to do this, since apparently one extension cannot properly reload haha

obsidian patio
#

You could always ping devops, if there’s something you’re referring to

short snow
#

just review and merge another pr 😄

green oriole
#

So re-requested the workflow

short snow
#

lets see

#

hmmm

#

is the bot slow or something happened again?

gritty wind
#

no errors yet

#

I think it's just deploying

short snow
#

idts

#

it shldn't take so long

gritty wind
#

it is down atm

short snow
#

am playing ttt rn

gritty wind
#

alright that's another bug that kept it from replying

#

but no error on message send yet

short snow
#

hmmm, any guesses?

gritty wind
#

yeah its a common bug with ttt

#

still investigating though

short snow
#

i can work on the int e for lance, commenting

green oriole
#

We will use @hardy gorge’s version from Black Knight instead

gritty wind
#

can we mark that issue as stalled

green oriole
#

So no worries, it will be coming at some point

#

Hmm..

#

Maybe we should just assign sebastiaan

#

Since it isn’t really stalled

short snow
#

i will delete my comment

green oriole
#

You can keep it, that’s okay

#

You couldn’t know

#

Just blame it on @subtle kraken

short snow
#

ok lol

stable mountainBOT
#

@gritty wind

It has arrived!

Here's your reminder: review 808077631463489546.
[Jump back to when you created the reminder](#dev-contrib message)

gritty wind
#

@green oriole you may find this relevant too

#

context: adding docker to sir-lance docs

green oriole
#

Hmm

#

What is this number

gritty wind
#

msg id, but uh one sec

green oriole
#

Haha I see

gritty wind
#

Alright, dropped a comment on that for later

vale ibex
green oriole
#

Lgtm

gritty wind
#

+1

vale ibex
#

This shouldn't be merged until sir-lancebot#554 is, since the current .env setup is different for docker

dusky shoreBOT
gritty wind
#

Hmm I don't think there was anyone still against this

#

let me just uhh

#

Alright I'll merge that

vale ibex
#

🎉

gritty wind
#

would you like to go ahead and add it to the site?

vale ibex
#

Didn't realise I had access, i'll do that now 🙂

gritty wind
#

Give me a shout if it gives you any trouble

short snow
gritty wind
#

No let's go with emojis

short snow
#

alright

#

there is a review requested from you (as changes were made) and ak as code owner

vale ibex
green oriole
#

Sweet, thanks!

short snow
#

sir-lancebot# and sir-lancebot#575 are looking for reviewers, would appreciate if they are done within coming 2-3 days lemon_pleased

dusky shoreBOT
short snow
#

sir-lancebot#560

dusky shoreBOT
subtle kraken
green oriole
#

check notes

#

Ah yes, you opened an issue about migrating @stable mountain int e to @dusky shore, but we should use Black Knight eval

subtle kraken
#

does it even exist

#

last time I heard of it was, it wasn't even pushed anywhere

#

thus why I didnt mention anything

#

if its pushed to @stable mountain then my statement stays true as it will be @stable mountain's eval not Black Knights

green oriole
#

Sebastiaan almost completed it

whole forge
#

@tawdry vapor @glass pecan (pinging you because git blame told me it was you)
currently in the process of setting up the bot using the docker-compose.

why are the web, snekbox and redis containers mapping ports to localhost? shouldn't those be on a network with the bot, instead of going through the hosts localhost?

green oriole
#

If you set the bot through docker, it should use the virtual network with the special hostnames

green oriole
#

That said, if for any reason you want to run the bot on the host, you can still use Docker for dependencies because we map the ports

gritty wind
#

Opening them up to localhost does make it much easier to run locally

#

yeah what he said

green oriole
#

Fwiw they will still be on the virtual network, even we map them the ports

whole forge
#

mapping ports to localhost on the host without any need for it is really bad practice

green oriole
#

Well, there is a need for it, in some cases

gritty wind
#

Is it really enough a big deal on the development versions

green oriole
#

In the end it is just a dev setup

#

Ah, scal is faster

whole forge
#

personally i think it is

gritty wind
#

How do you propose we open it for locally run bots and docker?

whole forge
#

since the docker compose that comes with the repo assumes the bot will be run in docker too, theres no need for doing so.

gritty wind
#

We do accommodate for running on localhost, not everyone wants to run everything docker

#

I run the bot through my debugger, but at the same time, I don't want to install 4 DBs on my local system

whole forge
#

right, so for running the bot on the host i would have to remove the entire bot service from the docker compose, or alternatively only docker-compose up specific services. at that point, wouldn't it be easier to have a seperate docker-compose for the case of people wanting to run locally?

green oriole
#

You can only use up on the services you want, it is pretty standard

whole forge
clever wraith
#

where are the tags stored?

gritty wind
clever wraith
#

for @stable mountain

green oriole
late wolf
green oriole
#

I dunno if you will end up at the right place, I typed the url by heart lul

#

Hey, it worked

clever wraith
#

kek

#

also, to make a tag do i just make a new .md file?

green oriole
#

Yup

clever wraith
#

ok

green oriole
#

Although you should first comment on your dicussion to avoid working for nothing

brazen charm
#

I run the bot locally while everything else is behind docker, apart from starting up the redis container individually for the first time, it had no impact on how I interact with docker through docker desktop. Having a second compose just for not exposing it seems like it'd just be a waste and potentially cause confusion for users

surreal venture
#

How will you use in_channel or in_channel_check? And which one should I use?

whole forge
#

lets agree to disagree, now i just have to be careful not to commit my modified compose

gritty wind
#

I honestly still don't see what's wrong about running docker on localhost for dev environments, unless you have some external constraint

mossy wolf
gritty wind
#

hey @patent pivot will enjoy this one ^

surreal venture
#

I mean I have done it by using an if, but how would I use the decorator?

short snow
#

it is limited to it by default

gritty wind
#

That should mostly be done by default

mossy wolf
brazen charm
whole forge
gritty wind
#

It's a fair one

#

can you override ports in the container startup/build command?

short snow
gritty wind
#

Or rather not ports, but full addresses

whole forge
gritty wind
#

yesh

surreal venture
whole forge
# gritty wind yesh

i guess you could make a seperate docker-compose that overrides the port mappings and inherit from the main one

whole forge
green oriole
#

Sorry I ran out of battery, I'll have a look

clever wraith
#

ok

clever wraith
#

@green oriole sorry for pinging, but how is it?

green oriole
#

Well, I think this would be better suited as an article than a tag

#

(also don’t worry about pings, I don’t mind)

clever wraith
#

ok

green oriole
#

Yes, like a medium article. We plan to write some and host them our website.

clever wraith
#

could we also make a tag?

vale ibex
#

That could be a good idea, we try to keep our tags short, and link to further reading if needed. Take for example:

#

!env

stable mountainBOT
#

Python Environments

The main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, such as third party packages installed using pip, regardless of what dependencies every other project has.

To see the current environment in use by Python, you can run:

>>> import sys
>>> print(sys.executable)
/usr/bin/python3

To see the environment in use by pip, you can do pip debug (pip3 debug for Linux/macOS). The 3rd line of the output will contain the path in use e.g. sys.executable: /usr/bin/python3.

If Python's sys.executable doesn't match pip's, then they are currently using different environments! This may cause Python to raise a ModuleNotFoundError when you try to use a package you just installed with pip, as it was installed to a different environment.

Why use a virtual environment?

• Resolve dependency issues by allowing the use of different versions of a package for different projects. For example, you could use Package A v2.7 for Project X and Package A v1.3 for Project Y.
• Make your project self-contained and reproducible by capturing all package dependencies in a requirements file. Try running pip freeze to see what you currently have installed!
• Keep your global site-packages/ directory tidy by removing the need to install packages system-wide which you might only need for one project.

Further reading:

Python Virtual Environments: A Primer
pyenv: Simple Python Version Management

green oriole
#

I don’t think it is a good idea, you can’t have a small tag describing the concept

gritty wind
#

That is not a short tag haha

vale ibex
#

This is probably longer than what would be acceptable

green oriole
#

This tag is way too big

vale ibex
#

I chose this because I wrote it and don't like how long it is 😂

clever wraith
#

lol

gritty wind
#

It would be hard to explain concurrency, even in a tag as long as that one

vale ibex
#

Do stuff at the same time*.

  • not always at the same time
clever wraith
vocal wolf
#

@trim cradle oh god I thought you wanted a request from Akarys, that would've been some terrible timing

trim cradle
clever wraith
#

@green oriole would a tag on blocking/non-blocking be a good idea?

short snow
#

@slow steppe as per my knowledge, all channels names are small case, so non-case sensitive won't matter

#

since all results are going to be small cased

slow steppe
#

I mean why don't we just convert all the channel names to lowercase(in the db or whatever) and the search query to lowercase(in the command itself)?

#

Also yeah ik my explanation of that was shit, but I'm tired and I think you know what I mean

short snow
#

yeah, ig what you mean.

gritty wind
#

The first part we already do, all otns are stored in lowercase

#

You don't have to explain it in full detail, but copying that one sentence description to the github issue will make getting it approved easier

short snow
slow steppe
#

It might not be a great description atm, as I'm about to pass out, but once I wake up tmrw I'll make it more clear

gritty wind
#

No rush, and night night

slow steppe
#

Mmhm you too

gritty wind
#

Hmm alright I've had a look at the source code

#

And we don't actually force lower case letters

#

maybe I'm just misremembering, maybe it's just been the norm

cold island
#

We replace them with unicode

gritty wind
#

But not lowercase

cold island
#

not lowercase

#

just uppercase

#

and punctuation

gritty wind
#

Ok the conversion will be a bit more complicated then. If we want to, say, convert everything to lower case, we'd have to first convert the results to normal letters, I.E run the reverse translation

#

Should still be relatively easy

short snow
#

why is dependabot[bot] disabled for bot,site and sir-lance?

green oriole
#

Because it is sooooooo spammy

#

We trigger an update if there's a security issue

surreal venture
#

We can use aiohttp.ClientSession() in our code right? Or is there a different way we need to make requests?

gritty wind
#

I think we may store a session in the bot itself

#

But aiohttp is the way generally yeah

surreal venture
#

ok thanks!

gritty wind
#

Are you working on sir-lance or python?

surreal venture
#

lance

gritty wind
#

Alright, there isn't a session for that one then

#

You can start one up

#

Or nvm

#

it's python that doesn't have one

#

I'm confused lol

#

lance has bot.http_session

surreal venture
#

but could I also use a separate session?

gritty wind
#

I guess you can, but that would be up to the discretion of the reviewer

#

Does the existing session not work for some reason?

surreal venture
#

no I was just asking

#

I'll sue it

#

*use

exotic ember
#

Python should have one too

gritty wind
#

it definitely has one for the api

keen root
gritty wind
#

Hey this channel is meant for python discord projects

#

Is there something you'd like to discuss about those?

keen root
#

Yah Sure

#

from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(rad), sin(rad), 0) rad = rad + 0.0

#

This is the code for a donut program

gritty wind
#

This channel is for python discord projects such as @stable mountain or @dusky shore

keen root
gritty wind
mossy wolf
#

Who was MarkKoz again? They disapproved my PR, i edited it and requested another review. Haven't gotten any response yet in 4 days

gritty wind
#

@tawdry vapor but they have a lot of work haha

mossy wolf
#

right makes sense

gritty wind
#

Which PR is that?

vocal wolf
#

Mark the powerhouse

mossy wolf
#

empty-json tag

#

just looked back at it. Did make a tiny grammatical change today but yeah

vocal wolf
#

Mark is responsible for 19% of all commits on @stable mountain

mossy wolf
#

idk how many commits are made but that definitely seems like a lot

vocal wolf
#

1112/5654

mossy wolf
#

the question now is. are they like tiny 1 change commits or...?

#

:p

vocal wolf
#

many core features were added by mark

mossy wolf
#

so mark is very dedicated to making @stable mountain better?

vocal wolf
#

afaik the entire org lol

mossy wolf
#

i did not even realise that. That's amazing lol

vocal wolf
#

@gritty wind I'll be fixing up the dynamic message soon, I just gotta re-think stuff and things

gritty wind
#

Right, take your time

vocal wolf
#

and also recover the ptsd that was the core dev spam lmfao

#

this time 2 approvals may not be enough

gritty wind
#

really need a better way to turn off some of the bots lol

green oriole
#

Hmhm what for?

vocal wolf
#

@mossy wolf you've been reviewed.

mossy wolf
#

oh just a tiny spelling mistake lol

#

thanks for pointing it out

green oriole
#

We have a P0 PR here, folks: sir-lancebot#582

green oriole
#

If you can review it asap, that’d be great, it should be quite easy to test

vocal wolf
#

did you test it?

#

I'll test it as well

brazen charm
#

Is hiding the ip of where the bot runs important?

clever wraith
#

sup guys

vocal wolf
#

oh jeez that was a fast review

gritty wind
#

it's not not important

green oriole
#

We would rather not have it public

brazen charm
#

I assume it's just some datacenter, not much you can do with that

green oriole
#

You can get the individual node ip using wa atm

patent pivot
#

it's not critical, but where there is a way to not have that I like that approach

brazen charm
#

I think I tried that a while ago, but didn't seem that important to report it

patent pivot
#

Having easy IP leaks like this kinda defeats the point of having Cloudflare

brazen charm
#

I'm not familiar with the possible vulnerabilities, but as everything uses tokens anyway, wouldn't the only thing that'd permit be some ddos (which most probably won't affect linode much)?

patent pivot
#

Yeah, DDoS is the primary one

#

It wouldn't affect Linode but it would affect us

#

Site isn't that efficient at handling that many requests

#

We've had a share of DoS attacks before, and they were dealt with fairly well by Cloudflare before they could cause too much havoc

brazen charm
#

I assumed they have something in place to block malicious traffic like that as it uses their resources

patent pivot
#

Most providers don't

mossy wolf
#

if i'm correct when you type in a website like https://python.org/ and it's protected by cloudflare, it first redirects to cloudflare before going to the actual site. If you have the direct IP and type that in, it will bypass cloudflare. If i understand correctly (correct me if i'm wrong)

patent pivot
#

They don't get enough information because they don't provide SSL termination (I don't think many VPS hosts do) so they can't introspect traffic for malicious stuff

#

There are some throttles in place on like conns/s, I know that much

patent pivot
#

so the origin site and you only ever speak through cloudflare

mossy wolf
#

the VPS host i personally use has their own built in DDoS protection, and from someone else i have seen it works quite well. Instead of crashing the service it just slows it down slightly

mossy wolf
patent pivot
#

yeah

mossy wolf
#

so even with a direct IP it's still relayed through cloudflare

patent pivot
#

yeah

mossy wolf
#

alright

patent pivot
#

our infra is a little bit more technical, but that's a rough overview

#

in actuality it goes client --> cloudflare --> load balancer --> pool of nodes

mossy wolf
#

and the pool of nodes is made by docker firing up more instances when needed?

patent pivot
#

no, the pool of nodes is a cluster of kubernetes nodes

#

we don't auto-scale, but we can scale in <1 minute manually

green oriole
#

Joe the autoscaler

patent pivot
mossy wolf
#

joe secretly is a robot that constantly watches the node demands lol

green oriole
#

Of course he is

#

He's program has a bug making him frequently post rickrolls though

patent pivot
#

lul

green oriole
#

I mean

patent pivot
#

now that's a legit thing

green oriole
#

It is so obvious

mossy wolf
#

lmao there must be some really crazy stuff going on in your staff channels from time to time from what i hear

patent pivot
#

and akarys it's WEBSCALE it runs on the cloudflare edge network

green oriole
#

Using cutting edge tech just to rickroll users

#

Pfff

patent pivot
#

yeah i keep rickrolling everyone and then people are like "hahahah i'll never click links from joe again!" but the crumbs always do.

#

i am the cake

vocal wolf
#

I always trust and don't trust joe with links

green oriole
#

I do not click any of your links anymore

patent pivot
#

that's a lie

mossy wolf
#

lmao that video is absolute gold

vocal wolf
#

@green oriole your PR unfortunately didn't work for me ;-;

green oriole
#

Oh no

mossy wolf
#

the music is 11/10

vocal wolf
#

A comment has been left

green oriole
#

Does it show your ip address if you ask for it? @vocal wolf

vocal wolf
#

yes

green oriole
patent pivot
#

my ip is 1

green oriole
#

Hmmm

#

Can you check that the query is actually correctly formatted?

hardy gorge
#

Not sure how Linode handles the load balancers and how you connect to them

#

Or cloudflare connects to them

vocal wolf
green oriole
green oriole
#

Not cloudflare, wolfram

vocal wolf
#

oh you didn't read my comment

#

I was running my own instance of the bot, with my own api key

#

I completely forgot we were running this through cloudflare

#

I uh

green oriole
#

No no, not cloudflare

#

Forget what I said

vocal wolf
#

just in general it should be blocked?

green oriole
#

I got my finger crossed

mossy wolf
#

this just sounds like a whole bunch of miscommunications if you ask me lol

green oriole
#

It shouldn't show any position or ip data

#

Well, at least on my branch

vocal wolf
#

It very much did show my IP for me

green oriole
#

Hmmm..

vocal wolf
patent pivot
green oriole
#

And can you add an ugly print in the code to see what url the bot actually request?

#

I saw the comment :3

vocal wolf
#

ye

#

@green oriole http://api.wolframalpha.com/v2/simple?i=what%27s+my+ip&appid=MY_TOKEN_HERE

green oriole
#

Huh

#

Are you sure that you checked out the PR?

vocal wolf
#

yes

#

Very, very sure

#

I'm staring at the changes in my console right as we speak

green oriole
#

Wait

vocal wolf
#

holding

green oriole
#

We are doing requests at two places in the file

vocal wolf
#

are we?

green oriole
#

Three, actually

patent pivot
#

is it for each of the subcommands

vocal wolf
#

oh I see it now

green oriole
patent pivot
#

thought so

green oriole
#

@vocal wolf updated

vocal wolf
#

alright

#

testing

#

@green oriole works

#

That's for "what's my IP"

green oriole
#

Cool

vocal wolf
#

And that's for "what's the weather"

#

apparently I'm in australia now

#

I think this is enough testing, ye?

green oriole
#

That was a fast travel

vocal wolf
#

lol

green oriole
#

Yeah, that looks good, thanks!

vocal wolf
#

any other queries you can think of?

#

I'm gonna do "where am I"

green oriole
#

Yep, that

#

And what's my ip

vocal wolf
#

already did what's my ip

#

here's where am i

#

alright we're good

green oriole
#

Sweet

vocal wolf
#

merged

#

@patent pivot we're good, everything is fine

patent pivot
#

dope

#

nice work

vocal wolf
#

I'm very very very very sure that my location isn't anywhere that anyone can see

green oriole
#

Is sir lancebot extremely long to deploy?

#

Cool, sir lancebot is now in vacation at Sydney

vocal wolf
#

Scal using words in PRs that I don't understand

#

I haven't heard of "granularity"

#

.wa short definition of granularity

dusky shoreBOT
#

the quality of being composed of relatively large particles

green oriole
#

Really?

vocal wolf
#

Yes

green oriole
patent pivot
#

multiple definitions

green oriole
#

Let me define granularity

#

It is when you have many way to define a thing, but with fine control between each definition

#

You are welcome

vocal wolf
#

Thank you

green oriole
#

This is a bad definition haha

vocal wolf
#

Good enough

mossy wolf
#

i did hear someone say the bots are run using docker containers, is this correct?

green oriole
#

Yep, all our projects are running in containers

short snow
#

can we get wolfram question thing too?

#

lemme get the url one min

green oriole
#

Mhm?

short snow
#
f'https://api.wolframalpha.com/v1/result?i={quote_plus(question)}&appid={wa_key}'

it is a bash aliases on my system

green oriole
#

Yeah, what about it?

short snow
#
>>> q("time in florida")
7:17:11 A.M. Eastern Standard Time, Tuesday, February 9, 2021

>>> q("what is python")
a nonvenomous constricting snake that kills its prey through suffocation; any of various large constricting snakes (as a boa)
#

etc.

#

we can add it to sir lance

green oriole
#

We do have a wolfram command

#

.help wa