#dev-contrib
1 messages ยท Page 31 of 1
Env?
Nah, I don't see any use in making this a required step in the set-up
(adding an environment key for that)
I'll just add a specific ignore
ah yes that'll be why then.
There's now this: https://github.com/python-discord/site/pull/297
๐ถ That she wore for the first time today ๐ถ
I think it would be preferable to keep the current behaviour as a fall back and use one in the env var if set
If we accidentally happen to enable debug in prod (or django-environ reads something wrongly, or salt messes up, or the if condition is wrong...) then we will still have a secure secret key, for one
That way people who want to preserve sessions can set it
or we have the debug setup write the randomly generated key somewhere on first start and then load from there, if you want full convenince
How does this look?
Pinky?
that's the current danger colour
looks good to me
It look pretty good (appart from the pink)
the danger colour is based on bulma's red with a saturation of 80
it was very.. in your face before
Maybe a tad more red
I think the color looks good
The colours were approved in an earlier PR
they affect a lot more than just buttons
That doesn't look.. Dangerous
it has an appropriate contrast the rest of the site
yeah
Mobile view
I think the lay-out looks good
any of the people that did the scraping stuff on the bot around?
bs4 is slowly making me lose my mind
Scraping stuff?
The doc cog scrapes the python site's docs
Oh yeah
What's making you lose your mind, @brazen charm?
_It seem a bit against rule 5 ๐ _
Scraping itself isn't bad. It's a tool just like anything else
It's used all over
It's just when it's used on sites that don't allow it that it becomes a problem
We're using the intersphinx connections specifically meant for this
Anyway, what's driving you mad, @brazen charm?
oh wait, double ping
soup.find_next("a", attrs={"class": "headerlink"})
getting different results than in terms of the tag hierarchy (or how to call it)
soup.find(id="module-numpy").find_next("a", attrs={"class": "headerlink"})
When there is only one headerlink in the doc
I fixed the disconnect message to make it consistent with allauth's connect message
Any thoughts? Is the GH button colour okay?
I don't like the pink buttons very much
and for the connections, maybe icons and bold names?
although you got an icon on the connect button.. hmm.
Could do both
not sure I like the idea of a disconnect discord button that is permanently unclickable
yeah that looks pretty good
but the delete account button, hm, I guess I think that button should probably white on traffic light red
pastels doesn't really communicate delete
That's basically the bulma default, yeah
yeah and I know we redefined some of those.
or all of them.
which is nice for the notifications
but not sure it works for this.
@wild ridge @tough imp @glass pecan you guys have a good eye for design. chime in.
I personally think the pink colors are good enough in communicating what's going on + we have a special confirmation page with a type-over after it
I don't like those red colors in our design
well not for unlinking, but for deleting we do
these reds are super in your face imo
perhaps too much
but we could change the saturation of the pastel red
haha, I set it to 100 but now it just looks like the buttons are disabled
that's very bubblegum
I agree that the redest red communicates the intent a lot better
go a little darker instead maybe
Can you try with a medium blue(ish) color too?
for danger?
lol
blue is a very strange choice for this that I don't really see a point in trying.
Oh yeah that's a special button
saturated red makes sense
I agree with Scragly that is the best
at least that's my feedback regarding the colour
@brazen charm I'm not sure if here is the best place to ask about beautifulsoup. Would probably still be better served in the main help channels
how about a slightly darker version of the default bulma red
okay
just to test it out
Yeah wanted something about the style around it too but that's what's keeping me occupied now
Maybe that's a bit too far?
no that's good to me
I like that
I kind of like it too
Yeah it seem pretty good
can i give a little feedback on the page itself?
Of course
It helps a lot to see the page as a whole
hmm. that red really disagrees with the blurple nav. not sure what to do about that.
Maybe a bit more saturated red?
darker, but more saturated? okay..
It's kind of a tomato colour
I don't hate it though
I prefer this one
how does the tomato look outside of buttons?
It match more the pydis blue
I still like this the most https://discordapp.com/channels/267624335836053506/635950537262759947/636269822904238080
Which one they don't like?
the one kwzrd linked, the bulma default
let me make the tomato a bit brighter
I don't think that's half bad
Can you create a new color only for button and keep the old one for the rest?
I have to go help make dinner, but I'll be back after, will be on Discord either way
Not easily
i like the latest one, but i also like rediculously strong reds
@crude gyro what do you think of that one?
.colour D63852
We don't
its loading
if it's loading
- it's very slow
- why didn't they put
is typing...
long response times, bad bot scargly
context
its doing more than seasonalbot for colour previews
the g stands for gpaint
could be worse
Haha
could be gimp
s/color 1/color 2
we all know how much you love it
I'll do an actual test when I'm done in a couple hours
sure, but i still kinda want to give feedback on the page when you're back
i suspect i'll be kinda sleepy though
if you're busy it's fine
I mean I can just screenshot it
but i'll likely dump my suggestions here
making some jam?
nah i want to change the structure
No, FSAI recommendation so I don't get hepatitis
more like hepatightis
Haha
It's because lots of imported frozen berries over the years have been infected
could you share the template file perhaps? i'm too used to tweaking via inspect
all g
noice
here's the other, if you want to use it
I'll just make a PR and you can tell me there if it needs to be adjusted
Like if the radius on the square is wrong or whatever
@molten bough, it looks like you tried to attach a file type we don't allow. Feel free to ask in #community-meta if you think this is a mistake.
yeah man that looks great @tawdry vapor
I came up to get a stomach pill lol
yellow plus white dont work well ๐
when it's this size, or even
sized, how legible will it be?
The green one has more contrast, so it may look better when it's small
it's displayed at 22x22
Well then I can ditch the gold and use red/green as the others do
most of them we have in red, blue and green
yeah it's just that the embed was gold so figured why not
but it's not very legible at that resolution
so red=apply green=pardon, as the others?
but at the smallest size, I still think a star without the extra details might have had better legibility
(@molten bough change the extension)
question is - will we ever see it at the smallest size?
it's gonna be used in these embeds, and that's at least the slightly larger size, is it not?
maybe even larger than that
(@molten bough paste.pydis.com? ๐)
The respective contrast ratios are 1.53 (yellow) and 2.16 (green)
yeah mod log
Which means it's low
Good point
Mod log is actually 20x20, even smaller
okay so then maybe just a โญ would be better than a ๐ in terms of legibility.
yours looks nice large
but not sure it makes sense at 20x20
even at
size it's starting to get hard to see what it is
Oh well I liked the sparkles but alas they must perish for the greater good
yes. I liked them too
but you gotta suffer for fashion
Distributed by WMG From the album Hissing Fauna, Are You The Destroyer? Purchase CD / 2xLP / MP3 here: http://www.polyvinylrecords.com/store/index.php?id=36 ...
Anyone have ideas for warn/note icons btw? They are both a mail icon right now
At the least one of them should be different I think
hard to iconize in the style we got, would just look like a rectangle.
Maybe, would need to look good at 20x20
pencil maybe
we already use a pencil for edited infractions
should the source code paragraph be excluded when someone !d gets a module? Would need to be filtered out https://i.imgur.com/3staNvd.png
It would probably just look like a square at 20x20 but I could try, easy to make a test
I made the PR, can you please double check the dimensions are correct since I did not use your PSD
@brazen charm That's for module-level help, right?
Mainly, it's 128x128, square is 100x100 with a radius of 10
yep
I'd say it's part of the documentation for that module
It may be the thing you're interested in
Maybe I'm just weird, but for some things, I look at the source code
I do too but not sure if people getting the docs like that would need it most of the time
I say leave it in. It's part of the documentation and it's not like it's decreasing the useful info in there by a lot
They're not really going to get much of value out of module-level help anyway, getting rid of the source makes it even less so
You can't put links in a footer
๐ never mind then
I'd also like to keep the parser as general as possible, since it should work on any inventory link we add
If we add a lot of exceptions, it's going to be difficult to maintain
I don't really see the problem with the information presented in the image
Since we'd have to PR in changes anyway and we have this beautiful database-driven addition system to avoid that
Me neither, @woeful thorn, so let's just go with that.
@crude gyro Thanks, can you upload those to the emote server and get me the IDs?
Ok, np
what would you like as logical names? I've got a headache and I can't think of anything.
ah
the filenames provide the solution
sure
or superstar and unsuperstar
or superstarify and unsuperstarify
the bot wont use the emotes by those names anyway so it's not important
yeah, true
:superstarify: - 636288153044516874
:unsuperstarify: - 636288201258172446
@tawdry vapor 
thanks
Another things I wanted to ask, there are a few thousand symbols in the form reference/generated/numpy.nonzero in the inventory that point directly to pages (bot can't currently handle) but they all also have proper counterparts that point to a header link. Should they just be excluded with a check when building the inventory or keep them in?
That depends on your implementation, I think. I haven't looked at your commits yet, but the !docs commands are currently specifically meant to accept any inventory url we want to add, without having to also PR in changes to the codebase. Adding inventory-specific exceptions to processing rules kinda defeats that purpose and adds the requirement of per-inventory code maintainance.
Those come from the intersphinx fetch function and are just added as normal, without any changes from me. But I'm not sure where they're coming from in the inventory (not that I looked at it)
Right then
ya back?
Yup
mind if i show a mockup of the idea i had then
ok first warning
i think we're fighting against the inevitable by trying to design a nice full page with such sparse content
so i figured, why not just use a modal
Modal looks good
but
it does require javascript
and I feel like requiring that for essentially a GDPR function is a bad idea
i don't really agree in that respect
if the argument was that implementing was a pain or something, then that would be fine
but requiring js in a website isn't unusual
I don't overall mind JS and such, that's all fine
it's just that we have to make sure this can be got at somehow
yeah, it can
just by enabling JS
or not using your grandmas computer
not gonna limit our website by what you can do from netscape.
if they are absolutely adament they don't want to enable scripts beacuse they're crazy people on tor who do illegal stuff, then they can just email us
Okay
secondly, where does the modal live? it's going to have to be on every page in some capacity, right?
unless you load the modal only after clicking a button
(also, are those cards the same height when the Discord one doesn't have a button?)
don't think so, lets try
I think that can be done with tiles
but that's not much of an issue either as we can just leave a disabled button there
I'll have to poke it
yeah it does not
right okay
also, where do we redirect to after GH has been linked?
or unlinked for that matter
There might be
ah, wait, no
because after GH is linked, allauth redirects to socialaccount_connections
which I aliased to the account settings page
in theory that could be any particular page though, it just needs to be added to the urlconf a second time
could it live in the nav?
as a perma thing?
I mean, it could be in that template
i dunno if that changes the redirect stuff
nav is ever present when you click that button
no matter where you are.
just a thought
but yeah obviously i didn't think of too much implementation details
the only thing i can contribute is the design idea
lol
I don't disagree with the modal idea
I would still like the pages to be usable without JS
but I could look past that for now
no reason there can't just be a <noscript> with an extra item
or even just leave the anchor as it is and cancel the click in JS
The primary benefit of this being...
of which specifically
Worrying about a noscript option
I'm just concerned about the accessibility of a GDPR tool
We also have an email if people need to get it done
Do we have that on the site somewhere?
We're not denying people access, we're just making it more accessible for the 99.99% of people who would worry about it
Oh sure, I'm just saying, it's easy to cater for both
just add a GET param to the current page to display a template without the bits and bobs that's usually there
use it to template the modal
well actually I guess it's more complex than that given the stuff in the header of the modal, but eh
it's not something I'm particularly interested in
I do wonder, however, if it's possible to do the modal with pure css
that's a good question
That feels... unwise
why's that?
It's a style sheet, not a language or even for hyper links
we're just showing or hiding a modal. that's well inside the realm of a style change
the real problem is hooking it up to a click event with pure css
I mean, it is a style change, it's just the trigger
anyway, it is possible, but it's a hack
lemon, it's actually possible
you do it using check states
It feels really terrible
that's the pen I'm on
yeah google is good
Wow
although I can't actually view it
Okay, nevermind then, that's like magic to me
thats some fancy css
When did they give css such power?
probs css3
it's basically just
I retract my statements then
hmm.. is this a checkbox styled to look like a button?
.modal-state:checked + .modal {
opacity: 1;
visibility: visible;
}
that's very clever.
it is, yeah
yeah very neat
so html elements can have state i guess
but yeah, I mean, if we can do this it solves your absurd noscript worry and is simple and straight forward. no js is better than some js, if that's an option.
Debatable
why? bulma
bulma's just not designed this way really
we'd have to duplicate tons of their CSS
huh? why do you say that?
What's your suggested alternative for the noscript crowd then?
I guess I misunderstood that bit
just also have an actual page
I mean I feel like it'd make more sense to have one or the other
oh okay, their is-active is literally just display: flex;
I still think this breaks some behaviours, though
the entire background of the modal would have to be a label
is that how the codepen did it?
well as I say, I can't actually view the codepen
looking at.. yeah it looks like it from the code
we're using straight up ES6, I take it?
I'd hope so
And 'use strict';
yep
anyway, was just an idea
I don't actually mind the js solution
but I do mind having two solutions just because someone might not have js
I'm violently opposed.
okay
so, solve it without js or solve it with js, but don't do both
do you want the html i used
And I'd heavily prefer the JS solution over a CSS hack, especially since we're already using a CSS framework, and that just feels like opening a pandora's box that isn't really worth messing with
I'm okay with the HTML, I do wanna change it a little
not a big fan of the cards on each connection but I feel like a divider between 'em might be nice
although I'm curious how you did the large icon with small text
that's amusing
It's not, yeah
at any rate, i personally prefer the boxes over a divider, so i'd like to hear options on others too about that
image again since it's far enough up there https://media.discordapp.net/attachments/635950537262759947/636307598882242570/unknown.png
I'd have to see the options before I can give an opinion
it'd be like that, but with a line down the middle instead of the boxes
I like the boxes, I think.
i like the boxes primarily because the ui is consistent when they no longer inline such as on mobile
Kind of prefer the boxes, then. I thought you were thinking of having them in a column with horizontal dividing lines
The divider does automatically go horizonal on mobile
or, cards I guess they are
Yea but if they're the same size as the boxes, why not boxes
too much colour
I think they look like this without colour as well
but that might be a bit 3D? I dunno
I just don't like plain boxes
they're not plain
they have a border radius, they have a drop shadow, they're more distinct than the tiles edges
I also think @mellow hare that you're grossly underestimating what CSS can (or is supposed to) do. you can use it for animations and transitions, it has state selectors for hooking up stuff like hover or focus events, this is all really performant and it's probably not fair to classify it as a hack. it's just modern.
I think a button that will never be clickable is a little bit weird to have on a page but I don't have a very strong opinion about it
we don't allow that, yeah
if you guys like it for symmetry, it's fine I guess
well, that and keeping the cards the same height
Fair enough. I do need to refresh myself on that
although some smartass with a big name is gonna come along and break it, but that's their own fault
yeah it's really quite cool. I've built some pretty cool shit with only CSSs. I never use JS for dropdowns anymore, I think modals are a good candidate to join dropdowns there
same with elements doing minor "slides" or other nice polish
looks and works great in pure css
yeah, I did that with the messages
anything more complex than that, time to break out the big guns and make a javascript file
don't get me wrong, I love JS and I use it for a lot of stuff, but I'd rather avoid it if it's something so simple that even CSS can solve it.
having a JS file that's just like.. making an element visible? seems pointless
it's a style change. we should do it with our stylesheet.
yeah
we can
its text
nice
or rather, it's an icon
yeah that's a great example
a lot of people would have thought you needed JS for that
that wasn't very 60fps of my 60fps setting
?
That looks kinda weird with the blurple button
looks nice, although now a straight cross symmetry has arisen between the discord icon and the blurple connect
maybe is-light for the button?
it's kind of pastelly, yeah
now that I'm seeing them in the wild
we switched them because we wanted less intensity for an older version of the notifications
but now I kinda wanna just set them back
because the bulma defaults are better
I dunno, I find them harder to read on a white background
the green is OK though
however there was another reason we didn't use that green
scragly picked a better one a while back
thats not default, i just picked via colourpicker
Ah okay
well it's better than blurple
If we're gonna start coming up with new colours we should probably be consistent about it
like that red that lemon made
wish we had someone who knew about colors who could do this stuff
I kinda like that red, though
D63852
so you're saying, if we're gonna go green, we should maybe do a green that's sorta like pulling towards blue and a little darker?
so that we get a matching sort of color profile
well, maybe we should just apply the same transformative difference
fancy
the left one here is the bulma default, right is lemon's
okay
so let's work out what the transformative difference equivalent for green is. that's a fun problem.
thing in rgb and just copy the integer difference
but switching primaries
so that whatever we did to red, we do to green
I like to do it with an actual colour picker
how's that?
but yeah, basically
I get #32AC66
That's so bizarre. I'm behind the times I guess
i gotta crash, so i'll see you guys tomorrow
they're both of exactly equal transformative difference
but pull to different sides
out of those, I think I like #32AC66
I think so, yeah
Should we do the other ones?
Here's how messages look, by the way, with that red
I think that's alright
yeah that looks alright
You wanna do the other colours?
actually there's really only two more, since the turquoise is replaced with blurple
the blue (#3298dc) and yellow (#ffdd57)
okay, sec.
#2482c1 for the blue, I think
alternatively #1c8ac1
#e9cf3c for the yellow
these are all just coming out of some code I wrote now
the first blue looks like a winner, and frankly, the first yellow too
imo
I think so too
there are two other colours that are defined in bulma's sass
but they aren't used anywhere whatsoever
orange and purple
and they aren't documented either
# Transform
rgb[primary] -= 27
rgb[secondary] -= 22
rgb[tertiary] -= 14
then you manually set primary to match whatever color you feel is the primary color you're altering
so, blue for a blueish color and so on
oh, hng, I found a couple of uses of those too, as well as another blue
do we really need two blues..
probably not
I've not seen orange/purple anywhere on our pages but we can do them if you want
that yellow isn't very nice, but the blue looks great
yeah, I agree
gold isn't a ton better, it just looks out of place with black text
but then, the bulma one would have that too
that's the default one?
No, that's the other yellow you gave
it's a tiny bit better.
This is the default one
Alright
I think it looks fine, yeah
we could do orange/purple but honestly it's probably a waste of time
I haven't found a single use of it anywhere
it's easy, I got a script for it now
they likely put them in as alternative primary colours
can we see what they're set to currently first?
Sure
these are all the defaults for good measure
orange is #ff470f
purple is #b86bff
the problem with turquoise is that it's the default primary colour
I can see why
so if we don't set it to blurple a bunch of things will be turquoise
good way to make a million dollars
but yeah that's fine
that darker blue is #3273dc also but I just set it and cyan to the blue you came up with
purp: #aa55e4
orange: #e43101
Changed the green and red to purple and orange so I could actually show them
those are the ones you gave
the orange sucks.
could be worse, how was it before?
default orange and purple
okay, so, keep the new purp, let's never talk about the new orange again
yeah, it's fine
Alright
now that that's done..
modal
well actually it's 11:30 so it might not be done today, but I'll give it a go
modal JS can probably be put in simple-bulma
I'll just do it here first for the sake of time though
yeah I think it'd be nice to have that in simple-bulma too
the second one is hilarious
I couldn't believe it, haha
hm
is it possible to actually like
insert a bunch of stuff into every template
because the page I wrote does need me to provide some variables to the template
I guess I could just keep the endpoint and load the template with JS
gah, that won't work either
unless the JS lib is loaded as part of that template
which I guess it could be
Lol, because of the notification stuff, the navbar is above the modal background
not all of my JS is wiring stuff up correctly, but I'm getting there
alright, you beautiful people
I can't get the navbar to be behind the background
I have no idea why
even if the modal is the first element in the body
but otherwise, it's done
PR is no longer marked draft. I'm going to bed, haha.
That look awesome!
We got a PR from dependabot on seasonalbot about security issues with the version of pillow we are using (I got the same on a personal project) do you think it is worth investigating if there is really a security issue or we just ignore it?
very nice, @molten bough
and @glass pecan for the design, too. this looks like an excellent implementation.
@green oriole I think we can assume that there definitely is one and we should probably just upgrade pillow after testing that things still work with that version.
I assume you're refering to https://nvd.nist.gov/vuln/detail/CVE-2019-16865
\o/
Oh I just realised there's one other thing I was gonna do
Add an API to get connections
@green oriole https://github.com/python-discord/bot/issues/549
Okay thanks!
In the bot repo, if it in DEBUG_MODE, filtering is done only in a specific channel (here https://github.com/python-discord/bot/blob/master/bot/cogs/filtering.py#L139..L141) any special reason for that (according to git blame Ves reintroduced them in a commit)?
you should probably ping @hardy gorge when you mention him, since he'd be the best person to answer that.
since #dev-test no longer exists, this is definitely a bug.
and should be sorted out.
we should remove any references to that channel while we're at it.
if you'd like to do it, you can.
Okay I'm doing a PR on message filtering, I can delete that too
hmm.
yeah okay, I think that would be fine. make sure you mention that you'd made this change in the PR description, though
it should be a fairly minor change
Okay
then again.. hmm.
no, make a second PR for that, please.
it should be tested seperately
Should I add that API for getting social connections for users in this PR?
it's already pretty big, but I don't mind if the reviewers don't
@crude gyro here it is https://github.com/python-discord/bot/pull/550
@molten bough you mean like allowing an api call to check what someones github is? no, don't add that to the same PR.
it is something we want, though. but I'm a little confused as to why we need a new API endpoint for it. we have APIs for the user table already, would that not contain this information?
It doesn't, no
@green oriole that condition has always been there, since it was needed in the past. The git blame comes from me first messing the condition up and then restoring it again. As lemon says, it's no longer needed since yesterday.
wait, so how is this linked to the user then
connections are in the SocialAccounts table
which has a relationship to the user?
Yep
and when we make API requests to the user table, how are those relationships represented?
we don't get a copy of the relevant object data?
hmm..
it's also not quite that simple
I don't really understand the direction of that relationship then
the SocialAccounts have a user, but the user does not have a SocialAccount
you have social applications, which are the oauth providers
social logins, which are individual logins to those social applications
social accounts, which are like, Discord account, GitHub account
and of course there are tokens in there for making further OAuth requests
SocialAccount is part of Allauth and has a foreign key relationship to Django's User table
there is no direct relationship to the Discord User table
No
so, why not? that's many-to-one too?
Yeah, but not all SocialAccounts are Discord accounts
You can't FK the UID because it won't work for GH accounts
language
they are indexed on the UID though, so it's trivial to get what you want
the key is (uid, provider) I think
well I'm just asking
does the User table have a column that contains the roles?
if so, I think it would be consistent if it had a column that contained the accounts
Django's one and the Discord API one
right
ah okay, the Discord one
they have different names?
sorry, I'm not very familiar with the new database, I've barely touched it.
how the fuck can they both be User
because they're in different apps
rrrr. Not a fan of that at all.
me neither, but it's a bit too late to change it
why?
I've been using import x as WhateverUser
Well, you'd have to migrate the old data somehow
why? it's just a name change. the data would stay where it was.
I have no idea why you shouldn't be able to do that
I dunno, I've never seen that
I'll google it
yup ALTER TABLE table_name RENAME TO new_table_name
okay, so I guess you could do that
yeah, there seems to be a migrations.RenameModel
I will say, though
I'm not 100000% happy with this modal because I was unable to dynamically generate the cards
even using the code in the allauth templates, I couldn't get Django to iterate over the list of providers
because they.. appear to be falsey?
I dunno
I'm not worried about that, we'll probably never add more providers.
Yeah, I figured, I just wanted to build in the possibility to expand
yeah
It's in there basically everywhere else anyway
the connections API I'd try to make do something similar
but the data available for each type of account is different
it actually totally just stores a json blob in the database because it's so different, along with a small number of standard values
sounds acceptable.
if you want to get the github account name
it's like
github_account.extra_data["name"]
but that could probably be standardised as needed in the api endpoint anyway
gotta run now but excellent work so far anyway
Thanks \o/
@green oriole hello, re: Ignore Draft PRs in .hackstats
can you show me the query_url you got that you say it work.? I am having trouble getting it to return the correct items
Does hacktoberfest ignore draft PRs? I didn't know that
indeed, my current PR was a draft until last night but it's been counted since I first submitted it
Something like this? https://api.github.com/search/issues?q=is:pr+-is:draft
Plus all the others args
https://api.github.com/search/issues?q=-is:draft-label:invalid+type:pr+is:public+author:kosayoda+created:2019-10-01T00:00:00%2B14:00..2019-10-31T23:59:59-11:00&per_page=300
this does not exclude draft PRs
cool, that was weird
I suppose github is still parsing the request by splitting on + and then it check if there is a - at the beginning of the arg
you often see spaces in search queries replaced with a +
@woeful thorn It's documented in the allauth docs, I can't remember what it is exactly
Each provider has their own one
You can't configure it
But you'll also see it in the oauth URL it takes you to when you try to login
I pulled new site changes and now I get stuck at Pulling postgres (postgres:12-alpine)... again after running docker-compose up :C
restarting the docker service 13 times did the trick
Lucky 13
sync your pipenv
ah
pipenv sync --dev
now rebuild your container
I don't know why
Ohhh
Yes
Your container needs to be rebuild, obviously, that's the pipenv we're interested in
I need opinions on the note infraction icon
For the paperclip I have various thicknesses but I think that one is best
can't really distinguish them from my normal viewing distance. The middle one is probably the most recognizable, the paper clip taking a bit more effort and the first is hard to pick up because it's almost all white
I like the first one
I'm also partial to the first one
First or second for sure, the third one makes me think "attachment"
A few more
the third is probably the most legible cause it's simple
but the question is if it makes sense
Maybe make an open envelope for warnings and a closed one for notes
Ehh, I still think the warning sign triangle thing makes the most sense for a warn
And my vote is still for one of the first two you shared
I was considering that, but we use an exclamation for other stuff
so it may clash with the meaning of "error"
I think we'll be ok
@tawdry vapor, it looks like you tried to attach a file type we don't allow. Feel free to ask in #community-meta if you think this is a mistake.
lol
accidentally sent the svg ๐
Hacker
Oh IOS client try to resize it, so it just end up being a pixels soup
I think general consensus is that a trash icon is good, but the twemoji style doesn't look too good
So we wanted to explore a custom icon
I followed @brazen charm and @crude gyro's suggestion of that tweemoji one with simpler lines
probably misread something tbh
if anyone of you can give a mockup on the style I can make more attempts
Oh right
Honestly I am not the biggest fan, but it certainly does look like twemoji and it's decent enough
But the main concern is that it's not that clear to me at a small size
what do you have in mind? a basket like ๐ ?
I think a metal trash can is fine
that looks like a basketball hoop to me
Maybe we can do like even simpler
Let me look at fontawesome
need to get a smaller pic
I think the specific issue with yours is that there isn't enough contrast
I could change the colors and see
at the small size the two greys just blend together and the whole thing looks like a rectangle
doesn't help that I am using dark mode ๐
for clarification, by contrast you mean the contrast between the trashcan and the lines on the trashcan, or the trashcan and discord's dark mode?
I just realized while making any of my other emojis I neglected to check them out in light mode
@exotic ember how's it look if you swap the colours?
@exotic ember I, for one, quite like the one you made.
Looks pretty good imo maybe a simpler handle and a bigger angle on the lid or bit taller can, but looks fine to me
@wild ridge 

You came up with it again :P
yes, thank you @voodude, you are the trash can guy
that g is actually short for trash can guy
thank you
Oh guys
To find a message by id
you also need the id of the channel where is was sent
I need to go trough my model and add a new field
Great.
No other way around?
Why do you need a new field when you're storing the URL?
I don't store the url
I'm working on another thing
That's not about the reminder cog
Then context would be helpful
Yep
So for now I created a new model that store the message id and the deletion date
But if I want to delete it, I will need the channel ID too
Why not store the URL
You can delete a message with his URL?
No, but you can get a Message object from its URL
Or I could also loop through channels and try to find the message..
Well, I suppose let's go for the URL
How can I find a message by it URL?
I can't find any docs on it
How do you use that thing? It's a command?
If discord.Message is used as the type annotation for a parameter, then that converter will be used
You can see an example in the fun cog: https://github.com/python-discord/seasonalbot/blob/master/bot/seasons/evergreen/fun.py#L117
Storing the URL wouldn't take more place in the database than storing the message ID and the channel ID?
I don't think we're doing this on a scale where it really matters either way
What should I pass as context? Because this is a background task, there is no context
Apparently it use ctx.bot and ctx.channel if it can't find the channel
So I should be able to construct an arbitrary context object right?
@tawdry vapor I don't understand.. If discord.Message is used as the type annotation for a parameter, then that converter will be used.. So I can just add an argument url: discord.Message and the url will be automatically converted to a message object?
I think I misunderstood the context so perhaps ignore me
what I said applies when you're taking an argument for a command
Oh an argument for a command okay
BTW it turn out to be a bad idea to store the url because the converter want a context that I can't provide
I think I'm just going to store the two ids
You can create a dummy ctx as long as it has the bot attribute if using a url
ctx = commands.Context(bot=self.bot)
Since MessageConverter will use
- Bots message cache
- Get channel id from url and use `ctx.bot.get_channel(id).
- Get message with
channel.fetch_message
The only caveat is if the channel doesn't exist (and bot.get_channel returns None) as it will fall back on ctx.channel which gets channel from ctx.message.channel which will raise an Attribute error since the message is None. A dirty fix for that would be to just set ctx.channel to be None manually too
Storing the 2 IDs may be easier and more efficient, especially if you're using .history() rather than fetch_message
.issue 299
Sorry, but you may only use this command within #bot-commands, #sir-lancebot-playground, #ot0-psvmโs-eternal-disapproval, #ot1-perplexing-regexing, #ot2-never-nesterโs-nightmare, #414574275865870337, #542272993192050698.
https://github.com/python-discord/seasonalbot/issues/299 - We may need to take a look at this before I start work on it considering gdude is working on something similar.
The specific thing that's being thought about atm - my PR adds GH account linking to the site, and there was a discussion about adding that connection to the API to be exposed on the Discord API User objects
although I note that seasonalbot doesn't actually have API creds
so maybe we should talk about that at some point
Unless we integrate it into Python Bot?
hmm, I guess
yeah we don't really wanna add the site dependency to seasonalbot.
but something like a !github command for bot might be fine.
That seems fair
I think that's a shout.
Maybe put the full functionality in the PR into the bot itself?
In that case what should I do with issue 299? Stall it or close?
I've transferred it to bot based on new discussion, but we'd still have to wait for gdude's stuff before further implementation discussion
Once the current PR is reviewed and merged, I can start on making the connections available to the API
@jade tiger I tried creating a dummy context, but the code seem to get stuck when it reach it. Do you have a link to the doc for .history()? Ctrl + F doesn't work :)
Are you trying to go through channel.history for a discord bot?
If you are @green oriole here's the doc for it - https://discordpy.readthedocs.io/en/latest/api.html#discord.TextChannel.history
Take note that this is classified as API abusing - it is requesting data from discord api
For now I just use fetch_channel and get_message
I think it will be faster
Because it doesn't loop over the history right?
get_channel is faster
the first is almost O(1) while the 2nd is asking discord api
It does not loop over history, yes
It'll try to get the object from the bot's current cache
Or it was fetch_message I can't remember
fetch_message is targetting a specific message, it is an API too but yes it can be faster than asking for full history
What does return fetch_message when the message is deleted?
Probably a None / it'll raise an Exception
I thought it could return the message object, because discord does store deleted messages I think
Raises
--------
:exc:`~discord.NotFound`
The specified message was not found.
:exc:`~discord.Forbidden`
You do not have the permissions required to get a message.
:exc:`~discord.HTTPException`
Retrieving the message failed.```
Yep it'll raise exception
ok ty
Yep it raise a NotFound
How do I calculate the coverage for the site repo?
(to make sure it's still 100%)
you can run the tests locally, but the best way to do that depends on your set-up
You're running it without docker right?
Yep
pipenv run coverage run manage.py test to run the tests
pipenv run coverage report -m to get the report after running the tests
holy issue spam batman
seeing that there are going to be a couple issues for tests, how hard is it to make them? ๐ Could try something after I figure out the docs command properly
99% arg! ๐
as the message/embed deletion emoji?