#dev-contrib
1 messages ยท Page 43 of 1
the upvote emoji is bugging me so much
which one would you suggest
is there a rule it needs to be white ?
I guess you could use the official reddit upvote colour for it
are you only fetching the one with upvotes > 0 ?
I also feel like the icons are a bit too big, but it looks pretty good!
yes it has to be grey @clever wraith
can we have a grey background that of a embed , so in light mode it doesn't feel hard to notice
and I am fetching random posts (5 posts out of top 25)
I can barely notice this
AG i said I applied the new colour only to image emoji
Only the picture icon was the example
can you pass me that emoji ?
yeah that one is what i was talking like
is hex code same as HTML notation?
Yeah
Okay then Im having a tough time
GIMP uses RGB values?
see the hex code, I will share one more pic
colour not changed
I applied the same hex code
Applied using what tool?
colourize
So you clicked on the colour box, entered the hex code into the relevant box, and hit enter?
yes
no
this box
yes, so you hit OK
I hit a million times
Not even HSV :D
But you have a white image, so I don't think it'll change anything
7e8989 is the html notation
nop it dint change a thing
There's an exposure tool
Use that one to turn the exposure and targetted black down to minimum
so you get a black image
just pass it to me
i will do it for u
then colourize it
Can't add a HSV filter?
select
color range
invert
fill
delete layer
that all you have to do
I don't think we want cutout emojis
what do you mean by cutout emojis?
ooh
And it won't work anyway, the emoji goes to the edge of the image
It's the shape of Reddit's actual upvote arrow
It is? Well
The proportions aren't the same though
Just use the colour tools to get yourself a black image
@clever wraith you're doing the exact opposite of what he wants
I think i need to crop it more
Or at least invert it
I have an idea
- Don't crop it
give me 2min
- The white should be grey
Well you deleted it
no i did't
yeah, you did
no i did'nt
you've made a cutout
you set the background to grey and deleted the white emote you were given
lol
No, that has the same problem
ohhh so you want me to convert white to grey
ahhhh
yes, it needs to be an exactly square 512
It is quite big for an emoji, isn't it?
Future-proofing
lol
Hey man, we wired our house with cat 7, never going to need to replace that in my lifetime
like this ?
Yes, that's it
Teamwork \o/
\o/
like this ?
put everything in google drive folder or dropbox folder and send it
Now you're getting it
yes yes thats the way
like this ?
like this ?
yeaa
GIMP
what!
maybe I messed up somewhere
anything more ?
the arrow
Hey @clever wraith!
It looks like you tried to attach a file type that we do not allow. We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
lol
ahhhhhh
That arrow looks a bit thin
Try using this one
~~https://fontawesome.com/icons/arrow-alt-up?style=solid~~ Don't, it's pro
It's a bit more rounded
oh wait, this is a pro icon
orangered
we need grey
how about this
right, but we're using font-awesome icons, so it does make sense to keep it consistent
why are we using it ?
cuz they are free
Because we are too lazy to make all the icons ourselves
lets decide fast
?
is it too small?
lol f1re
lol
is that the caret up and the arrow base?
to be clear we can use pro icons
the problem is, they can't go on git
the mario lil enemies
they wont go on git
hmm
cuz we will add them here
well, we do have 100 seats I suppose
in the server
they can't be uploaded here either
why
so your telling me that i cant do the following:
upvote_emoji = self.bot.get_emoji(674087977001025557)
comment_emoji = self.bot.get_emoji(674087977453879296)
user_emoji = self.bot.get_emoji(674087978167042121)
text_emoji = self.bot.get_emoji(674087976875327541)
video_emoji = self.bot.get_emoji(674087977126854659)
image_emoji = self.bot.get_emoji(674594916655169536)
reddit_emoji = self.bot.get_emoji(674087978628284417)```
You can use the free ones
I own them ;-; actually
And we can use the pro ones, but they have to be uploaded to the emoji server so that only the staff and bot can use them
@molten bough we selected all free ones, so we can upload them here, right?
if that's what you want to do, I can make you a grey arrow
but look at alternatives first
can i get entry in emoji server ?
i wanna see all emojis used
I think the wider one you posted would work fine
nooo, we need a body for the arrow
See how it looks I guess
reddit used it at some point
okay send it
you have it
that was this one
it's free
not that one
caret-up
okay
ok @eternal owl give me the 512 one i will convert it for you
on it
and why i still don't have contributors role , Rohan have one :C
Oh yeah, you did contribute a bot feature, didn't you
yeah i did
- bug fixes ,
new plan also
I think this one actually could work okay
noice
oh, you murdered the transparency
You need to use the colourise tool
it's in the colour menu, at the bottom
I think its ok
its gonna be too small to see
not at all with gimp
don't make me try to start gimp on this 4GiB laptop
I use it on 8 GiB PC
I'm running chrome
ahh make sense now
Anyway, it's probably OK, but you should do it properly
Take the black one, colorize, that'll do it
ignore the sliders, you just have to set the colour
see how it selects it
the colorize tool doesn't need a selection either
can we allign those , by adding spaces ?
got it
Itโs not going to work, itโs not a fixed width font
add fake spaces
to mimic character
I will need to copy the code from my dev bot
I donโt see how fake spaces changes anything
make sure to lint it then
wtf u just changed ur name
xDDDD
lol, rohan
seems like i need to take a dive in my old code
uhh why did'nt i used a function here
You can do it with spaces, but as ELA says, it's not a fixed-width font, it won't work unless the spaces are the same width as all of the numbers
{:<{}s}'.format(member.name, 30) this adds dummy space
replace member.name with whatever variable
try it still
if it works then its <3
and 2 I don't think you can just add spaces in an inline code block
it should, it worked with python3.7
I think they changed that; I wonder if it renders the same on each platform
It used to strip leading/trailing whitespace
there is a good issue opened on @stable mountain git by me for that
@hardy gorge if you talking about that
I was only talking about Discord stripping whitespace in inline blocks of code
Not sure what you are talking about
As talked in https://discordapp.com/channels/267624335836053506/635950537262759947/639484028012986369 Bot strips out /n lines example can be def reformat_(a): len_a = 8 - len(a) a = " &...
Ah, that's a different issue; that's not related to Discord
I think Ela had a good point there
its not gonna work , i just tried it
its more of a font you use thing
previouse i used a blocky font that's why it worked for me previously
also @eternal owl you are missing a space after bullets
1.hello
should be
- hello
Im geting syntax error
post_stats += (
"{:<{}s}".format(votes, 20)
"{:<{}s}".format(comments, 20)
'\u2002{user_emoji}\u2002{post["data"]["author"]}\n'
)```
votes = f'{upvote_emoji}{post["data"]["ups"]}' comments = f'{comment_emoji}\u2002{ post["data"]["num_comments"]}'
"{:<{}s}".format(comments, 20) ^ SyntaxError: invalid syntax
You forgot a comma at the end of the second line
or line escape
You forgot to add () around the string
Implicit continuation relies it here
Can you share the code with proper formatting?
In a code block
I think we should scratch the idea here
its not gonna work either way
votes = f'{upvote_emoji}{post["data"]["ups"]}'
comments = f'{comment_emoji}\u2002{ post["data"]["num_comments"]}'
post_stats += (
"{:<{}s}".format(votes, 20) +
"{:<{}s}".format(comments, 20) +
f'\u2002{user_emoji}\u2002{post["data"]["author"]}\n'
)```
@hardy gorge
Looks fine
!e
post_stats = ""
user_emoji = "c"
upvote_emoji = "a"
comment_emoji = "b"
post = {"data": {"ups": 100, "num_comments": 10, "author": "Ves"}}
votes = f'{upvote_emoji}{post["data"]["ups"]}'
comments = f'{comment_emoji}\u2002{ post["data"]["num_comments"]}'
post_stats += (
"{:<{}s}".format(votes, 20) +
"{:<{}s}".format(comments, 20) +
f'\u2002{user_emoji}\u2002{post["data"]["author"]}\n'
)
print(post_stats)
@hardy gorge :white_check_mark: Your eval job has completed with return code 0.
a100 bโ10 โcโVes
he added + now
!e
post_stats = ""
user_emoji = "c"
upvote_emoji = "a"
comment_emoji = "b"
post = {"data": {"ups": 100, "num_comments": 10, "author": "Ves"}}
votes = f'{upvote_emoji}{post["data"]["ups"]}'
comments = f'{comment_emoji}\u2002{ post["data"]["num_comments"]}'
post_stats += (
f"{votes:<20s}"
f"{comments:<20s}"
f'\u2002{user_emoji}\u2002{post["data"]["author"]}\n'
)
print(post_stats)
@hardy gorge :white_check_mark: Your eval job has completed with return code 0.
a100 bโ10 โcโVes
well actully its not working
It will probably not line up nicely, no
for reason specified
Im out for dinner
its 7:30
who eats dinner this quick
I sleep at 10
What you should do is test with the emojis, get a few screenshots, and add them to your pull request comment
Since they're all free, you could upload them to your comment too, if that's your deal
Okay
AG can send the emojis zip also if needed
@hardy gorge is it fine if i remove that space in the bemyvalentine command?
Uninstall?
wait you are taking everything from buttons and then removing buttons lib ?
no
Im using seasonalbots paginator
Im not using buttons anymore
indentation contains tabs
how to solve this in vs code
search what and replace with?
Replace a tab with four spaces
how to enter a tab in the find bar, cuz when i press tab, it jumps to the next field
okay
my linting failed because of this
Flake8 failed to load plugin "TYP" due to No module named 'typed_ast'.
Have you tried to sync your pipenv environment?
It think its been quite a while I have synced with the master branch itself ๐
should I click on update branch?
You canโt use 3.8 with an old lock
And you shouldnโt be relocking with 3.8 if the project is still on 3.7
shit
_English Language Arts? _
what to do now
it said locking when i uninstalled buttons
You can do pipenv update directly too
should I update my branch?
Yes
okay
Since reviewers shouldn't have to re-lock the environment themselves
okay now, tell me what should I do
i updated branch
should i get 3.7?
I do have 3.7.5
I think you should be able to checkout the lockfile from master to have a version that's equal to the one that we're using. Make sure your master is up to date, though. I'm not sure about the Python version; doesn't the pipfile state that we're using 3.7 for the repo?
yes it does
How did you create it with 3.8?
but i used 3.8 ๐
i forced it to ๐
cuz i dint have 3.7 that time
I can delete the env and make new one
locked with 3.7 and pushed
omg it passed
it passed in github but Im geting Flake8 failed to load plugin "TYP" due to No module named 'typed_ast' in my local machine when I run pipenv run lint
oki
Isn't it locked using ~=?
You shouldn't have to commit a different lockfile than the old one, since you did not change any of the dependencies
Not sure, @molten bough, I need to look into it
i had installed buttons
but no longer, right?
nop
The implication is that updates are compatible, but I know discord.py as a project is weird
because you relocked
okay
Ah, it's pinned "incorrectly" to the minor version
git checkout --force master -- Pipfile Pipfile.lock do the trick
Ah okay
make sure master is updated
Oh right, yeah, you can do that I guess
should i be on master?
good
Is the master of your fork up to date?
nop
When'd you make the fork?
but i clicked on update branch in the github page and pulled
yeah, that'd do it
after that, do what akarys said
You shouldn't need to
you know what to do, then
When you create your environment from the Pipfile, how do you do it?
the very first time i did pipenv --python 3.8
but now im using 3.7
i deleted the env and made a new one
for the 3.7 one?
yeah
Okay, for the next time, use pipenv sync --dev
okay
It will install the environment according to what's in the Pipfile.lock instead of installing/locking from the Pipfile
okay cool
Can one of you beautiful people review this https://github.com/python-discord/snekbox/pull/55
I know it's kind of scary
I don't know what any of these words mean ๐ฆ
Thanks for taking a look anyway
I did try to review it but it's completely chinese to me
at the same time, if nobody here is capable of reviewing this and the only risk of a bad merge is that !eval might break, then we should just merge it. the point of a review process is to increase code quality and for us to learn from one another, and if snekbox reviews can't accomplish those goals then snekbox reviews are pointless.
letting them sit and cause frustration for months for no real gain just seems silly to me
I understand more or less the PR, but I mean, what can I say about it, mark have a way higher understanding of what's going on here than probably everyone here
I had the silly idea of looping through all the mount point and remounting them in RO, so if we ever add a new mount point, it will be in RO, is it a silly idea, or it is feasible?
I don't think going that far is necessary
There is also an pseudo issue with /tmp being writable, but it cleared after each eval, is it really a problem?
Could someone fill up the memory or something by writing to it?
No, it is emptied after each eval
Couldn't they fill it during the eval?
I tried, the process just exit and empty the directory
I'm getting a few of these:
pdsnk_1 | /snekbox/.venv/lib/python3.8/os.py:1021: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
pdsnk_1 | return io.open(fd, *args, **kwargs)
pdsnk_1 | /snekbox/.venv/lib/python3.8/os.py:1021: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
pdsnk_1 | return io.open(fd, *args, **kwargs)
pdsnk_1 | 2020-02-05 19:35:01,065 | 14 | snekbox.nsjail | WARNING | Failed to set the memory swap limit for the cgroup. This is probably because CONFIG_MEMCG_SWAP or CONFIG_MEMCG_SWAP_ENABLED is unset. Please ensure swap memory is disabled on the system.
pdsnk_1 | 2020-02-05 19:35:01,147 | 15 | snekbox.nsjail | WARNING | Failed to set the memory swap limit for the cgroup. This is probably because CONFIG_MEMCG_SWAP or CONFIG_MEMCG_SWAP_ENABLED is unset. Please ensure swap memory is disabled on the system
am I doing something wrong? can I ignore it?
You will have to comment it out to ignore it
But if mem swap isn't disabled then the memory limits will not work properly so keep that in mind
Yes
Yeah, I've been googling a bit. Okay, thanks. I'll keep it in mind.
ONFIG_MEMCG_SWAP or CONFIG_MEMCG_SWAP_ENABLED are kernel config options
If they are disabled then then the cgroup can't be set
so the warning basically says "well I tried to do it but I can't so you have to ensure this on your own"
it's getting there ๐ฎ
Okay, I just did some naive tests locally (like trying to write to each and every mount/directory I could find) and I couldn't find anything
If I run that against the live version, I get two writeable directories in /tmp that obviously don't exist in the PR version
Thanks for testing it
you can personally ping me for any review you have @tawdry vapor and ill do my very best to get it done
It's annoying that the field in the DB is called "avatar_hash" but discord.py calls it "avatar"
Can anyone think of why this was implemented this way? It updates all fields instead of just in_guild. The rest of the fields should already be up-to-date because they are caught by on_member_update and on_user_update. https://github.com/python-discord/bot/blob/master/bot/cogs/sync/cog.py#L139
I'm not quite sure. All of the original update functions were complete PUT replacements originally I think.
I'll try to rewrite it and see if it still works
Can I have one more review on this PR https://github.com/python-discord/bot/pull/542 I believe it is good to be merged until we have further plans on doing this from the API / site
Reviewing in progress ^^
What on earth should I put in the json entry of the tag?
I tried null and {}
not frustrating at all
I just add it via command lol
Is there an add command?
The json format is just a very simple structure with only a "description" field, by the way
This is the pep8 tag's embed field:
{"description": "**PEP 8** is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like `flake8` to verify that the code they\\'re writing complies with the style guide.\n\nYou can find the PEP 8 document [here](https://www.python.org/dev/peps/pep-0008)."}
Okay, I merged it
Let's see if !fstr can pull f-strings
Finally codeblock and codeblocks will both work
Why is there a json object for tags, by the way?
Because, in principle, it supports storing the entire json-representation of an embed in a flexible manner; not just the description
@gusty sonnet oh man, fuzzy tags is amazing
thank you for making that
you're my favorite contrib today
Totally not because I keep forgetting it's codeblock or codeblocks lol
everyone forgets that
now everyone will think they remembered it no matter what they type
yes
shira is our ego booster
I've got a great memory, the greatest! In fact, as far as I can remember, I've got the greatest memory of everyone!
Same with f-strings, is there a s? is there a dash? Nobody know
We've got memory, we've got the best memory
That is a super handy feature though, gg
Calling vs. Referencing functions
When assigning a new name to a function, storing it in a container, or passing it as an argument, a common mistake made is to call the function. Instead of getting the actual function, you'll get its return value.
In Python you can treat function names just like any other variable. Assume there was a function called now that returns the current time. If you did x = now(), the current time would be assigned to x, but if you did x = now, the function now itself would be assigned to x. x and now would both equally reference the function.
Examples
# assigning new name
def foo():
return 'bar'
def spam():
return 'eggs'
baz = foo
baz() # returns 'bar'
ham = spam
ham() # returns 'eggs'
# storing in container
import math
functions = [math.sqrt, math.factorial, math.log]
functions[0](25) # returns 5.0
# the above equivalent to math.sqrt(25)
# passing as argument
class C:
builtin_open = staticmethod(open)
# open function is passed
# to the staticmethod class
haha
No one would ever know that!
I should raise the bar up to 70 instead of leaving it hanging at 60 lol
!no dm please
Can I send you a private message?
No. We do not provide one-on-one tutoring - you can hire someone locally if you really need that. We also prefer that questions are answered in a public channel as it means that everyone else present is able to learn from them. If you're working with code that you are unable to disclose for any reason, you should try to make your question more general and write a separate, small piece of code to illustrate your problem.
This will work though, so, I guess it's a positive effect?
oh nice
:>
!no dm have mercy
Can I send you a private message?
No. We do not provide one-on-one tutoring - you can hire someone locally if you really need that. We also prefer that questions are answered in a public channel as it means that everyone else present is able to learn from them. If you're working with code that you are unable to disclose for any reason, you should try to make your question more general and write a separate, small piece of code to illustrate your problem.
Haha
@gusty sonnet adding text to the end of tags always worked
!resources has a list of resources you could use to learn Python
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Strangely, !hepl doesnโt match !repl
Can I send you a private message?
No. We do not provide one-on-one tutoring - you can hire someone locally if you really need that. We also prefer that questions are answered in a public channel as it means that everyone else present is able to learn from them. If you're working with code that you are unable to disclose for any reason, you should try to make your question more general and write a separate, small piece of code to illustrate your problem.
haha
Aaah
that's a great response
It starts from the start, it assumes you shorthand starting from the start of each words
"Can I DM you?" "!no"
so rep for repl works, hepl for repl nope
I feel like hepl would be more likely to be corrected to help
if __name__ == '__main__'
This is a statement that is only true if the module (your source code) it appears in is being run directly, as opposed to being imported into another module. When you run your module, the __name__ special variable is automatically set to the string '__main__'. Conversely, when you import that same module into a different one, and run that, __name__ is instead set to the filename of your module minus the .py extension.
Example
# foo.py
print('spam')
if __name__ == '__main__':
print('eggs')
If you run the above module foo.py directly, both 'spam'and 'eggs' will be printed. Now consider this next example:
# bar.py
import foo
If you run this module named bar.py, it will execute the code in foo.py. First it will print 'spam', and then the if statement will fail, because __name__ will now be the string 'foo'.
Why would I do this?
โข Your module is a library, but also has a special case where it can be run directly
โข Your module is a library and you want to safeguard it against people running it directly (like what pip does)
โข Your module is the main program, but has unit tests and the testing framework works by importing your module, and you want to avoid having your main code run during the test
There we go
It doesnโt correct command names
It doesnt yet, I mean, I can do a quick check for that via the actual fuzzy lib
And do some serious guess work
I was testing if typos can trigeger tags instead of command
haha, well yes I can make an issue for that for now, I'll work on it later
Fuzzy matching for commands, yeah
I don't want to have that
Not on @stable mountain at least
Maybe for an help embed "did you mean?"
Yeah, we should ignore certain commands, or it can be quite dangerous, but what is the chance of you typing a command that could be interpreted as a moderation command followed by a valid user id? (Plus the reason is mandatory, isnโt it?)
but not for automatic invocation
I could live with did you mean
I could live with that provided it gave you a quick way to confirm
No, I will only do it for tags
A small enhancement for the fuzzy tag searching when there is absolutely no hits whatsoever
fuzzy tags is okay, but for any other command it should just say "!bna not recognized as valid command, did you mean !ban?"
I'd rather have to type out the same command 20 times than to have it go horribly wrong once with core features
So, a suggestion is fine, but I don't want auto-invocation/auto-correction
Hmm, that's actually a nice idea to suggest commands when typos
maybe even a copypaste friendly suggestion?
yes, that would be the best of both worlds
That'd be nice, yeah
Actually we donโt even have an error embed when the function isnโt recognized for now
Well discord.py does not have that actually
!muet not recognized as a valid command. Did you mean to type !mute @gdude 72H please stop talking about your feet?
Either it's a command or note
hahaha
But since we're watching on_message it is possible to check if it's a valid command
And boy that gonna be fun
generating random arguments to make it looks real basing on the arguments?
I'm in
no random arguments, what do you mean
Canโt you just suggest the command if the fuzzy search failed?
You could just invoke wouldnโt work with a custom message!help <command>
Like when we do !muet it goes Hmm, something is wrong, are you, by any chances, trying to, uhm, !mute @lemon forever y u beard
But then again I guess this happens when we are actually trying to use the command
Yep, that's what I figured, so it's a simple fixing the command really quick so you can copy paste
yes
There will be more work involved, since it needs to check the permissions
Maybe even an emoji reaction to run it without copy pasting?
That's possible, yes, a wait for and invoke_command if reaction is hit within 60s
since all args are present
Like, did you mean !ban some random person? :white_check_mark: to confirm, :x: to cancel
It's probably better to just copy-paste in case there are other typos, yeah
Accidently clicks the reaction ... oops banned the guy
Hmm, I wonder if there is a gramma checking lib so i can throw it in as a bonus
It also probably shouldn't suggest commands the user doesn't have access to
Oh no
Iโd probably break the cog at some point haha
Btw, I want some stats about #message-change-log, Iโm pretty sure Iโm the member that did the most edits haha
There's a built-in way of checking whether or not someone can run a command, right?
something like can_run
I think so
!docs get discord.ext.commands.Command.can_run
Like
await can_run(ctx)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Checks if the command can be executed by checking all the predicates inside the [`checks`](#discord.ext.commands.Command.checks "discord.ext.commands.Command.checks") attribute. This also checks whether the command is disabled.
Changed in version 1.3: Checks whether the command is disabled or not
Parameters **ctx** ([`Context`](#discord.ext.commands.Context "discord.ext.commands.Context")) โ The ctx of the command currently being invoked.
Raises [`CommandError`](#discord.ext.commands.CommandError "discord.ext.commands.CommandError") โ Any command error that was raised during a check call will be propagated by this function.
Returns A boolean indicating if the command can be invoked.
Return type [`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.8)")
nice. I got that right
yeah, no emoji should have the power to ban a person
I have to admit I would find it amusing to see people banned with a thanos fist
there must be sufficient friction between the moderator and their weapons.
That's why lemon types his bans with his beard
haha
I accidentally banned the wrong person just the other day, so I should know what I'm talking about.
Pretty sure I managed to do that a couple times as well
still feel stupid about that
I remember lucy accidentally banned a moderator once. I forget which one.
Oh yeah, I remember that
Well, I've muted/warned myself multiple times and some people have started giving @stable mountain notes lately
You arenโt supposed to be above the moderative actions? ๐
Well lucy was admin, so she could have done that manually anyway if she wanted
Warnings and mutes do not check the role hierarchy
I mean, about the ban
I think it does check now
An admin/owner can still ban a moderator
You can't kick/ban members with an equal or higher role
Although I guess we've moved the moderators role to above the Admin Bots role in the Discord Role hierarchy so maybe it can't do it now anyway
@green oriole Manual bans are restricted by the actual role hierachy on Discord; we have no control over that except for reshuffling the roles.
Oh I didnโt know that
The bot, with a lower top role than owners/admins/moderators can no longer even ban/kick mods now
but, still, it's neat to have that check in place since moving a role up or down is easy
Thatโs how the name color is determinated, isnโt it?
That's just the role color; you can assign that manually
but yeah, your top role determines your color
That is how role colour is decided, yeah
wrong button, stupid new UI
Thatโs pretty cool,
But you could like, if you want to ban lemon, you could remove his owner role and ban it or something will block you?
Only joseph can remove the owner role
(or set it)
but anyone below rank can be demoted by an owner, yeah
We did shuffle a couple of roles around last week
well, unless someone else has the overall owner now, but I haven't heard anything
<@&587606783669829632> is now above Helpers
I saw that, yeah
Like, only him can because it was decided like that or he has some additional persmissions?
yeah, markโs color changed
Each Discord server has exactly one owner
regardless of roles
You can't modify your top role, regardless of your permissions, unless you're the server owner
Donโt you have the little crown in the user tab when youโre the owner?
Oh okay
That's why you don't see it on any of my servers that you joined haha
And yeah you have the little crown on TA
It is smaller with the new UI now
Formally, it's:
Don't worry your crown is not lost! If you want to reclaim your crown as the almighty server owner you just need to disable the "Display role members separately from online members" option in Role Settings of your Server for any roles with the "Administrator" permissions!
It's Falcon
The falcon part is easy
The Unix madness is.. complicated haha
Mark is a really good dev
Do you mean the NSJail config? Or the docker set-up?
NsJail
cgroups, RLIMITs, mount points and stuff
Thatโs crazy how a little program like this can be that complicated and powerful
The docker part is kind of easy compared to nsjail
You use built from source nsjail?
Oh well, there is no binary release haha
Please review ๐ https://github.com/python-discord/bot/pull/743
Oh, the build failed
Great
yeah... I don't know why
ah Your Pipfile.lock (6d33bd) is out of date. Expected: (677910).
I will! But Tomorrow.
Everything is going wrong. I can't commit cause gpg is failing.
I had that problen too a couple days ago
I had to wipe my entire .gnupg to fix it, but I am on windows
Not a fan of heccin zoomies?
No. I disabled it when I got into Counter-Strike like a decade ago and its been that way since.
@tranquil topaz quick one for you linked above
sure..
I already looked at it, but it had checks that did not pass for some reason
Thank you. I had just forgotten to re-lock earlier.
@exotic ember any update on https://github.com/python-discord/bot/pull/625 ?
My !help pr is stalled because of this and is getting a lil stale ๐
And BTW your closing keyword isn't functioning, you have to say Closes #297, closes #514
Kosa isn't available so I took care of it.
Guys, I only have a 98% coverage on snekbox because of this error, the first wait_for does get a TimeoutError many times during the run, so I wonder what's the issue
Any idea?
Does an HTML report show the same thing?
99% coverage on terminal report, how do you generate html again?
coverage html
E:\PyDis\bot>pipenv run report html
Loading .env environment variablesโฆ
html NoSource: No source for code: 'C:\Users\Akarys\AppData\Local\Programs\Python\Python37-32\Lib\html': [Errno 13] Permission denied: 'C:\\Users\\Akarys\\AppData\\Local\\Programs\\Python\\Python37-32\\Lib\\html'
Name Stmts Miss Branch BrPart Cover
-----------------------------------------
No data to report.```

you're testing both with and without the exception right?
Yes
have you tried it with an exception that isn't caught?
That's the wrong command
Well actually the double run finish by raising an exception
pipenv run coverage html
You should not need to test for uncaught exceptions
Apparently it is because I didn't run the lambda
Do I really need to?
I guess it would make the test more robust
Time to write a custom wait_for mock
You're thinking about it the wrong way
Am I?
So I need to change the code inside the snekbox cog?
to move the lambda outside of the function call, and put just a reference here?
Yes, I think that is more appropriate.
And you can later assert that wait_for is called with the correct check function passed.
Just define it as a regular function
No more lambda, okay
It seems to me lambdas are not really compatible with the notion of unit tests
Unless one chooses to forego testing the code inside the lambda.
I could also extract the lambda from the function call
Because I'm maybe not thinking properly but how do I pass the ctx argument to the predicate function, since d.py only pass the old and new messages to the callback
Could use a partial function
Hey, how did Meta do to break the interpreter of the bot? (If this is fixed)
I think that info is in the PR
Yeah, it is explained in broad terms.
Specifically I think he wrote to /dev/shm and made it run out of memory or something.
who is GhostofGoes on discord
KnownError
@simple peak look comments in the issue regarding your first comment on the PR
https://github.com/python-discord/seasonalbot/issues/267
the very first comment in the issues talks about that
@eternal owl Was there a discussion on the wording of the message? I see the discussion on blocked reddits, but didn't see anything about wording.
To be clear, that's what my comment is about
The wording
not the check itself
Hmm I think I jumped the gun and merged it before we have the emojis
So there are 7 emojis you want to add right @eternal owl - Do you have any fall back emojis in case they got removed?
I will revert the merge for now
Or actually hmm, I can open a new issue to fix it
Command isn't working
Didn't notice the emojis were missing, sorry
Probably jumped the gun on approving it
Is there currently any easier issue in bot, that would good for first solve?
you should be able to filter by good first issue, we do tag with that sometimes
or I could think of an issue easy to fix right now, @cold moon
I never posted it
!user
User Information
Created: 1 year, 10 months and 15 days ago
Profile: @long garnet
ID: 427194066216681474
Member Information
Joined: 7 months and 5 days ago
Roles: <@&542431903886606399>, <@&463658397560995840>, <@&352427296948486144>, <@&267630620367257601>, <@&267629731250176001>
Infractions
Total: 0
Active: 0
hm, someone fixed it?
Yep it is emoji error py Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped ret = await coro(*args, **kwargs) File "/bot/bot/seasons/evergreen/reddit.py", line 123, in get_reddit embed.set_author(name=f"r/{posts[0]['data']['subreddit']} - {sort}", icon_url=reddit_emoji.url) seasonalbot | AttributeError: 'NoneType' object has no attribute 'url'
Should I revert the merge for now?
yeah revert it
And like manusaurio said, there are many good first issue that anyone can try to tackle @cold moon - you can see a list of them here for example https://github.com/python-discord/bot/issues?q=is%3Aopen+is%3Aissue+label%3A"good+first+issue"
Yeah Imma revert it for now
I run it locally
It shows up in the log, not in discord
owait, there is a test server
...where are you testing it against?
I was testing it in my local server, since I set all of it up and ready for the python bot
Yeah, we have a test server ๐
is that for core devs?
Please giv invite!
Yes, but moderators also have access IIRC
I'm the pleb mod with no contributor role
I haven't yet thought of fall back emojis @gusty sonnet
I have posted the emojis in a comment
And need to update code
Yes I saw it, I was trigger happy and merged the PR lol
Which emojis need to be added where?
The new .reddit command requires 7 new emojis in this comment - https://github.com/python-discord/seasonalbot/pull/346#issuecomment-583216459
Implemented the Reddit command as mentioned in #267
Here are a few screenshots:
watch the command in action:
https://streamable.com/8r894
Okay, didn't we already have some reddit emojis? We have different versions for three of the five in that PR already.
The new emoji server is already getting a bit crowded, so adding multiple versions of basically the same emoji doesn't sound like the best option to me

We already have these
@eternal owl Can we maybe unify the old and the new emojis so that there's only a single emoji for each Reddit icon? I think the ones we currently have for user, upvote, and comment are good enough (and not changing them means that we don't have to PR in changes to @stable mountain as well), so we basically need three additional emojis for the other three reddit icons we currently don't have emojis for.
the upvote emoji given in the PR does match the place it is . we can keep the other two @hardy gorge mentioned the other one containing upvote is neede โบ
Is it? The upvote one Ves used looks very like the Reddit upvote arrow
I'd rather have us keep these three, @clever wraith. They are based on the actual Reddit icons and they are already in use by our bot.
the upvote given in PR is also used by reddit and really looks better
I'm not sure I agree and this one is already in use so I see no pressing need to change it
user: :user: id=638729835442602003
upvotes: :upvotes: id=638729835245731840
comments: :comments: id=638729835073765387
we did it reddit
Also, those paging emoji are unreadable on the AMOLED theme on android
whats up
cool its working
thank you @hardy gorge
and sorry that I was not available the time you pinged me ๐
our paging emoji are kinda ugly anyway
maybe we should make some custom ones.
I mean they're used in a dozen functions
yea, and maybe change the color
we need green
FA has some
so it might be fairly easy to make a set.
I'd do it myself but a fucking tree fell in the road due to extreme storm
and I am cut off
can't get home.
waiting for them to remove it.
Jet pack
at my mother in laws house. yeah it's the only way out
dirt road?
oki
can anyone check this issue:
https://github.com/python-discord/seasonalbot/issues/345
ty in adv
and we can get the owner of this PR
https://github.com/python-discord/seasonalbot/pull/306
to finish the above issue(if he/she is still active around)
lol they're not even consistent
I dont seem to find the approved label in the bot repo, so how will I know if I work on an issue or not
Before you do that the Reddit cog needs to be changed to use Reddit's API
And not "Iceman" as a user agent
no it doesn't, it refers to the app or client
oh shoot
if you were unsure, why didn't you ask about it or look it up
You can see an implementation in bot's Reddit cog https://github.com/python-discord/bot/blob/master/bot/cogs/reddit.py
I was confident on my english ๐ @glass pecan
yes, but this is to do with programming which usually involves particular concepts that you should be double checking details on if you haven't came across it before
okay, will do next time
python3:python-discord/seasonalbot:1.0.0 (by /u/PythonDiscord)
do the numbers in between indicate the d.py version?
No they mean nothing since we don't version most of our projects
so I can leave it as it is or remove them?
pretty much that. it's meant to indicate app version
But Reddit wants there to be a version so it's just a dummy number
it's sorta the wrong agent format tbh
I wonder how Iceman worked
I'm pretty sure it follows exactly what Reddit wanted
before I make any changes, the reddit command sometimes dosent show the full embed
can this be fixed?
@eternal owl make an issue ticket on it
Will do!
Awaiting doesn't do anything to affect Discord's rate limits
@eternal owl there's a few problems with your issue mate, do you mind if we go through it and get it up to scratch?
oki @glass pecan
first minor things is the title. we'll want to address correct titling at the minimum
like to directly mention the issue?
the title is currently problems with reddit command.
It should have a capital at least
You'll want to make sure you re-read your issue tickets then before submitting them to avoid missing things
okay
Next is you'll want to clearly outline the reason for the issue ticket in a clear introduction or description
assume the reader has no idea of any context at all
yes absolutely
okay
but in this case, you'll want to reference the relevant PR instead
as that's where the issues originated
okay
so something like:
Recently, the Reddit command PR (#346) was merged with a number of problems being overlooked. This issue is to outline the required fixes and any additional enhancements to the feature.
The following problems we are aware of so far:
and then you'd make a list of each issue
okay
then copy the image url
okay
and embed it as an image in markdown
okay
btw Reddit has a capital
Lady and gents, the pull request containing the re-eval feature, the tests for the snekbox cog, plus 3 other little fixes, is now ready for reviewing! https://github.com/python-discord/bot/pull/710
@glass pecan is this good? and also should I say that we have to figure out a way to solve the double embed thing?
I couldn't para-phrase it
save the edit on the issue ticket, i'll read it there
don't want you losing your edits because you took too long to save
i have the ticket open, i've been waiting for the edit lol
that's what it's called almost everywhere but github


