#dev-contrib

1 messages · Page 89 of 1

vale ibex
#

I'd highly suggest you read through the contributing guide.

placid ermine
clever wraith
#

i will read it. thanks.

vale ibex
#

scroll up

placid ermine
#

ah by above you mean above

#

right

clever wraith
#

Like up

#

thanks a bunch for help.
i invited bot to server. he is in there. tho im getting some error in docker stuff

pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 67, in main
  File "compose\cli\main.py", line 123, in perform_command
  File "compose\cli\command.py", line 69, in project_from_options
  File "compose\cli\command.py", line 132, in get_project
  File "compose\cli\docker_client.py", line 43, in get_client
  File "compose\cli\docker_client.py", line 170, in docker_client
  File "site-packages\docker\api\client.py", line 188, in __init__
  File "site-packages\docker\api\client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
[15168] Failed to execute script docker-compose
vale ibex
#

Do you have docker running?

clever wraith
#

oh my bad

#

yay!

vale ibex
#

🎉

clever wraith
#

i checked contri.RD file, there is no stuff about api call errors. am i still missing something?

vale ibex
#

What do you mean by api call errors?

clever wraith
#

i tied to run .connect4

#

and this happened

#

its running here fine

gritty wind
#

You don't have the emoji on the server you're running it on

vale ibex
#

Ah, that's likely going to be the trashcan emoji

brazen charm
#

You'll need to add the emoji or replace it in constants (or env if that was added)

vale ibex
#

As a note, we should probably make that an env var in lancebot

gritty wind
#

The cross emoji?

clever wraith
#

okay i think its having issue with CROSS_EMOJI

#

yeah

gritty wind
#

Where else do we use it lol

clever wraith
#

4 files. statically used at 2 of them.

#

assuming thats the name used everywhere

vale ibex
#

It's going to be the incident_unactioned emoji incident_unactioned

gritty wind
#

There are actually quite a few cross emojis

vale ibex
#

Yea, some use unicode emoji

gritty wind
#

\u274C, \u274e, incident_unactioned

clever wraith
#

so should i add it somewhere, or statically add it out there?

#

wtf

gritty wind
#

!pban 786650529690157066 Self bot

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied ban to @warm musk permanently.

mellow hare
vale ibex
#

It looks like bot is starting before redis is ready?

#

unless you're starting that seperatly first?

gritty wind
#

I think the implication here was that he has to switch from fake redis to real redis

#

in which case

#

that won't matter

#

Though admittedly it is trying to connect to redis, so I may have misunderstood

mellow hare
clever wraith
#

i have put \u274C, its fine right?
tho what can be permanent solN?

gritty wind
#

Just have it as a constant at the top of the file

clever wraith
#

okay so in pull, im supposed ignore these changes?

gritty wind
#

I'm a little confused, what are you doing?

clever wraith
#

future pull

gritty wind
#

I don't understand still. Are you trying to solve conflicts with the master branch?

mellow hare
#

Here are the steps I did for this:

  • Tested using fakeredis, realized I needed regular
  • Did docker-compose down to spin the containers down
  • Changed the config file to have the redis configs be host: "web" and use_fakeredis: false
  • Ran docker-compose up -d web redis and waited until it was running.
  • Ran docker-compose up bot and encountered the error almost immediately
clever wraith
#

yes. as i have made this change because i was having this issue, is it acceptable if this change comes on master as well?

gritty wind
#

Its hard to resolve the conflict without knowing the actual content of the files haha. Are you chaning which emoji is used?

clever wraith
#

Hi @gritty wind , would you mind quickly going over my pr on sir-lancebot?

gritty wind
#

Sure, I can give it a look over in a bit

clever wraith
#

Thanks

clever wraith
#

i have that already, just asking

mellow hare
#

Ah, fair enough

gritty wind
#

gah docker builds take forever

brazen charm
mellow hare
#

I'm just going by what our contrib guide says

#

I'll give it a quick shot, though

gritty wind
mellow hare
#

The stream permissions thing

tawdry vapor
#

The host for the site should be web and the host for redis should be redis

mellow hare
#

Got it, I'll correct it

gritty wind
mellow hare
#

I'm testing to see if the PR properly removes the role after if it applied the role then had to restart before it could remove it

#

And I can't do that with fake

#

Okay, that fixed it. I'm double checking to make sure I just missed something in the contrib guide or if we need to tweak it

gritty wind
#

I think it's not on there, at least not in the config section

mellow hare
#

Yeah it's not

#

Okay, I don't feel as dumb now

gritty wind
#

Would you mind adding it to the first section lemon_hyperpleased

mellow hare
#

I will in a bit, have to use the little nerd's room

clever wraith
#

idea: can we make @stable mountain use fuzzy matching for the docs command?

brazen charm
#

There is an issue for partial matches

clever wraith
#

hmm?

#

so one question, do i literally need to restart docker on every change?

brazen charm
#

You can reload the extension

clever wraith
#

im trying to change announcement message and its not giving new

#

how?

gritty wind
#

!reload ext_name

clever wraith
gritty wind
#

Though not on sir-lancebot if that's what you're working on

#

Or

#

maybe it is

#

can't remember

#

.help reload

dusky shoreBOT
#
Query "reload" not found.
brazen charm
#

Should also be in lancebot

gritty wind
#

ah try .ext reload

#

maybe spelled right lol

brazen charm
#

I'd guess the src doesn't see the root alais

clever wraith
#

okay that worked

#

thanks

#

@brazen charm how i'd imagine i would be useful is, you were talking/helping about something like overwrites, and you don't know the exact name of the class/object. you could just !d overwirtes

sleek steppe
#

that would probably make the docs command much slower than it already is lemon_grimace

brazen charm
#

It should be possible, but there are considerations on how to achieve it as there are around 100k symbols which could result in many unwanted results with common keywords

brazen charm
dusky shoreBOT
clever wraith
#

where should I put the link to the discussion for pyfacts?

#

@gritty wind

gritty wind
#

I don't know what the plan is for gathering facts

vale ibex
#

.topic

dusky shoreBOT
#
**What is your favourite color?**

Suggest more topics here!

gritty wind
#

Do you know who originally opened the issue?

clever wraith
vale ibex
#

I'd suggest linking the discussion Joe setup in the embed footer

clever wraith
gritty wind
#

that's a good idea too

#

I think you can use markdown links, no?

vale ibex
#

Yea, you should be able to

clever wraith
#

no, not in footer

gritty wind
#

set_footer("[link text](https://link.com)")

clever wraith
#

hmm

clever wraith
vale ibex
#

Ah, maybe just add another line at the end then

clever wraith
#

ok

vale ibex
#

.src topic

dusky shoreBOT
#
Command: topic

Responds with a random topic to start a conversation.

Source Code
clever wraith
#

how do I reload en extension?

vale ibex
#

.ext r <cog>

#

or just .reload <cog>

clever wraith
#

ok

#

huh

#

AttributeError: 'NoneType' object has no attribute 'cancel'

#

pretty vague lemon_thinking

green oriole
#

That's the aoc

clever wraith
#

aoc

green oriole
#

It is pretty broken

clever wraith
#

oh

green oriole
#

I believe @hardy gorge was looking into this

vale ibex
#

oh wait, I don't think sir lancebot support root aliases, until my PR at least, so it looks like its a copy-paste oversight 😛

#

or a hidden feature

clever wraith
#

ok

vale ibex
#

This is nothing to do with your issue by the way, just something I noticed with extensions reload

clever wraith
#

what's this mean?

bot/exts/evergreen/pythonfacts.py:24:121: E501 line too long (144 > 120 characters)
bot/exts/evergreen/pythonfacts.py:25:9: E128 continuation line under-indented for visual indent
vale ibex
#

first one is your line is too long. Second is your continuation line isn't indented enough

clever wraith
#

ok

#

how can I fix it?

vale ibex
#

Separate the long line into different lines

#

And indent the line to match up with the other indents

hardy gorge
clever wraith
green oriole
gritty wind
hardy gorge
#

Right

#

I forgot about that

#

The changes currently required are fairly minimal

#

There's one command that requires an event to be ongoing that doesn't check it

#

And a task has changed names which wasn't properly applied to all references

clever wraith
#

riight

#

why didn't I think of adding a field to the embed?

green oriole
#

@hardy gorge alright, do you still want to take care of it? I can do that this weekend otherwise

clever wraith
#

lemon_enraged why can't i get under 120 characters

vale ibex
#

What does your line look like?

clever wraith
vale ibex
#

.topic

dusky shoreBOT
#
**Do you speak a language other than English?**

Suggest more topics here!

vale ibex
#

You could remove the first sentance

#

It'll be consistent with this then.

#

Otherwise I'd suggest soemthing like ```py
value=("Want to suggest more facts? "
"Suggest more facts here!"
)

gritty wind
#

@clever wraith honestly don't blame you at all for all the format changes haha

#

the docs are a pain

clever wraith
#

ok

clever wraith
#

why is linter so picky

green oriole
#

Because having a consistent and healthy code style is important

clever wraith
#

ok

hardy gorge
#

@green oriole Which command was the broken one again in AoC?

green oriole
#

Hmmm

hardy gorge
#

Not the None error

green oriole
#

.aoc join

dusky shoreBOT
#

The Python Discord leaderboard for 2021 is not yet available!

hardy gorge
#

refresh

#

maybe?

green oriole
#

I can't refresh actually

hardy gorge
#

.aoc leaderboard

#

that one

green oriole
#

Only admins can

#

Oh, the leaderboard

dusky shoreBOT
#

:x: Unable to fetch leaderboard!

hardy gorge
#

alright

#

thanks

#

!

gritty wind
#

I think it's actually on startup

#

It logs a missing token error

#

But I may be misremembering

clever wraith
#

@green oriole can you review my PR?

#

sir-lancebot#596

dusky shoreBOT
green oriole
#

I can't, I'm not on my computer, sorry

clever wraith
#

ok

gritty wind
#

Actually you are still welcome to review

clever wraith
#

oh?

gritty wind
#

it helps other reviewers, even if doesn't count

clever wraith
#

can I review

#

?

gritty wind
#

You may have seen @short snow's reviews around

green oriole
#

You can, but not your own PR haha

gritty wind
#

It tells other reviewers that you think the PR is good

#

which is a helpful sign when looking over something

clever wraith
#

ok

#

@gritty wind can you review? :rooThink:

green oriole
#

We sometimes even merge using a contributor review

clever wraith
#

ok

#

@gritty wind i made the requested change

#

it seems the linter did not like

green oriole
#

You have a failed lint

#

Yep

gritty wind
#

while you're at it

#

th :earth_americas: fro

#

extra space there 👀

#

line 43

clever wraith
#

oop

gritty wind
#

If you're failing on code length

#

you could extract ?utm_source=sir_lancebot&utm_medium=referral into a variable

clever wraith
#

I failed on whitespace, escaped with slash

#

that failed lint, oops

green oriole
#

Sounds like something you can store as a constant and use an urllib function to create

#

I don't mind storing it as a constant though

clever wraith
#

@gritty wind the lint passed

gritty wind
#

Hmm I'm not sure it complies with the style guide

clever wraith
#

the \?

gritty wind
#

nah

#

it would be name on a new line, and the closing parenthesis on a new line too:

add_field(
  name="Author",
  value=f"Photo by [{username}]({profile}" + rf + ") \
  on [Unsplash](https://unsplash.com?" + rf + ")."
)
clever wraith
#

oh

#

alright, ill fix

gritty wind
#

Also you're already using f-strings, I think you don't need to do string concat with plus

clever wraith
#

oh im stupid

#

ill get that fixed!

gritty wind
#

👍

#

I'm not sure if this is in the style guide or not, so I'm not going to enforce it, but I'd prefer if you avoid the break

#

you can built the value on another line, it doesn't have to be in the function

#
author = f"Photo by [{username}]({profile}{rf}) on [Unsplash](https://unsplash.com?{rf})."
add_field(name="Author", value=author)
#

that took too many edits haha

#

Alrighty, that works for me

clever wraith
#

awesome

gritty wind
#

I will ask you to fix the extra space in the embed description though because that is user facing

clever wraith
#

I thought I got that!

#

@gritty wind i fixed the space there

gritty wind
#

thank you

clever wraith
#

no problem, i thought i got that there

#

i cant believe how much things i messed up doing that!

gritty wind
#

Ok everything looks fine to me

#

Lol my first contrib was flaming too haha

clever wraith
#

good to know

#

my first also holds second place for most comments on a pr

gritty wind
#

Gonna spin it up locally to test, but other than that I think it's just getting the API approval now

#

lol I'll take partial blame for that

clever wraith
#

lmao its fine

#

!topics

stable mountainBOT
clever wraith
#

!topic

stable mountainBOT
clever wraith
#

.topic

#

there

#

@clever wraith i don't understand your review

#

its for the styling of embeds

#

oh, 1, these are facts, not topics

#

f***

#

hang on

#

there

#

the add_field, not the entire embed

vale ibex
#

@clever wraith congrats! 🎉

clever wraith
#

Thanks!

#

excited for when its available!

vale ibex
#

Once @dusky shore says its rejoined in #dev-log you should be good to go

#

should be less than 1 minute

gritty wind
#

👀

clever wraith
#

exciting!!!

gritty wind
#

it's pretty much just waiting for the actions to run

#

hmm if things break

#

blame Joe

clever wraith
#

lmao

green oriole
#

Even if it is your fault

#

blame joe

clever wraith
#

@gritty wind so how's my PR?

gritty wind
#

lol haven't had a chance to look at it, I was doing the earth one

#

I'll try and get to it before I head to bed

clever wraith
#

ok

#

woohoo!

#

its on

gritty wind
#

I got a globe haha

clever wraith
#

something with people categorizing their images on unsplash

gritty wind
#

it is accurate lol

#

anyways, it turned out quite well

clever wraith
#

im happy with it

gritty wind
#

For future reference

#

Your PR stated closes issue 147 which didn't actually close the issue

#

It'd be something like closes 147 or resolves 147

clever wraith
#

@green oriole are you free/available to review my PR?

green oriole
#

I am not until this weekend

clever wraith
#

oh ok

green oriole
#

@clever wraith awesome job, thank you for the PR!

clever wraith
#

no worries

#

Thanks!

#

@clever wraith good job!

#

It was pretty fun!

#

thnks for the review too

#

no pron

#

prob*

gritty wind
#

@clever wraith merging the earth PR caused conflicts on the contants haha

clever wraith
#

haha

gritty wind
#

could you resolve them?

clever wraith
#

pardon?

#

how?

#

you mean the constants?

#

yea

gritty wind
#

You can try and merge master into your branch, which would make git prompt you to resolve

#

Or you can do it online

clever wraith
gritty wind
#

You need to go down to the area highlighted in red

#

and essentially remvove the >>>>>

#

Make sure the content of the file is correct, which in this case means adding the extra constant from master

clever wraith
#

sorry that it messed something up!

gritty wind
#

It's not your fault, it shouldn't have

#

git is just being

clever wraith
gritty wind
#

well, git

clever wraith
#

phew

#

git is intersting

gritty wind
#

Oh you commited the arrows themselves

#

Ok

#

everything else looks fine besides that

clever wraith
#

whhops

gritty wind
#

haha the github conflicts menu can be confusing

#

I don't think I've ever actually used it, just used my local setup

clever wraith
#

@clever wraith congrats on the merge!

#

thanks!

gritty wind
#

that's been changeloged

clever wraith
#

awesome!

#

congrats

gritty wind
#

hopefully we'll get a full unspash token soon so we can changelog earth

clever wraith
#

it takes 5-10 days is what ive seen

#

just a reminder that .earth is an alias, i just use it cause its shorter

gritty wind
#

The full command is .earth_image, yeah?

clever wraith
#

i believe so

patent pivot
#

.pyfact

dusky shoreBOT
#
Python Facts

If you type import antigravity in the Python REPL, you'll be directed to an xkcd comic about how easy Python is.

Suggestions

Suggest more facts here!

patent pivot
#

nice

#

is there a link to all the pyfacts

#

i'm going to clear the comments of the discussion and edit it in

clever wraith
#

.earth_photos @gritty wind

gritty wind
#

hmm it's in a text doc right now

clever wraith
#

oops

vale ibex
patent pivot
#

cheers

#

discussion updated & comments cleared

gritty wind
#

Alrighty, that's all I got in me for tonight. Grats to both of you, and keep up the good work 🥳

clever wraith
#

Night @gritty wind , and thanks!!!

short snow
#

how much time does pipenv run test take? Earlier when u used error out at RedisCache it took 30 seconds

#

but now when i fixed it

#

it is running from 20 minutes

brazen charm
#

Maybe a couple of minutes at worst

short snow
#

Hmmm, even if I re-run it, it takes the same amount of time

#

this only happened after i added id attribute to all MockMessage instances

#
......................................................................................................................./usr/lib/python3.8/unittest/mock.py:2030: RuntimeWarning: coroutine 'Infractions.apply_voice_ban.<locals>.action' was never awaited
Coroutine created at (most recent call last)
  File "/usr/lib/python3.8/unittest/async_case.py", line 88, in _callMaybeAsync
    return self._asyncioTestLoop.run_until_complete(fut)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1851, in _run_once
    handle._run()
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.8/unittest/async_case.py", line 102, in _asyncioLoopRunner
    ret = await awaitable
  File "/usr/lib/python3.8/unittest/mock.py", line 1342, in patched
    return await func(*newargs, **newkeywargs)
  File "/home/user/PycharmProjects/bot/tests/bot/exts/moderation/infraction/test_infractions.py", line 134, in test_voice_ban_mod_log_ignore
    self.assertIsNone(await self.cog.apply_voice_ban(self.ctx, self.user, "foobar"))
  File "/home/user/PycharmProjects/bot/bot/decorators.py", line 153, in wrapper
    await func(*args, **kwargs)
  File "/home/user/PycharmProjects/bot/bot/exts/moderation/infraction/infractions.py", line 366, in apply_voice_ban
    await self.apply_infraction(ctx, infraction, user, action())
  setattr(_type, entry, MagicProxy(entry, self))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
....................................................
``` it displays this and then stops
#

If add id=123 to line 553 and 533 of test_incidents.py it stops

#

otherwise it doesn't

short snow
#

give me a ping if anyone knows

short snow
#

it is gonna eat up your github action minutes

#

waitt, nvm, we have unlimittted minutes

#

but why is this happening

hardy gorge
#

Not sure

#

looks like it's hanging on the test suite

short snow
tawdry vapor
#

Find out which tests are the culprits

short snow
tawdry vapor
#

Ok I don't see anything obvious but I can try to look closer tomorrow

short snow
#

Alright thanks

balmy sparrow
#

Right now the docs command group when invoked without subcommand just calls the docs get subcommand right?

cold moon
#

Yes

hardy gorge
#

@short snow It's related to events loops and the RedisSession object

#

I'm not exactly sure what's going on yet, though

#

But, I have a work meeting starting in a few minutes

short snow
#

Yeah no hurries, just ping me when u get back so I can be here

balmy sparrow
#

Basically, just not having to type out the entire name

short snow
#

I think you can suggest this idea on the on-going doc improvents

#

something like !doc search

balmy sparrow
#

was hoping to catch numerlor here. i'd suggested something similar before

short snow
#

bot#1014

dusky shoreBOT
short snow
#

They are here 🙃

brazen charm
#

It has already been suggested, was asked yesterday #dev-contrib message. I'll probably take a look at it after 1014 is merged but there are more things to consider with the amount of inventories present in the bot

balmy sparrow
#

alright 👍

short snow
#

scal is faster than xith

#

👀

short snow
#

@hardy gorge free now?

hardy gorge
#

No, still working.

#

The issue is that the setup is creating another event loop while the RedisSession was originally initialised in a different loop.

#

It may seem like you're creating a new RedisSession here, but a RedisSession is a singleton to make sharing sessions within an application more easy

#

Another way of handling this would by using the asyncSetUp method of the test class

#

but it means that it would run before each test method

#

However, I've tested it, and it doesn't really come with all that much of a performance hit.

hardy gorge
#

There are two different testing modules that set up RedisSession in this way, right?

short snow
#

Yeah

#

Oh yes

clever wraith
#

@clever wraith first thing before developing, please do git pull 😄

short snow
#

Just do a reset kn the main branch

#

and then checkout from there

clever wraith
#

wat

short snow
#

If that’s what u mean

clever wraith
#

ok

short snow
#

So should use asyncSetUp of the test class? and how should i use it. Any parts of the doc i should refer to

vale ibex
#

Do you know how to fetch updates from an upstream origin?

clever wraith
#

I pulled last night, but there were 3 commits this morning

short snow
#

@vale ibex can u fix the merge conflicts on sir-lancebot#597

dusky shoreBOT
vale ibex
#

That should do it

vale ibex
#

@sleek steppe re you comment on the above PR, I've tried adding @commands.max_concurrency(1, wait=False) to the group command pfp_modify, but spamming .pfp_modify prideavatar 5 times still outputs all five

#

I send all 5 commands before the bot even responds to the first

clever wraith
#

@clever wraith the campaign's should be in yml, just a note

clever wraith
#

oh right

#

ok

#

we should do reactions

#

That's what I was thinking, yeah

#

b/c sending a message every time for the path would be bad

#

@hardy gorge does the bot have perms to manage reactions?

#

Yee

#

.help

#

The way sir lancebot does the .help command

#

Campaign's will go in bot/resources/evergreen/adventure_campaigns if that's ok

#

ok

#

so, first things first, what's the story line?

#

My idea was heading into the temple of(insert name here) to steal the holy python idol(just a statue of the python logo) kind of like an Indiana Jones thing

#

But you can write a different one if you want

#

I made support for multiple campaigns

#

@vale ibex what's with the huge number as your status?

vale ibex
#

I'll give you a hint, 0x at the start of a number denotes a hex value

clever wraith
#

That's one long hex value

#

What kinda color is that

vale ibex
#

Hex isn't just for colours, it's just another way to represent a number

#

Try and convert it to text

clever wraith
#

oh

#

@clever wraith if its ok we will change from yaml to json yaml is acting up

clever wraith
# vale ibex Try and convert it to text

Rick Astley's official music video for “Never Gonna Give You Up”
Listen to Rick Astley: https://RickAstley.lnk.to/_listenYD

Subscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/subscribeYD

Follow Rick Astley:
Facebook: https://RickAstley.lnk.to/followFI
Twitter: https://RickAstley.lnk.to/followTI
Instagram: https:/...

▶ Play video
vale ibex
#

😄

stable mountainBOT
#

Hey @clever wraith!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

clever wraith
#

oh

gritty wind
#

Usually the pastebin is the best choice

clever wraith
#

its too long for the pastebin somehow

gritty wind
#

huh, what are you uploading lol

clever wraith
gritty wind
#

I'm going to open that

#

but if its a rick roll on the other side

#

aww deleted

vale ibex
clever wraith
#

let's get started

#

can I have write access?

#

I sent a contribution invite

gritty wind
#

Did you guys get assigned to the issue yet btw?

#

Ah yes

#

good luck then :)

clever wraith
#

@clever wraith not yet walking home I'll let you know

clever wraith
clever wraith
gritty wind
#

lmao

clever wraith
#

Pastebin didn't like

#

@clever wraith i didn't get it, or I don't know how to check

sleek steppe
vale ibex
#

I'll give it a go on a fresh bot when I get a chance

sleek steppe
#

I'll try testing again

#

Tried again and it still works the exact same.

vale ibex
#

So I'm guessing i'm doing something wrong somewhere

clever wraith
#

Awesome

vale ibex
sleek steppe
#

oh I think I can see the problem because I didn't have invoke_without_command=True

#

Now when I set it to True the checks don't actually work

vale ibex
#

hmm

#

I can work with that

#

So the interesting thing with this, is that there's a top level group, with some commands, but it also contains a subgroup, with some commands itself

#

the concurrency at the top level group seems to impact the commands against it, but not the sub group

sleek steppe
#

Yeah but when it isn't True it actually runs the code inside the group plus the subcommand invoked.

#

I think, but let me try it out some more.

#

Yeah I think a custom check would be more suitable for this

cold island
obsidian patio
#

If you’re on Mac, there’s a “Text” menu where you can select Unicode characters

#

On other OSes, I don’t know about the specific tools available. However, you can always copy paste emojis into the code. They behave just like any regular Unicode characters

cold island
#

If I copy an emoji from Discord it will display it as the name between colons

obsidian patio
#

Yeah, discord is weird in that sense

#

Just put a \ before sending it on discord, and it should show up as the “actual” emoji

#

😄
\😄

cold island
#

ah, that worked, nice

obsidian patio
#

Perfect 😄

cold island
#

thanks

obsidian patio
#

Happy to help

fallen patrol
obsidian patio
#

Yeah, it’s not always consistent

short snow
#

That was a long PR.

hardy gorge
#

Hey @short snow, how's it going?

#

I have some time now

#

I had to finish some work yesterday and It was finished a little bit too late

short snow
#

Gimme sometime, lets say 10 minutes and i will get back to you. Kinda busy with some work

hardy gorge
#

No problem.

short snow
hardy gorge
#

Alright

#

Instead of what you're currently doing, we can also solve it in a different way

#

In your TestCase class, you add this:

#
class ...:
    async def flush(self):
        # Flush everything from the database to prevent carry-overs between tests
        with await self.session.pool as connection:
            await connection.flushall()

    async def asyncSetUp(self):
        self.session = RedisSession(use_fakeredis=True)
        await self.session.connect()
        await self.flush()

    async def asyncTearDown(self):
        await self.session.close()
balmy sparrow
#

you've named both the methods the same?

short snow
#

in TestIncidents?

#

shouldn't this be added to the setup? loop.run_until_complete(redis_session.connect())

tough imp
#

How will it behave with fakeredis in this case, do you get a fresh / clean cache for each test?

short snow
#

i think so, since when there was no redis session in test_incidents.py it was getting redis intialize something something errors

hardy gorge
hardy gorge
tough imp
#

That sounds like a good idea

#

oh to the package itself, even better

#

so this way the store would persist for the whole testing "session"?

hardy gorge
#

There's already one in there, but it's not packaged with the package

#

it's only in the test suite that the package itself uses

short snow
#

what if we could add a main class to the tests which would contain all these sessions like Bot class, won't that also simplify stuff?

short snow
#

shouldn't there be a if statement on the tear down function if the session is not initialized

hardy gorge
#

That would be an odd thing to happen, because the set up method should take care of that

short snow
hardy gorge
#

this is already a coroutine that gets run before each test method

short snow
hardy gorge
#

This is currently a solution that needs to be added to all test classes that rely on an actual (fake)redis backing

short snow
#

need some help with regex here

#
message_links = DISCORD_MESSAGE_LINK_RE.findall(str(message.content))
``` how i get it
#

@hardy gorge No class TestCase

#

u meant commandtestcase right?

hardy gorge
#

No, just the testcase in which you need it at the moment

#

I don't think we need to do this for every test we have that doesn't rely on Redis

#

Just in your class where your tests are currently having issues with Redis

tough imp
#

hmm, I think the way those tests are designed is that TestIncidents is a superclass that already provides some setUp methodology to the children

#

so you can put it there, but then you may be getting a redundant session that you won't use for each test

#

if you put it in the subclass, make sure that the superclass doesn't also have an asyncSetUp that you may have to call manually (because you'll be overriding it)

short snow
#

test incidents is child class of unittest.IsolatedAsyncioTestCase

#

oh now i get what u are doing

tough imp
#

yes, but it doesn't have any tests of its own, it's only to provide the setUp to the children

#

so that they don't have to duplicate

#

but looking at it, it doesn't have an async setup, so it should be safe to just add it where necessary to the children

#

in this specific case maybe we could make the redis async setup a mixin, I don't know

short snow
#

well mock_session is a unresolved attribute, not there in the parent class

hardy gorge
#

naming mistake

#

should be fixed now

short snow
#

time to run the test...

#

@hardy gorge 🎉 Works like a charm!

#

welp one problem @hardy gorge lemon_grimace

#

ah thought so, we needed thatn if statement

cold island
#

why should the lint test be ignored?

short snow
cold island
#

Looks like the other instance of this function in the codebase has a # noqa: N802

#

But you should lint before you push smh

short snow
#

i thought it wouldn't be required since it is a change in test/ dir

cold island
#

you should still write good code in tests 🙂

#

run pipenv run precommit and it just won't let you commit if it fails to lint

short snow
#

Ok PR is up for review! And i have commented on 1/2 of your comments i don't were needed zig

#

how do u add commit body with git (CLI tool, not gh)

patent pivot
#

git commit -m "title here" -m "body here"

cold island
#

Or just don't write a commit message and it'll prompt you in a text editor

patent pivot
hardy gorge
#

If you want, you can even configure git to use the text editor you want to use

short snow
#

or best, pycharm git commit tool 😄

hardy gorge
#

That;s what I use

#

It has a summary line length checker (50 chars) and hard warp commit message body (72 chars) options built in that you can enable

short snow
#

where can i enable them from?

obsidian patio
#

That's built in for my Vim installation as well, which is pretty nice

hardy gorge
#

File -> Settings
Version Control -> Commit -> Commit Message Inspection
Limit Body Line -> 72 chars + wrap when...
Limit Subject Line -> 50 chars

short snow
#

Do u need to approve once again if someone made changes?

gritty wind
#

not really, it still would've counted my approval

#

But its probably good practice if there have been major changes

#

Or if you don't approve, you could dismiss or rerequest review

#

because you technically signed off on the old code, not the new

short snow
#

So in joe’s case there is no need. Since it is not a big change

gritty wind
#

I did it anyways, it doesn't make much of a difference

short snow
#

No need now lol

gritty wind
#

Just more of a: I continue to approve of this

short snow
#

okie.

#

@vocal wolf sir lancebot repo needs label updates

vocal wolf
#

on the PRs?

brazen charm
patent pivot
#

yeah I go 72 for the title as well

patent pivot
vocal wolf
patent pivot
#

on some of our repos new changes will dismiss reviews

vocal wolf
#

This spacebar is going to be the end of me lol

#

gets jammed every sentence

short snow
gritty wind
#

where are you hitting it 👀

vocal wolf
#

on the right

gritty wind
vocal wolf
#

yes

vocal wolf
#

ty on update tho

short snow
#

Np!

vocal wolf
gritty wind
#

sir-lancebot#595

dusky shoreBOT
gritty wind
#

ah

#

we never figured out what to do with that PR

#

it's a style change

#

I don't know if it works or not

vocal wolf
#

into needs review it goes

gritty wind
#

Also tic tac toe is disabled now, so ¯_(ツ)_/¯

vocal wolf
#

why's that?

gritty wind
#

Blocking things and stuffs

vocal wolf
#

I see

#

@short snow everything has been updated. Bask in the glory that is, updated labels.

cosmic moat
vocal wolf
#

ty

cosmic moat
#

i've been without my dev environment for a couple weeks, which helps me procrastinate

short snow
#

@vocal wolf i will tak over sir-lancebot#485

dusky shoreBOT
short snow
#

i will take over the rest too but in a while

#

got one week holiday so free

exotic ember
#

@short snow if you comment on that PR I'll assign you to it

vocal wolf
#

@exotic ember u should assign yourself to the emoji cog pr

#

(probably, that is)

short snow
gritty wind
#

done

short snow
#

Cool thanks

brazen charm
#

Why do you think they're contradicting?

short snow
#

Well good first issue is something like a new contributor can start wokring on

#

but status planning is like it still planning and u can’t work on it

vale ibex
#

status:approved means you can start working on it

#

good first issue is just a difficulty gauge

brazen charm
#

It can still be a good first issue during planning, as new contribs can contribute to the discussion or push it forward

short snow
#

ah right

lofty parrot
#

hey
so basically the python help channels get their channels name changed
i wanted to know
whats the rate limit
with the discord.py api
who can I talk to eg staff

gritty wind
#

It’s not very high

#

We hit when we were smaller

#

It’s not viable at all right now

lofty parrot
#

kk

short snow
#

@exotic ember Reviewed!

short snow
#

@vocal wolf reset your branch to the main, and then push your commits to it

#

will fix the commits from different branch

vocal wolf
#

the thing is there was only one commit, I just needed to remove the unnecessary file. Also I thought the force pushes would combine into one.

#

I thought I saw that before, apparently I was wrong.

#

Yeah if I had multiple commits having each file this would be fine, but since there was only one commit, I could not do your suggestion.

#

I would probably just reset to a hash

#

and then do whatever

short snow
#

oh ok.

vocal wolf
#

The first force push was me combining all commits into one, and then I noticed the other file lol

#

was an "oh shit" moment

short snow
#

lol

tough imp
#

I think the contrib guide for bot may be missing a bit on the Redis host

#

I believe this should be set to redis when running with compose locally

gritty wind
#

I think hemlock was going to add that a couple days ago

#

If he hasn’t added it yet, I can add it in a little bit

hardy gorge
#

We could also make it an environment variable and give it the correct value in the compose

#

that means people won't have to configure anything

gritty wind
#

Works for me

left flume
#

I have a suggestion for @stable mountain

cold island
#

do tell

left flume
#

Sometimes people test out their code on the server using the eval command. This is sometimes very helpful and some people wish to save the result.
The bot already reacts with a 🗑to delete the message if the user doesn't want it anymore. My proposal is to make the bot react with '💾' as well. If users react with this emoji, the bot 'saves' the message aka DMs them the same message. This might allow users to save the results for the codes that they test out on this server.

vale ibex
#

We have something quite similar within @dusky shore with

#

.help bm

dusky shoreBOT
#
Command Help

.bookmark <target_message> [title=Bookmark]
Can also use: bm, pin

Send the author a link to target_message via DMs.

vale ibex
#

There has been talks in the past about extending this feature though

left flume
#

Not many know about this tho

#

It's literally on another bot

#

It isn't very easy to save the message in this way

#

If the option is provided with delete option users are more likely to use that

#

That just requires a reaction directly on the message. It doesn't even require a command so users can instantly and easily save their msgs.

#

This one is for the eval command

#

Since many users would like to save those msgs

cold island
#

What if the code snippet was written by someone else?

#

Which is likely to be the case

left flume
#

This is obviously done for the commands that you type

#

but if someone else uses !eval and you want to save their message we can innovate on this by allowing others to react with 💾 and then that particular message reaches their DMs too. just to make it better, we can also have the bot to react with ✅ and ❎ after another user reacts with 💾 so that the user can confirm if they want to save it or not...

gritty wind
#

I’m alright with the feature if it only allows the original author to get the DM

#

But I’m very, very, very wary of allowing anyone to do it

#

DM rate limits are

#

Not great

#

And we need DMs for more important things

left flume
#

it should only be used for your codes

#

its a much easier way to save your message instantly and its only supposed to be used for the eval command

#

and after the user reacts to the message with 💾 both the bots and the users reactions are removed so that the user cant misuse the feature

gritty wind
#

At the same time, why not just use sir-lancebot’s book mark commands, and not risk getting rate limited on the more important bot

#

Right now, I can’t think of anything on @stable mountain that would easily allow a user to rate limit it

left flume
#

how will it become rate limited?

gritty wind
#

You spam a bunch of evals in a bot command channel

#

Then go back and click on all of them really quickly

#

You cause the bot to effectively spam you, which discord won’t like

#

And suddenly, we are unable to do some moderation actions

left flume
#

You know how lancebot deletes all of its reactions after the inactivity timeout?

#

Python could do the same if the user plans to use the command again

gritty wind
#

We can definitely add safeguards

#

But

#

I don’t see why when we can shove it somewhere lower risk

left flume
#

its easily accessible if we include it there

#

its like running a code and then going and taking a screenshot of it and then saving it instead of just directly clicking on the save button in your IDE

gritty wind
#

Except

#

We already have another form of save button

#

So that’s not a fair comparison

#

I think the book mark command allows you to do it for anyone’s code, and can keep the main bot safer

left flume
#

alright

short snow
#

with dewification the site is basically gonna be static? With no login/bot api,since API is a separate project now?

obsidian patio
#

We’ll still have a django backend, but the site will be static from what I’m aware. The idea is to simplify things a lot

short snow
#

by things what do you mean?

obsidian patio
#

The way it works. Like, we don’t need authentication and a database, considering what we do on the site. New pages be added with PRs instead

short snow
#

is the api going to be connected to the site atleast to manage interactions between the bot and the api?

gritty wind
#

something like that

#

the important part is that the site and API will be different projects

patent pivot
#

yeah

#

django site will just be a glorified static site generator

cold island
#

@short snow do you still want bot#1423 ?

dusky shoreBOT
short snow
short snow
patent pivot
# short snow why not just use something like hugo then?

Ultimately the tech stack used will fall to the media team. Using Django still makes some sense since we can tightly control how content is displayed, for example loading in YAML and rendering the resources page from that.

We are using Hugo elsewhere in our stack so if it goes well it's something to think about, but I'm not sure Hugo is powerful enough for pythondiscord.com

#

We might at some point look into a Python-based solution that outputs static HTML because then we can do things like deploy previews which is a real nice way of working.

#

However, we've got several large rewrites on our hands at the moment, so I don't think we should complicate it when it can be avoided.

cold island
cold island
#

👀 not done yet

#

I might need to split the talentpool into two files

short snow
#

You can split talentpool into helper files

#

like the helpchannel

green oriole
#

oh god

#

Plz split it

timid sentinel
#

when you're reviewing some code on github does it not let you add a comment to parts of code that haven't been changed? It doesn't seem to be letting me

timid sentinel
#

that's seems pretty stupid ngl

short snow
#

But you can get the permalink of that line and then make a comment

#

That’s what i do

timid sentinel
#

cool, thanks

green oriole
#

I am not 100% sure why, but my client let me do that

#

But I think I'm the exception

#

For example

timid sentinel
#

It seems to let me go three lines up or three lines down from an edit, but I want to make a comment 4 lines down 😔

gritty wind
#

You'd need to use an external editor

green oriole
#

oh interesting

short snow
short snow
gritty wind
#

Don't know what to tell you

#

Are you on pro?

short snow
#

Yeah

gritty wind
#

It also won't let you do expanded sections like github, but it's still a little larger

short snow
#

when u review a pr, u get the + sign and then u can comment

#

but in non changed sections it doesn”t

timid sentinel
green oriole
#

What does the PR currently change?

timid sentinel
#

I guess it is fairly relevant, as the the changes from the PR are what has made it not that neat

#

my thoughts were a few small things like

  • The "Nomination ID" for inactive nominations should be after status and date like with active infractions.
  • "Actor", "Created", "Reason" would be a better order than "Actor", "Reason", "Created"
    but I don't know if it might be worth messing around with some bigger changes to the formatting to neaten it up
obsidian patio
#

I personally think getting the functionality should be the highest priority. If it’s easy to fix the styling, that would be great. Otherwise, I’d rather see it in a follow up PR

green oriole
timid sentinel
#

Makes sense, thanks. I'll approve the PR, mention them as optional changes, and I can always open a PR later if I want to change anything else.

cold island
glass pecan
#

yeah that embed is pree ugly, but your primary changes sound important too, so I'd focus on getting your primary stuff pushed first and have the formatting done later

#

it's defs a thing to do though, so might be worth adding as an issue ticket at the least so it's not forgotten

cold island
#

Yeah I'll keep the changes lean to not block the pr, and then we can bikeshed an exact ui

clever wraith
#

@patent pivot how do you feel about a tag for the humanize library?

patent pivot
#

not sure what it is

vocal wolf
#

!pypi humanize

stable mountainBOT
#
Author

Jason Moiron

Requires Python

=3.6

Summary

Python humanize utilities

License

MIT

vocal wolf
#

@patent pivot it's like arrow.humanize() but for more stuff

patent pivot
#

ah

clever wraith
celest charm
#

seems like there's a free option for public repos

#

TL;DR it's a remote editor that sets up environment for you

gritty wind
#

There was an issue opened yesterday for providing support for it

#

I'm just unsure of adding editor specific support because

#

it's opening the floodgates slightly

cold moon
#

I use GitPod for my own repos. Can't use for PyDis stuff, because not enough permissions.

cold island
#

What's the max characters in a message a bot can send, 2000?

obsidian patio
#

Yeah, I think that’s it for regular messages

#

Embeds have some special limits as well

clever wraith
#

@patent pivot what do u think of the tag idea?

patent pivot
#

fine by me

clever wraith
#

ok

cold island
#

Do we have a function or something for splitting text across multiple messages and posting it?

obsidian patio
#

We have a paginator, if that’s what you’re looking for, like in the help command

cold island
#

Hmm I'm looking for something without an embed, but I'll check how the split works there

obsidian patio
#

Alright. I don’t know if we have something for splitting it up, that doesn’t use an embed. Sounds like a good idea to check the source code

cold island
#

yeah, thanks for the suggestion

#

textwrap.wrap() seems promising

clever wraith
#

Me*

obsidian patio
#

Yeah, and I’m getting more and more convinced that we should have a hidden gems video on Textwrap

vocal prairie
#

That's not a bad idea.

vale ibex
#

Yea it's so useful 😀

#

Learned about it myself via a lancebot pr I reviewed recently 😅

short snow
#

How does reddit bot automatically post the embeds to other channels, i added announcement option to my dev-log channel on a test server and it didn't happen. Like i get share with followers option everytime i need to do it manually

short snow
subtle kraken
#

webhook you don't send to?

#

still same method

#

just look for the message in on_message and figure out if it is in the channel, is the message you want to publish etc @short snow

short snow
#

oh alright. thanks

tawdry vapor
#

I need some help investigating some relatively-advanced Docker stuff

#

I ran into a roadblock and spent hours investigating it but couldn't find an explanation to the behaviour I was observing.

vocal wolf
#

Is it possible to store objects within the Redis cache?

#

Such as a message or channel object

tawdry vapor
#

No. You have to serialise them.

short snow
#

they are only locked to certain data types

#

like the id of them the message in your case can be stored

vocal wolf
#

right

tawdry vapor
#
# Pipenv installs to the default user site since PIP_USER is set.
RUN pipenv install --deploy --system

# Install numpy when in dev mode; one of the unit tests needs it.
RUN if [ -n "${DEV}" ]; \
    then \
        pipenv install --deploy --system --dev \
        && PYTHONUSERBASE=/snekbox/user_base pip install numpy~=1.19; \
    fi
#

Where DEV is a build arg passed to Docker. If I build with it and then without it (or vice versa), it will always run the first command again instead of using the layer from the previous build.

#

There isn't enough documentation on how exactly buildx determines whether a layer is valid or not. I thought it just checked if the command was the same.

#

I tried using a tool to inspect the layers and they came up as 0 bytes on this specific step for some reason??? I don't really remember. If anyone has any leads on this, let me know.

hardy gorge
#

I have no idea, but I can discuss it with someone from work who knows way more about docker than I do. I'm just not sure how soon I'll be able to talk to them.

tawdry vapor
#

Thanks, I appreciate that. It's not urgent, considering I've sat on this for like a month already.

vocal wolf
#

What would be the best way of serializing a discord.Message object for storage within a Redis cache?

#

pickle?

tawdry vapor
#

They aren't pickleable IIRC

#

But the question is, why must you do this?

vocal wolf
#

Let me get the context for this

tawdry vapor
hardy gorge
tawdry vapor
#

Notice how some parts of venv are cached, but as soon as it reaches step 3, it refuses to keep using it despite the previous build creating a layer for it.

hardy gorge
#

@tawdry vapor Did you try moving the ARG declaration to between the two RUN commands?

#

ARG variables are not persisted into the built image as ENV variables are. However, ARG variables do impact the build cache in similar ways. If a Dockerfile defines an ARG variable whose value is different from a previous build, then a “cache miss” occurs upon its first usage, not its definition.** In particular, all RUN instructions following an ARG instruction use the ARG variable implicitly (as an environment variable),** thus can cause a cache miss. All predefined ARG variables are exempt from caching unless there is a matching ARG statement in the Dockerfile.

tawdry vapor
#

oh shit

#

Man that's such a huge gotcha

#

fuck that

#

I'm gonna try it

hardy gorge
#

I was looking at your file and that was my guess, because Docker can't know if a command run using RUN uses an environment variable

#

this seems to back it up

#

but I can't test it here on my work machine

tawdry vapor
#

Yeah, I forgot they are implicitly environment variables too.

#

Thanks, I knew I needed a 2nd pair of eyes on this.

#

Waiting for the build...

#

Yes, that fixed it.

#

Good catch

vocal wolf
#

Ignore what's going on in #dev-log, my branch is fine lol

tawdry vapor
#

Hey are you still gonna provide context or did you figure it out?

vocal wolf
#

I will be providing context, I just got sidetracked with squashing

#

@tawdry vapor the current PR that I'm working on is https://github.com/python-discord/bot/pull/1414. It adds a message at the bottom of #❓|how-to-get-help, showing the currently available help channels. kwzrd suggested that I add Redis caching so I don't have to set the variables every time on startup, since they'd instead be ready for me in the cache.

The current problem I'm facing is here:
https://github.com/python-discord/bot/blob/71ea5a6c9e6f3f4c09ee1b4b26fafb8e31e9ffbf/bot/exts/help_channels/_cog.py#L506-L511

Since self.how_to_get_help will still be an ID after the first block, the .history method will throw AttributeError. I thought it may just be better to instead replacing some API calls with putting the objects directly into the cache instead.

hardy gorge
#

@vocal wolf If you know the content, the channel ID, and the message ID, you should be able to edit the message directly

vocal wolf
#

oh wait, channel ID

hardy gorge
#

No, you're using a message object to edit the message there by locating it

#

If you're going to keep track of the message ID of the last message posted by the bot (but think about what you're going to do if this cache is somehow stale or incorrect) and the channel ID (which is basically what you're doing if you were to cache an entire message object), you can just store the channel ID + message ID.

#

And then use the underlying API call to edit the message.

short snow
#

you can set the channel id, and then get the channel id while editing the message

vocal wolf
#

self.bot.http.edit_message(channel_id, message_id, content=fresh_content)

hardy gorge
#

You don't need an entire message object as a wrapper

vocal wolf
#

I completely looked over this in kwzrd's review, sorry about that

#

I see what I must do, thank you @hardy gorge!

#

Wow this simplifies everything by a great amount

#

Redis caching is something else

short snow
#

yeah, it is really good

#

how about adding this to .pl

short snow
#

and this

vocal wolf
short snow
#
bot_1       | ModuleNotFoundError: No module named 'pythonjsonlogger'
#

uhh even when i did pipenv install

vocal wolf
#

Happens to me as well. pipenv --rm then pipenv install only sometimes resolves it.

short snow
#
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.

You are attempting to remove a virtualenv that Pipenv did not create. Aborting.
Aborted!
#

did pipenv install pythonjsonlogger as a temporary solution

#

uhhh

#
Error:  An error occurred while installing pythonjsonlogger!
Error text: Looking in indexes: https://pypi.python.org/simple

ERROR: Could not find a version that satisfies the requirement pythonjsonlogger
ERROR: No matching distribution found for pythonjsonlogger
✘ Installation Failed 
exotic ember
#

!pypi python-json-logger

stable mountainBOT
#
Author

Zakaria Zajac

Requires Python

=3.4

Summary

A python library adding a json log formatter

License

BSD

exotic ember
#

you shouldn't have to install manually though

short snow
#

doesn't work with install

exotic ember
short snow
#

am using pipenv, venv made by pycharm when u slect that, and i am inside (bot)

exotic ember
#

are you sure Pycharm is using pipenv when creating the virtual environment? you should be able to check it in the project settings

short snow
#

it doesn't seem to work with docker, even after installing manually

#

i can screen share in dms to show you if u want

exotic ember
#

sure

short snow
vale ibex
#

try docker-compose up --build

short snow
#

worked!

#

kosa helped m out in dms

vocal wolf
#

noice!

vale ibex
#

🎉

short snow
#

(did what you had suggested)

#

@vocal wolf looks like there is one problem

brazen charm
#

It shouldn't be in the same category

short snow
#

oh yes, my bad

#

whoops, kosa already mentioned one change

glass pecan
#

@short snow hey, you mentioned you tested emoji cog, correct?

short snow
#

yes

glass pecan
#

would you be able to have a quick squiz via mobile client on the output of a certain command for me?

short snow
#

ok

#

one minute

glass pecan
#

cheers. it's when you do !emoji count asd

#

and if it outputs the invalid embed

#

it should show a list of valid categories

short snow
#

Oh, i have alread tested that with jasonnn instead of asd

#

Yeah it works

#

it shows the list of categories

glass pecan
#

yep. does it render correct on the mobile client?

short snow
#

not sure about that, do u have a mobile rn? i can quickly send u a invite

glass pecan
#

i do

#

and sure

#

feel free to dm me

#

confirmed a bug but i'm thinking it shouldn't block the PR tbh, especially as the bug is hardly noticeable + it's applicable across many of our command outputs

#

i'll make an issue ticket specifically for the bug to be addressed as a separate thing

short snow
#

lol @obsidian patio

obsidian patio
#

What's up?

short snow
#

it is dismissed nvm

#

i thought u commented

#

and then it got merged the same moment

obsidian patio
#

Ah, no

vocal wolf
short snow
#

Exams are ending tomorow, would try to do them.

#

did u mention the changes in 1414?

vocal wolf
#

Things were changed, yes.

short snow
#

my idea is to use extract.replace(title, ""), is that fine?

cosmic moat
#

@vocal wolf my computer should be good again today, if i have time, i'll finish it tonight

#

i left a message for fix last saturday

#

i don't know if they read it yet

#

i'll check that when i work on this

left flume
#

I have a suggestion

#

You can add an embed visualizer command

#

so that people can see how embeds look like

#

Title, description, colour etc. can all be separated using a |

green oriole
#

We do have an !embed command, but we limit it to mods to avoid users faking to be the bot

left flume
#

oh...

#

okay

subtle kraken
#

yeah I imagine main use people would have from it is to try and break our rules with it by things such as advertising their servers and what not

#

there already are way better UI/UX wise tools online for that either way

left flume
#

I see

#

in that case, why do you guys have the eval command?

subtle kraken
#

for evaluation of python code

left flume
#

There are many IDE's that users can use instead, even on web

subtle kraken
#

not for just making bot send plain text/embed

#

it is useful for help sessions

#

to show expected/result of a code snippet

left flume
#

Ye makes sense

green oriole
#

It is easier in this case to have the output directly in Discord

#

Also we do run the filters on the snekbox output

left flume
#

I see

subtle kraken
#

theres also is a big output difference between eval and embed

#

!embed most people might not even notice who invoked the command, especially if it was deleted

stable mountainBOT
#

most people might not even notice who invoked the command, especially if it was deleted

subtle kraken
#

it can easily be taken out of context

left flume
#

cool

#

hmm

#

Maybe you can add a text

#

Add a text just like how you do for the eval command

#

@User Here is your embed

#

anything that goes against the rules would be moderated I guess

subtle kraken
#

generally no bots have an open-to-everyone command that allows people to send text/embeds via command

#

other thing being, it isn't really a thing that'd be much of a use outside of projects such as discord.py bot

left flume
#

oh right

#

I understand

gritty wind
#

Honestly there are ways to get around most of these issues, but whatever we make will just be a discounted version of the embed visualizer sites

#

We probably won’t give it full customization like color, title, fields etc, because it’ll be clunky to use over IRC

left flume
#

why dont you add an embed colour to all of @stable mountain's embeds?

short snow
obsidian patio
#

Adding some (maybe blurple) default color would definitely be nice, but I think that would be best implemented using something like bot#1348, so we keep things DRY

dusky shoreBOT