#dev-contrib

1 messages · Page 64 of 1

eternal owl
#

i guess they have to be merged together

mellow hare
#

Ish

#

Good reminder though, I appreciate that

eternal owl
#

:p

green mesa
#

actually i am importing datetime bcz of this
async def date_and_month(self, ctx: commands.Context, date: int, month: Union[int, str]) -> None:

eternal owl
#

i did notice that, date will be shadowed with the argument date in that function

green mesa
#

zodiac_sign_based_on_month_and_date = self.zodiac_date_verifer(datetime(2020, month, date))

eternal owl
#

maybe u can rename date in the function signature and use datetime.date instead?

green mesa
#

calender is built in module?

#

yeh doing that only

eternal owl
#

date and datetime work same unless u provide the time

#

calender is built in module?
@green mesa yep

#

lemme know if you have trouble understanding any of the implementation I have presented in the review

green mesa
#

finally it worked

eternal owl
#

\o/

#

what happens to the PRs which are stale/author is not responding for a long time?

green oriole
#

Our policy is after 30 days we send a message on the PR and on discord if possible, and if they don’t respond after 30 days again, we close/take over the PR

eternal owl
#

ohk

green mesa
#

iceman pr ready for review 😄

eternal owl
#

oki

eternal owl
#

looks like u forgot to remove the unused variables

#

at the top of the file

green oriole
#

You should enable precommit

eternal owl
#

@green mesa please cross check if u have gone through all the requested changes, few of them are still left out

green mesa
#

but its not showing

#

¯_(ツ)_/¯

eternal owl
#

but still fix it xD

#

i don't think there is a word called verifer

green mesa
#

i have fixed 3 word

#

let me push again

eternal owl
#

go through the requested changes again, u missed some of them

green mesa
#

i don't think there is a word called verifer
thats my typo mistake lol

#

ok

eternal owl
#

nvm, u fixed it

green mesa
#

actaully this got messed up

            zodiacs = load(json_data)
            return zodiacs, zodiac_fact```
when i did this
```        with compatibility_file.open(encoding="utf8") as json_data:
            zodiacs = load(json_data)
            return zodiacs
            return zodiac_fact```
#

and this caused that error

eternal owl
#

one thing to remember, nothing get executed after a return statement

#

or i should say from the next line onwords

green mesa
#

hmmm

eternal owl
#

so after the 1st return, 2nd wont work

green mesa
eternal owl
#

oh she meant to have it outside the with block

green mesa
#

ok

eternal owl
#

kinda confused with that too

#

here u can use zodiac_fact.values()

#

so it will be for zodiac_data in zodiac_fact.values()

green mesa
#

ok

#

check the month name heheheh

green oriole
#

Februhrary

eternal owl
#

sure 😂

#

the first 3 letters much match, thats what I went for

green mesa
#

now its op lol

eternal owl
#

i guess it doesn't hurt having it that way, what say ??

green mesa
#

people can give weired name now

eternal owl
#

H should not be capital

green mesa
#

oo lol

eternal owl
#

a colon would be good at the end of the sentence

green mesa
#

ok

cold moon
green oriole
#

You should use your IDE to solve it

#

I can’t see it online sadly

#

But you should make sure to bring in both features, and test your merge before commiting

cold moon
#

I don't know how to solve conflicts in CLI with merge. I have this only done with rebase, but because this already got review, I'm not allowed to force push. How to solve conflicts with CLI merge?

eternal owl
#

when u pull , the CLI will let u know that there are conflicts which will be then displayed in ur code

cold moon
#

I mean this say Automatic merge failed; fix conflicts and then commit the result. and problem is cogs -> exts

#

I have a lot of PRs that have conflicts because this cogs structure update

obsidian oxide
#

I made the change @green oriole but it says piplock is still conflicting I think because the hash is different, is this normal ?

green oriole
#

You should revert the change, hold on a second, I'll give you the git command to run

#

git reset master --hard -- Pipfile Pipfile.lock I believe

obsidian oxide
#

Thanks

#

Pipfile is fine now though should I still add it in?

green oriole
#

Yeah, you removed flake8

obsidian oxide
#

I was told to remove it

green oriole
#

Not from the dev packages lemon_pleased

obsidian oxide
#

This is so confusing 😪

#

Well I ran the command

#

failed to resolve master as a valid tree

green oriole
#

Uh, interesting

#

Can you do a git branch?

obsidian oxide
#

Yes

green oriole
#

And give me the output

obsidian oxide
#

Ohhh sorry

#

I ran the command in a different terminal my bad

green oriole
#

Well, it is just to see which branches do you have, no worries

obsidian oxide
#

I mean the git reset

#

minesweeper-contribution is the branch

#

Ran this now it says '''cannot do hard reset with paths'''> git reset master --hard -- Pipfile Pipfile.lock I believe
@green oriole

green oriole
#

Uh, can you try without --hard then?

obsidian oxide
#

I think this works

#

It modified both

#

Thanks

green oriole
#

Good!

cold moon
#

I don't like git merge anymore. Resolving conflicts with it is impossible.

#

Rebase is a lot better for conflicts solving

obsidian patio
#

@green oriole When were you planing on taking a look at the permissions?

#

@cold moon Agreed for sure. The problem is just the git history being modified, if you don't keep it local

green oriole
#

It was supposed to be, like, now, but I got stuck with something else, I'll do it tomorrow for sure

obsidian patio
#

Hahah alright. No stress

green oriole
#

Rebase isn't a replacement for merge

#

Like, just, no

tawdry vapor
#

Resolving conflicts with a merge is exactly the same process as with a rebase. You're just as likely to get conflicts with a merge as with a rebase.

obsidian patio
#

Well, git merge --rebase

#

I think that's a really nice command

green oriole
#

It still isn't a replacement for a normal merge

#

It is just a tool to allow you to move work from a branch to another easily

#

Like, have you ever tried to rebase the same branch twice?

#

That's simply impossible

#

Because rebasing changes the freakin' hash

obsidian patio
#

Are you talking about git rebase or git merge --rebase?

cold moon
#

Some projects like PrestaShop force using rebase + force push for branch updating

tawdry vapor
#

git merge --rebase isn't an option as far as I can see

obsidian patio
#

Why not?

tawdry vapor
#

I mean, according to the documentation, --rebase does not exist for git merge

obsidian patio
#

👀

green oriole
#

Yeah, I don't see it in the documentation

obsidian patio
#

I use it a bit when working locally on something and need to pull the updates from remote before my own commits

#

Haven't you tried it?

cold moon
#

Sublime Merge don't have interface to solve Merge conflicts, but very good interface for solving rebase conflicts

green oriole
#

That isn't a reason though

obsidian patio
#

But really, haven't you tried git merge --rebase?

brazen charm
#

There are other tools if sublime is insufficient, or the CLI

tawdry vapor
#

conflicts are conflicts, there's no special difference between a merge conflict and a rebase conflict

brazen charm
#

The process should be almost the same though

tawdry vapor
#

git merge --rebase seems like a deprecated thing. I don't see what it could possibly do differently than git rebase.

obsidian patio
#

Hmm, odd

#

(I stole your icon temporarily)

#

It works smoothly

short snow
#

even i took it lemon_fingerguns_shades (but doesn't look nice on me), i need to earn a role by hardworking

cold moon
#

I try GitKraken

obsidian patio
#

When I do git merge --rebase, it adds the remote commits before the local ones, on the same branch

#

@short snow Let's not make this a think lemon_eyes

#

Welp, you copied f1re as well hahah

short snow
#

what do you mean?

obsidian patio
#

Adding \♦️ to the name

short snow
#

lol 🙂 \♦️

cold moon
#

lemon_exploding_head 118 conflicts... GitKraken...

#

Shit. With merging I lost some changes!

#

Why git can't solve conflicts itself

brazen charm
#

It does, but it can't know which changes you want when they affect the same parts

cold moon
#

I can solve these changes lost only with rebase

#

I really think starting again with multiple PRs. Creating same commits again. Just a lot easier...

green mesa
#

@eternal owl new changes pushed

#

now u can check

eternal owl
#

okay

green mesa
#

vsc handles conflict very easily

#

it gives u option to choose incoming change or ignore it

cold moon
#

Force pushes is not allowed, merging is useless for such conflicts (GitHub should be enough smart to solve file moving conflicts), so only way is to do everything again. lemon_enraged logo_git

tawdry vapor
#

It's not the only way. Not sure what you mean by a merge being useless. Again, if you rebased, you'd get the exact same conflicts.

green mesa
#

which editor u use ks123?

tawdry vapor
#

A merge shouldn't be giving this much trouble. You may be doing something wrong, but I don't know what.

cold moon
#

When I merged, I lost changes what I made to Tags cog.

tawdry vapor
#

Was there a conflict?

#

In that file I mean

cold moon
#

Yes

clever wraith
#

git reflog

tawdry vapor
#

If you lost changes, then it's because you didn't select to keep those changes.

cold moon
#

I resolved this locally with rebase, but I can't push it.

tawdry vapor
#

When there's a conflict, you can either keep the old changes, keep the new changes, or manually merge them to keep both/a mix

eternal owl
#

u forgot the else clause here or maybe removed by accident?
I will review it again tomorrow

#

@green mesa

tawdry vapor
#

@cold moon I tried the merge myself. There weren't even any conflicts really.

#

All that needed to be done was to move the test file into the new folder manually, and then replace bot.cogs with bot.exts

#

i.e. this was the only conflict ```
CONFLICT (directory rename split): Unclear where to place tests/bot/cogs/test_tags.py because directory tests/bot/cogs was renamed to multiple other directories, with no destination getting a majority of the files.

#

I don't know what gave you so much trouble

sharp timber
#

I discovered today that the discord.Message converter doesn't seem to handle <> and [] link escape codes, and since seasonalbot uses it that means that .bm <link> to suppress embeds fails out with a fairly unclear error message. I'm thinking of sending in a PR? or should I open an issue first?

(This example's actually not the best, but the <> are reproduced inside the embed, and thus are hidden)

dusky shoreBOT
green oriole
#

You can just PR it

sharp timber
#

👍

green mesa
#

@eternal owl i removed else knowingly because I am using try except below

#

So i don't need else there

eternal owl
#

Right

green mesa
#

.issue796 bot

#

.issue 796 bot

green mesa
#

I wnt to work on this

eternal owl
#

u are already assigned

green mesa
#

But its not approved yet

#

Xithrius asked me to wait till it get approved

eternal owl
#

kay

green mesa
#

Can someone approve this if he/she like the idea of having this command😁

eternal owl
#

use .values()

#

so -> for zodiac_data in zodiac_fact.values():

neon garnet
#

@green mesa There's still a few things being brushed up with the issue afaik

#

I can approve it myself but I wouldn't want to get ahead of the original posters in the thread

eternal owl
#

@green mesa just a few more changes buddy

green mesa
#

I am happy that I get your valuable feedback everytime

#

It really helps me to code better

eternal owl
#

why did you add a check if the user has used backticks? just curious

green mesa
#

Actually I added this cuz if user just check for ` it messes up the embed

#

U can try just remove the check in zodiac command and search for `

#

The embed will look weired

#

That's y I added check so embed don't get messed

#

On pc only, embed get messed this is weired😅

eternal owl
#

I doubt if anyone will do .zodiac libra

green mesa
#

But people try to break command

#

That's y I added check in advance

#

So it don't break

neon garnet
#

You're passing the original text that the user sends to the embed?

green mesa
#

Yeh

#

@eternal owl I am importing datetime becuase of this

#

If I import date directly it will mess the code

#

As I am taking date in param

neon garnet
#

I'm pretty sure that @dusky shore has a fuzzy matching library included in there, maybe what you could do is perform cleanup instead of sending an error message

green mesa
#

Hmmm yeh seasonal bot has fuzzywuzzy module included in package

eternal owl
#

@eternal owl I am importing datetime becuase of this
@green mesa use date, rename the argument to date_

#

or query_date

#

i think date_ should do

green mesa
#

Hmm nice idea

eternal owl
#

opps, i meant end-atyear

#

the end_at year should be 2021

green mesa
#

One more question I am hardcoding 2020 when user enters date

#

Then I don't think he ever able to search in 2021😅 jan

eternal owl
#

doesn't matter cuz we anyway hardcoded the check for capricorn

green mesa
#

So I need to change it or I can leave?

eternal owl
#

change it, cuz it doesn't make sense to start in 2020 december and end in 2020 jan

green mesa
#

Ok

#

I think, today might my pr will be ready 😁 for the magic button

eternal owl
#

we need another reviwer 👀

#

as my reviews don't count for the magic button

#

also, i feel that there are wayy too many logging statements, we could cut a few of them

green mesa
#

Ok

#

I have requested review from pure also

eternal owl
#

we still 1 more, lol

#

pure and 1 more

green mesa
#

😔

eternal owl
#

we are not returning none

#

instead, u can say invalid date or month given

green mesa
#

Ok

eternal owl
wintry heath
#

@eternal owl can i get soem help smh

green mesa
#

@wintry heath what u need help with if it's realted to contribution for @dusky shore or @stable mountain u can ask here

wintry heath
#

its for python

#

it will be ig

#

how can i

#

make the output print in

#

console log

green mesa
#

I recommend to claim one help channel

#

For that

patent pivot
#

Reset your credentials @wintry heath

#

also yeah, help channel

wintry heath
patent pivot
#

You need to reset your credentials.

wintry heath
#

dn

#

i did reset them

#

how can i

#

get the output in

#

console log

green mesa
#

This channels is related to dev contribution buddy

#

Wow what a epic video absolutely mind-blowing , marvelous

cold moon
green mesa
#

will i put this regex n r"[`*$^/'\\+%?:;&@!|=().,#]" in constant.py so others can also use to remove ` or special character from input by user?

green oriole
#

What on earth is that

cold moon
#

I don't know why

    @patch("bot.exts.info.tags.Tags.check_accessibility")
    async def test_tag_permission_check(self, check_accessibility_mock):
        """Should call check_accessibility for every tag that _get_tag returns."""
        self.assertIsNone(await self.cog.get_command.callback(self.cog, self.ctx, tag_name="clas"))
        calls = []
        for tag in self.cog._get_tag("clas"):
            calls.append(call(self.ctx.author, tag))
            calls.append(call().__bool__())
        check_accessibility_mock.assert_has_calls(calls)

don't cover this part.

green mesa
#
import re
striing = "\\\hello\\\*$^/'+%?:;&@!|=().$"
match = re.sub(r"[`*$^/'\\+%?:;&@!|=().,#]", "",striing)
print(match)
green oriole
#

I'm sure that you can use a special character for that

green mesa
#

i am removing ` or any special character from input given by user

#

so embed dont break

#

let me show u ss whats happening

green oriole
#

Constructing the regex dynamically using string.punctuation?

green mesa
#

this happens on windows if i give ` as input

#

but on mobile it looks fine

cold moon
#

I think putting is not a valid... as header will fix this problem

green mesa
#

actually i wnt to remove ` if user use

green oriole
#

It looks like doing a simple .replace('', '')` when creating the error message should be enough

cold moon
#

I think these error message embed colors should be red

brazen charm
#

Or just don't send the user input back in the embed and you don't have to worry about anything

green oriole
#

Also that

short snow
#

or just put a slash \ before the `

cold moon
#

But still, I think this should look better when is not a valid... string is in header.

green mesa
#

i tried replace but that didnt helped

#

i have added ** to highlight the user input this seems to fix the problem

green oriole
#

Not sure if it does fix backticks

green mesa
#

yeh it fixed

#

@cold moon

#

u can use vsc to handle merge conflict

#

it gives option like this which is very handy if u tackling merge conflict

#

@eternal owl new change pushed

cold moon
#

Ok thanks

green mesa
#

😄

eternal owl
#

small changes required and then we are good to go @green mesa

green mesa
#

how much time docker take to install?

#

ok icy

green mesa
#

what i need to do start?

green oriole
#

Well, yes

green mesa
#

ok

green mesa
#

BOT_API_KEY=badbot13m0n8f570f942013fc818f234916ca531
this is default API key?

obsidian patio
#

I believe so

green mesa
#

ok ty vester

green oriole
#

Yes it is

late wolf
#

wdym by bot api?

neon garnet
#

@late wolf The bot communicates with our site's API

late wolf
#

ohhh, I didnt know that

#

how does it interact

#

in what way i meant

neon garnet
#

Through a REST API built in Django

late wolf
#

ohh

mellow hare
#

Sends out GET requests and what not

late wolf
#

wdym by get requestes @mellow hare

#

sorry for the ping

mellow hare
#

I don't mind. So whenever your computer tries to access a website, it sends out a GET request, asking the server for the web page.

late wolf
#

what does it access from the website though

mellow hare
#

The bot does the same kind of stuff to our site, but it's wanting information rather than the website

#

An API is kind of like a menu at a restaurant. You have a menu of items you can choose from and customize how you want them

late wolf
#

ohhh

#

that is a very clear explanation

#

and

mellow hare
#

In our case it access all kinds of neat stuff. The !rules command directly gets the rules from the site, the moderators infraction commands access our database, etc

late wolf
#

ohh i see so that's how it access the rules and does it acess the logs as well

green mesa
#

@eternal owl again change pushed 😂

mellow hare
#

Yep!

late wolf
#

oh i see,

#

that's neat

mellow hare
#

It's really convenient. The data that we get back is in the form of a JSON, so it's easy to parse as well

late wolf
#

is the API open source?

mellow hare
#

Yep, it's part of Django

green mesa
#

@neon garnet i think now u can also check my pr

mellow hare
#

But pretty much all web frameworks have an API or one you can build

#

And there's also libraries that are made just to be an API

late wolf
#

ohh, can u build an API with HTML and CSS only?

obsidian patio
#

HTML is just for structuring the content on a website. It stands for HyperText Markup Language

mellow hare
#

Nope. The API is part of the backend

#

Where as HTML and CSS is frontend

late wolf
#

thx I understand, btw HEM your elaboration is very intelligible

mellow hare
#

I appreciate it. I love explaining stuff to people

#

Makes me think I should have been a teacher

late wolf
#

na, We trouble our teachers so much i cant handle that, being troubled

green mesa
#

i have installed docker desktop

#

now where i have to run compose command?

mellow hare
#

True, but a passionate teacher can make all the difference in someone's life.

brazen charm
#

In the root of the project you want to run, next to the docker compose yaml file

green mesa
#

ok

#

let me setup pybot

neon garnet
#

@green mesa Kinda busy until an hour, be right back

green mesa
#

np u can take your time

obsidian patio
#

Is there a reason that we include command processing time in !ping? Since it’s only used for processing the ping command, I’ve only seen it be 0.000ms so far

green oriole
#

@green mesa you need to install docker-compose with pip, and run it in the project root

obsidian patio
#

If we had !ping OTHER COMMAND WITH ARGUMENTS and returned the time it took, I wouldn’t mind keeping it there. If it just gets the processing time of ping, I don’t quite see the value of it

green oriole
#

It is the time between when the message is send and when discord.py starts processing it

#

It can be very useful in the case of a raid to see if the bot is actually slowing down

#

Although, it is pretty weird that it is always 0ms, I have to admit

obsidian patio
#

Hmm, ok

#

0.000ms seems insanely fast

#

That’s 0.000000s

neon garnet
#

@green oriole iirc docker-compose should come with Docker Desktop on Windows shouldn't it?

green oriole
#

Yeah, I wonder if the code isn't broken

#

@neon garnet honestly I haven't used docker on windows for a long time, but I think you still had to download it

green mesa
#

i have github desktop

obsidian patio
#

Have we tried it while putting heavy load on the bot, like during a raid?

brazen charm
#

Didn't have to install compose for docker desktop when I set it up recently

green oriole
#

Nope, it is pretty recent iirc

obsidian patio
#

We could “raid” the test server and see how it reacts tbh

green oriole
#

We can put a heavy load on a test bot tbh

obsidian patio
#

Yeah

green oriole
#

Lol same idea

obsidian patio
#

Hahah yep. Do you have a bot we can try it on there?

green oriole
#

Although, it would mean that the send event took 0ms to reach the bot, which is quite surprising tbh

green mesa
#

means i have to run pipenv direct as i have docker desktop

green oriole
#

I can put some load on mine, hang on, I'm starting my computer

#

What is the most resource consuming command we have?

obsidian patio
#

Alright. But do you mean that it’s actually measuring the time it takes from the exact second the message is registered by discord to the time d.py starts processing it?

#

Maybe eval?

green oriole
#

I worded the issue this way, not sure if it is the actual implementation

#

Nah, eval is using an internal API

obsidian patio
#

Hmm

brazen charm
#

You can create a load with internal eval

obsidian patio
#

True

#

Preferably something really heavy

green oriole
#

Let's compute prime numbers

obsidian patio
#

Nice

#

finds the next, currently unknown, prime number while trying to overload the bot

eternal owl
#

@green mesa i feel this can be a lil bit more clear without a list comp and appending to embed.description directly

#
        embed.description = f"**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.\n"
        for i, zod_name in enumerate(self.zodiac_fact.keys(), start=1):
            embed.description += f"`{i}` {zod_name}\n"```
green mesa
#

@eternal owl most of the people dont like string concatination

#

and list comp makes it easy

eternal owl
#

thats a lot of un-necessary variables too :/

green mesa
#

i made there uncessary var because of flake8

eternal owl
#

what did flake8 do pithink

green mesa
#

120 char limit

eternal owl
#

you can always make a string multiline using brackets

green mesa
#

i didnt knew that 😅

#

ty

eternal owl
#

xD

#

example ^

green mesa
#

ty

#

same can be done with string comp?

eternal owl
#

what is string comp

green mesa
#

i meant list sorry

#

unresolved import 'sentry_sdk' i am getting this error

eternal owl
green mesa
#

ok tnx

green oriole
#

Guys, if you were stuck on an island contributing to our projects on the cloud, what kind of packages (pat and pip) would you like to have?

eternal owl
#

contributing to our projects on the cloud
What does this mean?

green oriole
#

Basically, VSC, but in your browser

eternal owl
#

okay, so we can pull the project and work on it there?

green oriole
#

Yup, directly in the cloud

eternal owl
#

🤔

#

I will have to try it, requested early access

green oriole
#

So far I selected

APT:
• git
• openssh-client
• htop
• curl
• wget
• nano
• vim
• locales
• sudo
• man-db
• httpie

PIP:
• black
• autopep8
• mypy```
#

Anything to add?

eternal owl
#

can we add vscode plugins?

green oriole
#

Yup

eternal owl
#

to ur list i mean

green mesa
green oriole
#

Yeah, sure, tell me iceman

green mesa
#

i didn't understand this

#

where is guild.emoji

green oriole
#

In config.yml

green mesa
#

emojies id are already filled

eternal owl
#

A few which I use are python, prettier, eslint, path intelligence,

green oriole
#

You need to recreate them, actually, but this isn't really mandatory

green mesa
#

then i will skip

#

adding webhook also can be skipped?

eternal owl
#

@green oriole how about adding httpie

green oriole
#

sure

eternal owl
#

Ty

brazen charm
#

The only emoji you need regularly is the deletion emoji

green mesa
#
docker-machine ip default

this is throwing error -_-

eternal owl
green oriole
#

Mmh, I don't want to add too many plugins though

eternal owl
#

okay

green mesa
#

how will i get my default docker ip?

brazen charm
#

the hosts file where you need to add the ip should have it

green mesa
#

is it used in bot?

#

i wnt to get my bot running only

brazen charm
#

It's used by the site, which you need for most of the bot's functionalities

green mesa
#

so where is host file located

cold moon
#

@green oriole Is this possible to add django command line (django-admin) to codespaces for site?

brazen charm
#

should be in the guide

green mesa
#

docker-machine ip default this is given in guide

#

will i need to pip install docker-compose first?

brazen charm
green oriole
#

django-admin should be included with django itself

green mesa
#
docker-machine : The term 'docker-machine' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ docker-machine ip default
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (docker-machine:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException```
brazen charm
#

The ip should be in the file

green mesa
#

url site schema is already set to site_schema: &SCHEMA "https://"

#

then what should i need to change mentioned in the guide

eternal owl
#

change it to http

green mesa
#

and where is my host file

#

in bot repo

#

i tried to run with powershell docker-machine ip default but i got same error

eternal owl
#

tbh, u don't need all that if ur not using the website

green mesa
#

but numerlor said bot interact to do most of the stuff by interacting with site only

eternal owl
#

oh I thought u wanted it for partnerzodiac PR

green mesa
#

i am not running docker

#

@eternal owl

#

and i am not able to locate my host file

eternal owl
green mesa
#

i already read that and i tried to run the command

#

its throwing error

#
 
PS C:\Users\HP\Desktop\bot> docker-machine ls
docker-machine : The term 'docker-machine' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the 
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ docker-machine ls
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (docker-machine:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
eternal owl
#

did u use docker desktop installer?

green mesa
#

yeh

#

i have

eternal owl
#

just gotta google that error

green mesa
#

umm i think our guide need updation

#

or i missed something

brazen charm
#

The hosts file has the ip inside of it, you don't need docker machine just for that

#

The path to it is in the guide

green mesa
#

i need to fork site also?

eternal owl
#

u can just clone it

brazen charm
#

you can just clone it if you don't plan on doing anything inside of it

eternal owl
#

if ur not working on it

green mesa
#

ok

#

then my docker-machine command will work right?

#

i wnt to run this docker-machine ip default

#

to get data of my ip

eternal owl
#

do u have wsl or git bash

green mesa
#

yeh i have bash

eternal owl
#

what does cat C:\Windows\System32\Drivers\etc\hosts give

green mesa
#

i need reddit api cred also in order to work with bot?

#

ok let me run ice

#

cat: 'C:WindowsSystem32Driversetchosts': No such file or directory

eternal owl
#

okay, its actully the other slash

#

or you can navigate to that file from ur file explorer

green mesa
#

ok

#

i got something

#
19........... host.docker.internal
192...... gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
eternal owl
#

i guess the first one is ur docker host ip

green mesa
#

ok

green mesa
#

this error i got

eternal owl
#

in ur config file,set fakeredis to True

#

im not sure what exactly its called, just search for fakeredis

green mesa
#
    section = "bot"
    subsection = "redis"

    host: str
    port: int
    password: Optional[str]
    use_fakeredis: bool  # If this is True, Bot will use fakeredis.aioredis
eternal owl
#

no

#

in the config.yaml

green mesa
#

ok

eternal owl
#

even i had that error a couple days ago, hemlock mentioned the fix

green mesa
#

oo

#

AttributeError: 'NoneType' object has no attribute 'name'
new error lol

#

when i use !help

#

and i changed the devlog id but bot isnt sending anything when it gets connected

eternal owl
#

U need redirect channel ID I guess

green mesa
#

Redirect channel id?

#

Is there any server template for setting up channel

eternal owl
#

In the pins

green mesa
#

Ok

#

WoW so many new channels

obsidian patio
#

Where?

#

You mean the server template?

green mesa
#

Yeh for bot

obsidian patio
#

Ah, yeah. There are really a lot of channels

green mesa
#

Yeh just noticed tomorrow I will try to start bot correctly

#

Setting up the bot is little bit pain if system is slow😅

#

And py bot has lots of cog file

obsidian patio
#

Setting up the bot really isn't trivial — especially not if the system is slow, I guess

patent pivot
#

@green oriole and I are looking to simplify that process

#

We're looking into codespaces, bootstrapping and all sorts of fun

obsidian patio
#

Yep. If you'd like any help with that as well, I could probably help

patent pivot
#

I suspect that as we make the plans concrete we'll make a repo and put issues on it

green mesa
#

Yeh new repo😁

obsidian patio
#

Alright. I'll probably see it then

green oriole
#

Thanks github, I can easily fix the error if you don't tell me what it is

patent pivot
#

hahahaha

#

nice

green oriole
#

Do you know if ~/workspace/project is accessible when the container is built?

patent pivot
#

hmmmm

#

not sure

green oriole
#

Because my best bet is that pipenv sync is failing because the directory is empty

#

I just had a bad idea

#

We could temporary bind mount the source code, in order to sync the pipenv and pull/build the images, and then discard that and replace it with github's copy

patent pivot
#

lol

#

let me come have a gander

green oriole
#

postCreateCommand would be perfect, but it isn't supported

#

The current setup is on feat/1169/codespaces

#

I'll have a bite, see you later

patent pivot
#

no draft PR

#

you make me ANGRY

green oriole
#

Lol, I didn't think about that

green oriole
#

I have another idea, maybe that'd be better, we could make a startup script that checks if the container has already been initialized, and then open the shell

neon phoenix
#

actually what can core devs access?

patent pivot
#

a lot

#

container logs, grafana, write access to master on our repos

neon phoenix
#

these are epic perks

#

but with great power = big responsibility

obsidian patio
#

And a lot of work

neon phoenix
#

yeah

#

the core devs are actually the most active devs

#

i always see them commenting, creating issues, commiting code, and merging prs

obsidian patio
#

It's more like tools to help out than permissions to flex with

#

Yeah

eternal owl
#

@neon phoenix seasonalbot and python bot use the same help function

neon phoenix
#

yeah but

#

.help

eternal owl
#

https://github.com/python-discord/bot/pull/1157
thoughts on this?
Should we allow posts from nsfw subreddits even tho they don't have nsfw content or just block the subreddit if even 1 post contains nsfw content?
more details in the comments of the PR

neon phoenix
#

I don't think we should block a whole subreddit for just an NSFW post

patent pivot
#

yeah

eternal owl
#

by block, i mean not litrelly block, they can request again and if the newly requested posts don't contain any, they will get their response

patent pivot
#

I think we have had an NSFW post on r/python lol

eternal owl
#

wow thats a surprise

neon phoenix
#

I don't know much about reddit, but, are posts on an NSFW subreddit marked as NSFW?

brazen charm
#

Yes

patent pivot
#

yeah

neon phoenix
#

If so, as Numerlor commented, you could just skip the check if the subreddit is NSFW

eternal owl
#

oh that makes stuff even simpler, lol

#

ye i guess

#

@patent pivot is this issue still valid

#

cuz the help cmd has been updated

neon phoenix
#

Yeah

patent pivot
#

@cold moon pls confirm

neon phoenix
#

Well, for example, .space still uses the default help

patent pivot
#

yeah, I think it is the per-command help

neon phoenix
#

When I opened the issue I thought all commands were like space help

eternal owl
#

ooh i get it

cold moon
#

Hmm, i think help format depends on how help command is called

eternal owl
#

yep

cold moon
#

And current version of custom help don't support this way calling

neon phoenix
#

🦀 🦀 Sync confirmation messages are gone 🦀 🦀

late wolf
#

what are some of the events that the python bot has

#

could u give me a list

tawdry vapor
#

It doesn't have any custom events. It uses the ones provided by discord.py only.

late wolf
#

no just examples

tawdry vapor
#

I'm not sure what you mean. All available events are documented by discord.py

#

I already listed 3 examples earlier

late wolf
#

right, ok

vocal wolf
#

.issue 1187 bot

vocal wolf
#

@tawdry vapor If I understand your comment on ^ correctly, we should not update the Pipfile.

tawdry vapor
#

You can it's just not really gonna do much

vocal wolf
#

Alright. I'll leave a comment and close the issue.

#

Doesn't seem like this version would do anything at all, I don't see any of the bug fixes having major improvements the bot (I haven't tested, I just don't see why there would be changes for the better).

#

I guess we'll leave the pipfile update to the next version that changes stuff that affects the bot.

late wolf
#

where do you guys send the data

#

what db i meant

neon phoenix
#

postgres and redis

#

well you can learn more about this on the privacy page

green mesa
#

Only used by our site

late wolf
#

So the data gets sent to the site itself

green mesa
#

Yes

late wolf
#

ohhhhh

green mesa
eternal owl
#

@green mesa can you also simplify ur error method in the partnerzodiac pr, then i will approve it

green mesa
#

yeh doing that only

eternal owl
#

oki

green mesa
#
    def error(self, zodiac: str) -> discord.Embed:
        """Returns error embed."""
        embed = discord.Embed()
        embed.color = Colours.pink
        error_comp = ("\n").join([f"`{i}` {zod_name}"
                                  for i, zod_name in enumerate(self.zodiac_fact.keys(), start=1)])
        embed.description = f"""**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.
                            {error_comp}"""```
#

i have done this

eternal owl
#

i think u missed \n in embed desc before the error comp variable?

green mesa
#

@eternal owl i have using triple quotes

#

so it already in new line

#

in description

#

is it looking nice or i need to change something

neon phoenix
#

Uh, you could change some things to make it pretty

eternal owl
#

the list comp indent is off

#

i usually have the opening and close brackets on the same indent level or the closing one 1 indent back

green mesa
#

i just pushed changes lol

neon phoenix
#

For example
Don't do this

x = """a
       docstring"""```
Do this 
```py
x = (
    "string1\n" 
    "string2" 
)```
green mesa
#

i usually have the opening and close brackets on the same indent level or the closing one 1 indent back
its raising error when i try

#

ok let me try

neon phoenix
#

Another thing
Make the join method visually better

#
error = "\n".join(
    your_things
)```
green mesa
#

ok

timid sentinel
#

There is no need for parentheses around the "\n" in the join, and the square brackets are not needed.

neon phoenix
#

Yeah

#

Also, in my opinion it would be better if the color and description is specified inside of the embed constructor

#
embed = discord.Embed(
    title="idk", 
    description="\n".join(
        your_things
    ),
    color=something
) ```
eternal owl
#

I don't really like defining stuff inside the embed constructor, but thts just me pithink

green mesa
#

yeh i also dont like 😅

#

@eternal owl

neon phoenix
#

Now it's better, but I still recommend you to do this

embed.description = (
    f"{zodiac} bla bla bla\n"
    f"things"
)```
green mesa
#

ok

eternal owl
#

also, as wookie said, you don't need the square brackets inside join

green mesa
#

yeh i removed it buddy

#

already

#

@eternal owl @neon garnet now i have made changes now u can review the pr

eternal owl
green mesa
#

ok anything more

#

@eternal owl without [] how it knows its a list comp?

eternal owl
#

it works

green mesa
#

ok pushing changes

#

rn

eternal owl
#

also

#

bunch of ur logging statments dont end with a period

#

so you could also fix that

green mesa
#

ok

#

done

#

changes pushed

eternal owl
#

I'll do a final review in a couple of hours

green mesa
#

ok

brazen charm
#

Does redis for the bot get backed up to normal storage?

hardy gorge
#

I think there's a command replay save in the mix, although @patent pivot knows more about that

#

In principle, redis is used for things that should be cached and/or stored in the short term; it's not meant as a permanent storage back-end

#

Which means that we should not rely on it for things that need permanence.

patent pivot
#

Yeah, we use redis in append only mode which means that a replay file is saved so in the event of power loss we can replay the last commands https://redis.io/topics/persistence

hardy gorge
#

Example: it's okay to lose the channel->claimant mappings (redis is fine for that); it's not okay to lose infraction history (redis is not okay)

patent pivot
#

default redis (rdb) just snapshots at intervals and saves to a rdb file, aof saves every op to a file to replay

#

so in powerloss we would lose maximum 1 second of data

brazen charm
#

Ah, that sounds good, was just wondering how the different systems that use it would behave with an old cache but it not much of an issue when it's relatively frequent

neon garnet
#

.issue 48 snekbox

dusky shoreBOT
neon garnet
#

Just curious, what's the current status on this feature?

patent pivot
#

not being worked on at all afaik

eternal owl
#

when the bot tests are running, does it run the website locally too?

#

i mean on github

hardy gorge
#

Tests don't actually interact with the production database, right?

glass pecan
#

iirc it makes a different one

hardy gorge
#

That's for site. Django creates a test database when running tests using the Django runner

eternal owl
#

i mean for the bot repo

#

bot

brazen charm
#

site creates a test database; bot's tests are detached from it

hardy gorge
#

The tests for bot shouldn't actually be trying to communicate with the actual API

#

Instead you patch and mock the API: You specify what the return of the API call is for your test without actually calling the API

#

This does not test the integration between bot and site, which is a limitation of these type of tests

green mesa
#

now embeding is left UwU

eternal owl
#

what is that for

green mesa
#

.issue 454

green mesa
#

@eternal owl

#

with emoji command u can give name of emoji also and give actual emoji also from pydis server

#

bot will tell u the category and name along with count of emojies present in that category

neon garnet
#

That's a bit out of scope from what I intended imo

green mesa
#

lol

clever wraith
#

Does anyone know about ROBLOX Coding Lua?

green mesa
#

so how i need to make pure

#

i meant what i am doing wrong

#

can u point out

clever wraith
#

Anyone know ROBLOX Lua?

neon garnet
#

The intent of the issue was to solely create an .emojicount command as a rudimentary board for displaying the number of each prefixed emoji category, nothing more, nothing less

mellow hare
#

@clever wraith Not really the right place for asking about that. You can probably ask in one of the off-topic channels

green mesa
#

@timid sentinel i am taking query_date bcz i am importing date from datetime

#

oopsy sorry for ping

#

just read what u meant

#

actually iceman asked to change

#

thats y i have changed to query_date

timid sentinel
#

Looking at it I think RohanJnr was just suggesting that you used date instead of datetime (which is right as this wouldn't depend on time), they weren't commenting on import datetime vs from datetime import date. Both would be fine, but I think having to use query_date makes it look a little inconsistent in the help command

#

It's not a big thing, I just think it would be a little clearer if it was just date there

green mesa
#

ok i will change 🙂

green mesa
#

The intent of the issue was to solely create an .emojicount command as a rudimentary board for displaying the number of each prefixed emoji category, nothing more, nothing less
what will be the use of this then?

glass pecan
#

i believe it would be to do what was said right there in your message: to count each category of emoji's, based on their prefixes

green mesa
#

something like this

glass pecan
#

Your command name, functionality and proposed format all don't really match the issue.

#

If you're stretching yourself thin across two different PRs to a point where you're getting a bit confused over the issue ticket, you should either ask for clarifications here beforehand, in the issue ticket's comments, or consider sticking to the single PR at a time until you can dedicate your full focus to the next one.

green mesa
#

partnerzodiac subcommand is ready

#

now only tweaks are left

glass pecan
#

yes but the confusion seems to have occurred before you started

#

and you don't seem to have seeked any clarification

green mesa
glass pecan
#

An .emojicount command can be invoked with zero or more categories. For every category requested, each line in the embed would consist of the following format:

#

the accepting of a single emoji could be a valid option perhaps, but the proposal states it should accept no arguments and show all categories with counts, a single argument of the prefix/category name, or multiple of that

green mesa
#

i have just coded the command

#

i am making changes so command can accept multiple, single or no emoji

#

and show in that format

glass pecan
#

multiple, single or no emoji
what about the actual proposed arguments

#

the original never stated accepting emoji as arguments, but categories

green mesa
#

ok i will accept category

#

i got confused at what she meant with prefix

glass pecan
#

Ok. In future, please ensure you fully understand the issue you've been assigned before attempting implementations though, to avoid this type of confusion. The issue author and many other people here are always able to assist where needed.

cold moon
#

This Voice Gate project looks nice... I'm currently trying to figure out about this second DB thing solution..

glass pecan
#

hm?

cold moon
#

Googling it currently

glass pecan
#

no i mean what's the confusion regarding it

cold moon
#

I mean where is best place to put this script, what creates this DB. Also where this should create tables? Should this in migration?

patent pivot
#

don't create tables

#

there should be absolutely no ORM integration for this, in fact I've disallowed the prod user from writing to the metricity tables

cold moon
#

huh

patent pivot
#

metricity creates and manages the tables, we'll use raw SQL to query that, no ORM.

glass pecan
#

what creates this DB
an sql script will on initial deployment

#

the rest is nothing to worry about as like joe said, it's not something orm has to care about

green oriole
#

@obsidian patio helpers should now be able to use !role!

green mesa
#

Where I can find the emoji category? Is it stored somewhere?

glass pecan
#

it's the emoji prefix

#

ducky_angel

#

ducky is the category

cold moon
#

So in Python this is emojiname.split('_')[0], then you get category

green mesa
#

Ohk

#

Tnx scargly and ks123

mellow trench
#

where can I find extension whitelist the bot uses, I tried looking at constants but seems I'm blind

brazen charm
#

The whitelists have been moved to the site db, you should be able to find them in older revisions of the config file

obsidian oxide
#

@exotic ember @green oriole does it look good now?

eternal owl
#

I wanna clarify one thing regarding the smart syncing of users before I start writing tests for it,
My current implementation in the PR is handling the pagination(which is working great) and to update all users in one request.
The way I am doing it is a with a PATCH request instead of a PUT request. Which means, I am only sending the user ID and the fields that have changed. example: If the user has changed only his name, then the data sent in the request for that user will be

{
"id": 12232....,
"name": "MyNewName"
}```
I way I am doing this is, by setting all the unchanged values to None and then not including the None values when the namedtuple is converted to a dict
Just wanna confirm if this is what you actully wanted or if this is a fine approach
@crude gyro @mellow hare (tagging you too cuz you are about to reivew that PR).
https://github.com/python-discord/bot/pull/1165
green mesa
#

I think tomorrow may be my partnerzodiac command can be merged 🙂

obsidian patio
#

Perfect, akarys!

orchid bone
#

https://pythondiscord.com/pages/resources/guides/ I noticed that the guides section is WIP - which branch is the content being hosted? I can't find it in the master branch: https://github.com/python-discord/site/tree/master/pydis_site/apps/home/resources

patent pivot
#

content for the wiki is stored in our database right now @orchid bone

#

we're planning on moving it to content hosted in a git repo

#

right now, only staff members can add and edit content on the wiki

#

(for clarification, any page under /pages/ is a wiki page)

neon garnet
#

@glass pecan @green mesa I'll try and create an implementation once I've uploaded the assets on my test server. Hopefully this should clear up any confusion.

green mesa
#

Ok

neon phoenix
#

What's saltstack?

green oriole
#

A (broken) CD service

green mesa
#

Broken😅

neon phoenix
#

Welp

#

Why is it broken?

green oriole
#

It is motly just bad

#

A lot of things just break for no reason

neon phoenix
#

welp

#

is saltstack the only cd service out there?

green oriole
#

Nah, there are a lot of them

neon phoenix
#

then why are you using saltstack?

green oriole
#

¯_(ツ)_/¯

neon phoenix
green oriole
#

We will probably be moving away from it though

neon phoenix
#

probably never™️

green oriole
#

The devops team has a meeting.. today, I think

neon phoenix
#

how do you know lol

green oriole
#

Yup, today

obsidian patio
#

Insider info

#

👀

green oriole
neon phoenix
#

ah

#

that's epic

#

i only have access to the default channels

obsidian patio
#

Sneak me in @green oriole

neon phoenix
#

#helpers 👀

obsidian patio
#

That’s not even a link to a real channellemon_pensive

neon phoenix
#

you don't have a helpers channel??

green oriole
neon phoenix
#

i thought you had a #helpers channel lol

obsidian patio
#

We do hahah

neon phoenix
#

ah

obsidian patio
#

It was just not a real link

#

Which made me sad

neon phoenix
#

i am not even a helper

#

what did you expect lol

green oriole
#

You technically could have made a real link using the id in the bot source code haha

obsidian patio
#

A real link

#

Technically, but still hahah

neon phoenix
#

#helpers guys i have access to helpers!1!!

#

ah shit

#

wait

#

jeez

green oriole
#

It is working haha

neon phoenix
#

for me not

#

i think we're getting off topic pithink

obsidian patio
#

True

neon phoenix
#

from saltstack to #helpers channel™️

obsidian patio
#

(Fake link)

#

Yeah

patent pivot
#

SaltStack may be less broken by the end of the day!

#

lol did I just not add a calendar event for the DevOps meeting

#

okay

green oriole
#

SaltStack may be less broken by the end of the day!
Liar, that isn't possible

patent pivot
#

yeah it is

#

because we won't be using SaltStack lol

neon phoenix
#

what you will be using? 👀

#

what are the candidates?

patent pivot
#

current candidates are Kubernetes and something lemon has made bespoke which wraps docker compose

green oriole
#

because we won't be using SaltStack lol
Okay, not a liar, but a cheater lemon_eyes

#

k8s is great tbh

patent pivot
#

We considered Ansible as well but it wouldn't hook well into our autodeploy (Ansible themselves said use 2 servers for auto deploy lol)

#

k8s is great

neon phoenix
#

you said saltstack is broken
what is more exactly broken on it?

patent pivot
#

well, it is a janky setup of webhooks which don't always work

#

And SaltStack had a vulnerability earlier this year which would have crippled us if I didn't update as fast as I did (it crippled one of my personal boxes)

neon phoenix
#

ah okay

patent pivot
#

just all around spooky

neon phoenix
#

well that sucks

patent pivot
#

but k8s and lemons thing are cool!

#

so we'll see what we decide tonight

neon phoenix
#

👌

#

also

#

what do you think about an !emoji cog that shows info about emotes

#

idk

green oriole
#

LemonStack when

neon phoenix
#

WheelStack

#

( 🚴 [ves] )

green oriole
neon phoenix
#

yeah, but, that just returns all the emotes

#

what about a cog that shows more detailed info

#

like id, name, created_at, etc

green oriole
#

That could be interesting

#

Does the discord api provides all this data?

obsidian patio
#

.emojicount could be a sub command, then

#

The ID includes the date created

#

Just like with all snowflakes, the ID is easily retrieved

neon phoenix
#

i think that the emoji info cog would be better suitable for @stable mountain

obsidian patio
#

I think it’s more of a @dusky shore thing. Just like .issue

green oriole
#

Hmm, they aren’t a lot of useful infos tbh, the only useful thing I can think of, is to have a link to the cdn image

neon phoenix
#

yeah

#

sometimes people just want to get the image of an emote but they don't know how

#

that command could help

#

like

Information about :pithink:

**Name**      **Created at**
pithink   <insert human readable datetime here>

**ID**         **CDN Link**
3298423497 <insert here cdn link>```
obsidian patio
#

It would be really easy to access the date created, ID and probably source image

green mesa
#

👀

neon phoenix
#

we also need to think about input sanitation and validation

#

i don't know about a @Developers emote

green mesa
#

What's that

neon phoenix
#

(dear staff members, please don't quote my message)

green mesa
#

Developer emote

obsidian patio
#

I don’t think there should be much sanitation needed

#

i don’t know about a @Developers emote
@neon phoenix here’s a staff member quoting the message.

green oriole
#

We have clean_text (or something like that) anyway

neon phoenix
#

but you sanitized it

#

well

#

i also thought of having an !emoji add command

obsidian patio
#

It wouldn’t work, but I’m not taking any risks hahah

neon phoenix
#

!emoji add lemon_idk https://link.to-lemon.emote/

green mesa
#

Or just emoji refresh

#

Which will add emoji from github

obsidian patio
#

It’s really easy to add emojis manually. Don’t think the extra work for the command is worth it

neon phoenix
#

well, yeah

#

so

#

this is for @dusky shore then

obsidian patio
#

Yeah

neon phoenix
#

evergreen, right?

obsidian patio
#

Yep

green mesa
#

Yeh we have issue for emotecount

obsidian patio
#

We discussed that above

#

That would probably be turned into .emoji count or .emoji list

neon phoenix
#

my pc just crashed, I am typing from my phone

obsidian patio
#

use Mac instead

neon phoenix
#

no thanks

#

I'm fine with manjaro

#

I just had a thousand of tabs open

obsidian patio
#

Hahaha

neon phoenix
#

Well, so, how should I start?

#

Or we, idk?

#

What's the proper etiquette for adding features?

obsidian patio
#

We generally open issues on the @dusky shore repo for new feature requests

green oriole
#

Well

#

You can open an issue, and we’ll discuss about it

neon phoenix
#

okay

obsidian patio
#

Yeah

neon phoenix
#

i am opening it, i guess

obsidian patio
#

There’s a template to follow as well that’ll be used automatically

neon phoenix
#

yeah, i know

#

i did this before

obsidian patio
#

Aah, okay

neon phoenix
#
## Reasoning
<!-- Outline how the proposal would be useful to the community -->```
#

sweats intensively

#

i dunno man, probably is going to be helpful

obsidian patio
#

Hahah just try to reason about it

#

Emoji.created_at is available

#

This should be a quite simple command to implement, I believe

green oriole
#

Explain why and for who it will useful

neon phoenix
#

done

#

i can do this on 10 minutes lol

#

btw, anyone who has perms to assign: can you assign me?

green oriole
#

Sure, but this isn’t approved yet

neon phoenix
#

ah shit

#

what's the record for the fastest feature merged?

obsidian patio
#

Nothing to try to beat hahah

green oriole
#

Does pushes to master count? lemon_pika

obsidian patio
#

no

green oriole
#

Pfff

#

No fun

neon phoenix
#

idk

  • this post was made by the default gang
obsidian patio
#

Hahaha

#

That would be abuse of power

hardy gorge
#

I always use git in jedi mode when I push to master

obsidian patio
#

Jedi mode?

green oriole
obsidian patio
#

Don’t do it ves

green oriole
#

do it

obsidian patio
#

It’ll ruin the git historylemon_eyes

green oriole
#

!otn a git-jedi-mode

neon phoenix
#

hm, about the emoji info subcommand
if we want it to be a subcommand of emoji, i need to talk with @green mesa to make .emojicount a subcommand of emoji

#

well, actually, ping pong anubhav

green oriole
#

It can be refactored later, tbh, it wouldn’t be too hard

neon phoenix
#

yeah, but, what if my PR gets merged before his PR

#

or reverse

hardy gorge
#

!otn a akarys-can-be-refactored-later

neon phoenix
#

i (or he) needs to rewrite their code to adapt it

stable mountainBOT
#

:ok_hand: Added akarys-can-be-refactored-later to the names list.

green oriole
#

You’ll have to wait for their PR anyway

obsidian patio
#

Wait what

green oriole
#

Oh god, he saw it haha

obsidian patio
#

Why should we refactor Akarys?

hardy gorge
#

That's what akarys wrote

green oriole
#

I missed the t while typing

obsidian patio
#

Hahahahhhh

green oriole
#

Guess i’ll edit it hack then haha

hardy gorge
#

this:

It can be refactores later, tbh, it wouldn’t be too hard
was:
I can be refactores later, tbh, it wouldn’t be too hard

#

I ignored the s

#

let's call it artistic freedom

green oriole
#

And I also missed the d, oh god

obsidian patio
#

Hahah I love it

tough imp
#

I wonder if it could be just .emoji :myemoji:?

obsidian patio
#

Let’s refactor Akarys later

#

Yeah. I hope so @tough imp

neon phoenix
#

@tough imp .emoji count it will be a thing too

#

@green oriole what does it feel to have an otname that has your name lol

green oriole
#

It is the 2nd otn with my name lemon_pika

obsidian patio
#

I think I have 3...?

tough imp
#

that's not necessarily mutually exclusive, although it's not "directly" supported by d.py I guess

green mesa
tough imp
#

sure, the question is more about what's the nicest way to have both .emoji :myemoji: as an invokeable that has .emoji count as a subcommand

#

it's definitely doable, I'm just wondering what the best way to do it would be

hardy gorge
#

We could make count a subcommand and have a custom converter for emojis for the regular command

tough imp
#

you could also always have them as parallel commands e.g. .emojicount unless you think that's ugly

neon phoenix
#

probably making .emoji a command and then check if the second parameter is a command or emoji name?

#

like

green mesa
#

What u think about this

neon phoenix
#
@commands.command(name="count")
async def count(self, ctx, ...) -> None:
    pass

@commands.command(name="emoji")
async def emoji(self, ctx, idk: Union[count, discord.Emoji]) -> None:
    pass```
actually sorry if the code is dumb or incorrect but this is my solution to this problem
green mesa
#

Ummm y not make count subcommand of emoji

neon phoenix
#

because @tough imp thinks it's better if the emoji info is shown by simply doing .emoji :emoji: rather than .emoji info :emoji:

#

something like !d command does to get docs

tough imp
#

groups can be invoked too

#

I don't necessarily think it's better, just wanted to mention the option in case you like it and want to develop it further

#

I think you could also have .emoji info :emoji: and .emoji count, and have the group try to invoke the info subcommand if the second param doesn't match any of the subcommands

obsidian patio
#

Yeah. I think that’s the best way @tough imp

green mesa
#

I am waiting for pure to show me the format😅,as she wnts to clarify something about command

hardy gorge
#

@tough imp You don't have to do that, right?

#

I mean this would work:

class Emoji(Cog):
    def __init__(self, bot):
        self.bot = bot

    @group(invoke_without_command=True)
    async def emoji(self, ctx, emoji: str) -> None:
        await ctx.send(f"Received {emoji}!")

    @emoji.command(name="info")
    async def count(self, ctx) -> None:
        await ctx.send(f"emoji count")
#

It's just that emoji info would never trigger the first group-defined command, but an emoji can't simply be called info anyway

tough imp
#

it's an approach, but I think there's some annoying caveat with invoke_without_command=True that I ran into

hardy gorge
#

Hmm, maybe

#

let me check