#dev-contrib

1 messages · Page 145 of 1

fervent sage
#

if you are alseep in the meeting can i do the triage update but where the content is just an ad for the h server

brisk brook
vocal wolf
#

I'm good

green oriole
vale ibex
#

bot#1879

dusky shoreBOT
green oriole
cold island
#

Are you sure about that? I'd at least wait for 3.10.1

vale ibex
vocal wolf
#

I'm going to start closing inactive PRs on lance

#

markov poem gen

#

and the other one

#

basically the 2 oldest ones

fervent sage
#

i made one of those once

vocal wolf
#

xd

fervent sage
#

What're people's thoughts on bulk requests to quackstack (i.e. /ducky/bulk?amount=5 with a limit define by an env var)

vale ibex
#

Preferably after s3 bucket is my guess

fervent sage
#

ok but like

#

the feature

vale ibex
#

hmm, IG that would only help pre-rendered duckies though

#

Yea, I think it sounds like a cool idea

fervent sage
#

cause sometimes i (and lets be honest im the only production user of quackstack) need several ducks at once and dont want to make a bunch of requests lol

brisk brook
fervent sage
#

yeah

cold island
#

My email is being bombarded with merges Pensivebread

fervent sage
#

well

#

hm

#

maybe

GET /ducky/bulk HTTP/1.1
Content-Type: application/json

{
  "seeds": [
    1234,
    5678
  ]
}
#

but rthe body is optional

#

and there's a query param for amount

brisk brook
#

What do you need the bulk endpoint for generally? Can't it just be the same?

vale ibex
#

bodies on get requests will be dropped

fervent sage
#

i meant post

#

and discord doesnt like to post it seems

vale ibex
fervent sage
#

in the end regardless of s3 or local the response would look like

[
  "url",
  "url2"
]
green oriole
#

(also, the answer to your question is "yes")

fervent sage
#

@green oriole what do you mean by hotlinking the generation endpoint?

green oriole
#

what's the endpoint?

#

like, the full address?

fervent sage
#

currently?

green oriole
#

oh, it already returns JSON

#

never mind me then

static canyon
#

I'd recommend looking at how the hacktoberfest issues command works since that queries the API and works perfectly

#

You may be able to find the issue by comparing the two

rapid igloo
#

alright thanks!

timid sentinel
static canyon
#

There's a nice easy PR needing review if anyone has time: sir-lancebot#914

dusky shoreBOT
static canyon
#

^ has been merged 👍

fervent sage
#

I wonder if this last week has broken records for how many PRs we've merged

static canyon
#

Fyi I've just addressed your review on sir-lancebot#899 @vale ibex

dusky shoreBOT
static canyon
#

Should be ready for merging now

cold island
#

(might need to hard refresh)

vale ibex
#

Fancy collapsibles 🎉

green oriole
#

niiiice, a decent guide!

cold island
#

oh no

#

I found a typo

green oriole
#

I'm glad we kept my "have fun!" haha

cold island
#

🙈

#

That's a pretty bad typo actually

green oriole
#

where?

cold island
#

sec will open a PR

static canyon
green oriole
#

hah

fervent sage
#

speedmerge

static canyon
#

lol

fervent sage
#

today is like my most productive day in the last month

#

i've reviewed like

#

4 (5?) prs

#

created a few issues

#

commented on wookie's issue

#

and implemented a whole shard manager in my discord lib lol

static canyon
#

I've always loved my 2020 contributions

#

It was adding another library to snekbox or something to fix a log error

green oriole
#

lmao

static canyon
#

The only thing I did all year

fervent sage
#

is this an opportunity for me to flex my contrib graph

static canyon
#

I started really contributing in late Aug

fervent sage
green oriole
static canyon
green oriole
fervent sage
#

I've made a few things in the last year KEKW

static canyon
green oriole
fervent sage
#

its not lol

#

I just make a lot of random shit

static canyon
#

Should've gone for this smh

fervent sage
#

also <rant>
people seem to think that committing a ton to git is a bad thing because you're just commit farming but like, thats a good way to use git, it allows you to rewind more granularly if something is broken so you have the minimal amount of stuff to rollback if something breaks
</rant>

#

ive never understood people who commit a huge amount of stuff at once because if you need to roll back that commit youre probably removing a bunch of not broken useful stuff too

green oriole
#

oh wait

#

this isn't the lounge

fervent sage
#

oml akarys

green oriole
vale ibex
#

Alright, bot#1844 and site#593 are ready for review

fervent sage
#

@green oriole i see you fell into the sue/use trap Kek

green oriole
#

We should 100% sue them tho

fervent sage
#

The only thing we can do about it is not sue embeds
i do this so often

green oriole
#

Same haha

vale ibex
#

Does anyone know what the ratelimits are for editting channel perm overwrites? Is it the same as edit channel?

fervent sage
#

if you count how many times in the gtao server i've said "use" and cross reference that with message edit logs showing me correct sue to use the number is almost the same

vale ibex
#

Thanks 😄

fervent sage
#

its definitely better than the 2 per 600s limit on naming, though

vale ibex
#

Ah cool

cold island
#

I found another typo facepalm

green oriole
dusky shoreBOT
#

YOu HAvE To takE tHe CurReNT rATElIMits from the HeaderS AS IT CAn chANGE aT anY moment

vale ibex
#

I cba to get the headers out of the call lol

#

Never done ti with d.py

green oriole
#

^ reenacting of me every time I ask what the rate limit currently is on the d.py server

vale ibex
#

lol

green oriole
#

you can use curl lol

#

in faaact

cold island
#

I guess I should

green oriole
#

Huh, client accounts don't get ratelimit information back

green oriole
fervent sage
#

@vale ibex 10 per 15s

green oriole
#

Easy

#

If we get more than 5 pings per 15 I think everyone is going to die

cold island
green oriole
#

oh now it works

vale ibex
fervent sage
#

here's the full RL info for editing perm overwrites btw

vale ibex
#

I'm guessing that's per channel ratelimit too

#

rather than global?

fervent sage
#

yep, channel id is a major param so buckets are separated based on it

vale ibex
#

👌

fervent sage
#

the only global limit is the 50/s one

green oriole
#

ooh, that's per channel

#

sick

vale ibex
#

my usecase is remove overwrite for a role, send a ping and then add it back

fervent sage
#

and a very very very high global limit on webhook execs in one day per ip

green oriole
#

we just press the recycle button for that

vale ibex
#
                    mod_overwrites = channel.overwrites[self.mod_team_role]
                    await channel.set_permissions(self.mod_team_role, None)
                    await channel.send(self.config.ping_string)
                    await channel.set_permissions(self.mod_team_role, mod_overwrites)
#

ez

fervent sage
#

basically how ratelimiting works on discord (and i wrote a ratelimit handler yesterday so im quite up to date on this Kek) is that you have a sort of bucket created from 3 things and the path:

f"{channel.id}:{guild.id}:{webhook.id}-{path}" (for client side handling so this can be formatted however) so for example for editing channel overwrites our bucket is "692093569934164038:None:None-/channels/{id}" (the {id} is part of the string)

vale ibex
#

That's cool

cold island
fervent sage
#

because there's no guild parameter in channel endpoints

cold island
#

ic

fervent sage
#

it should be guild_id where thats an optional variable but i didnt feel like writing a whole codeblock for it Kek

rapid igloo
#

@static canyon would it be possible for me to submit my changes (as PR or otherwise) after you've done your restructuring? no rush, ofc, but I still need a bit more time finding a neater solution for _fetch_url, in hacktoberissues the param argument wasn't used which I'm guessing is why it still works. Apart from fixing hackstats itself I still have to refactor some things as well as removing the oct 3rd logic from last year.

fervent sage
#

but commits where you use the word and are usually destined to be multiple commits, for example

#

feat: add http client and gateway ratelimiter

  • Cool but these are totally different things, why are they in the same commit?
#

its those that annoy me most Kek

vale ibex
stable mountainBOT
#

pydis_site/apps/api/tests/test_offensive_message.py line 61

with self.subTest(fied=field, invalid_value=invalid_value):```
vale ibex
#

is it supposed to be field=field

green oriole
#

lmao yes

#

not that it matters, but yes

vale ibex
#

😄

green oriole
#

2 years ago, damn

vale ibex
#

hah yea bot#616 found it

dusky shoreBOT
vale ibex
#

site#616 even

dusky shoreBOT
vale ibex
#

currently our incidents don't work, bot#1885 fixes that 🙂

dusky shoreBOT
cold island
vale ibex
#

yea

fervent sage
vale ibex
#

🎉

cold island
#

Which PR is the next victim

static canyon
fervent sage
gritty wind
#

Just saying, you can get site to 0 much quicker 👀

#

I may be saying that because I've got PRs I need morged

fervent sage
#

links 😋

cold island
#

With the filters PR open? fat chance dogekek

gritty wind
#

Broooo just hit merge

cold island
#

Ok I'm sorry I shouldn't be weight shaming the chances

gritty wind
fervent sage
#

I've been looking through the redirects ones for a few mins now :P

gritty wind
#

heh yeah

#

I barely understand how it works

#

on account of me barely understanding how redirects work

fervent sage
#

i dont understand django so this is fun KEKW

#

I'm afraid my review will be a "yeah I dont see any glaring errors but like... dont take my word for it" type

gritty wind
#

The entirety of the redirects app is just throwing the request down an insanely long chain till some function hidden deep within the cursed bowels of django goes oh yeah, I should probably do something with this

#

Thanks alec :D

cold island
gritty wind
#

I've seen some stuff man

fervent sage
#

xith when he wakes up: holy shit there's another 9 PRs merged to add to the triage section of the meeting

gritty wind
#

Merggeed thanks Alec

cold island
cold island
#

Hmm why are they removed?

static canyon
#

Err sec

#

That's the wrong link

cold island
#

Ok I understand what the regex does now

#

Now I'm not sure why something needs to be changed in the clean PR though

static canyon
#

I'm assuming it's going to split them all into one line

cold island
#

Split them into one line?

#

you mean merge?

cold island
#

hmmm

static canyon
#

The PR merges Hello Worldinto Hello World

cold island
#

yeah I understand, just not sure if it's a good thing

#

I suppose I can prepend that character

static canyon
#

I mean yeah, I think so:```py

Allow overriding this behaviour via putting \u2003 at the start of a line.```

#

So I guesspy {bullet}...becomespy \u2003{bullet}...

#

I could be misunderstanding though

cold island
#

@vale ibex is that special character specified anywhere in the codebase?

#

As a constant or otherwise

cold island
green oriole
#

You gotta do it from command line

cold island
#

But what is the conflict? I tried resolving it locally but I don't see anything

green oriole
#

Did you

git switch cleanrework
git fetch
git merge origin/main
```?
cold island
#

yeah

#

and it says I have merge conflicts

#

but I don't see 'em

green oriole
#

Wut

#

Restart? lol

cold island
#

Aaaaah ok

#

It's because clean.py was modified but I deleted it

#

But now I need to figure out what was changed

#

Yeah it's tough to tell what was modified, because the file itself was merged fine, it's just that it's deleted

green oriole
#

Right

#

Sounds like you should rebase

cold island
#

Hrrrm but I don't want to force push at this stage

#

Was it modified in the move to dpy2?

green oriole
#

Nah

#

I didn't move any file

cold island
#

You didn't need to move it, you needed to change it

#

you did

green oriole
#

Oh, I know what the changes are

cold island
#

yeah I see it

green oriole
#

Some datetime aware stuff

cold island
#

Nope

green oriole
#

O really

green oriole
#

I do remember that one now

#

It is like the MISSING stuff

cold island
#

The funny part it that that line is irrelevant in my PR

green oriole
#

Haha, perfect

#

Time for the --merge-strategy ours

zealous island
#

Hi

cold island
#

I'll just stage the deletion and commit

cold island
zealous island
cold island
zealous island
#

Ty

cold island
#

@green oriole so what happens if I don't remove the tz info from the message creation time?

green oriole
#

You can't compare or do math with unaware date(time)s

cold island
#

You mean aware?

green oriole
#

I mean naïve/unaware :D

cold island
#

But you set the tz info to None

green oriole
#

When you set it to none it becomes naive

cold island
#

Right. Do you see the contradiction? 😅

#

You're saying you can't compare unaware times, but setting info to None makes them unaware

green oriole
#

Well, if you don't remove the timezone info, it is aware, meaning you can't compare it to naive timestamps

eternal owl
green oriole
cold island
#

Ok, I see now

#

So what is the meaning of it being aware? that the message holds the timezone of the person who sent it?

static canyon
cold island
#

Wait, so what was before?

static canyon
cold island
#

It's timezone aware, but the timezone is only ever UTC?

static canyon
#

I believe so, yes

#

I believe before 2.0 it was still UTC, but the code didn't specify that it was UTC so it was treated as timezone unaware

cold island
#

Hmm.. what is the benefit of it being aware?

#

And, wouldn't it make more sense to do everything in UTC, than make everything unaware again?

brisk brook
vale ibex
#

!help mute

stable mountainBOT
#
Command Help

!tempmute <user> [duration] [reason]
Can also use: mute

*Temporarily mute a user for the given reason and duration.

A unit of time should be appended to the duration. Units (∗case-sensitive):
y - years
m - months∗
w - weeks
d - days
h - hours
M - minutes∗
s - seconds

Alternatively, an ISO 8601 timestamp can be provided for the duration.

If no duration is given, a one hour duration is used by default.*

cold island
#

Yeah I'm just wondering if it should be specified somewhere that docstrings are now parsed this way

#

Or have it as a constant somewhere

vale ibex
#

Yea, IG we could

static canyon
brazen charm
#

how would the constant be used?

vale ibex
#

Docstrings can't be f strings tho afaik

#

I think we could have it in contrib guides tho

cold island
#

Which is recommended in the Python docs

vale ibex
#

Or, arrow.utcnow()

#

Which is aware

cold island
cold island
#

I just think that making everything unaware when the entire library is aware is like fighting the library, which makes using it more difficult

#

cc @green oriole

vale ibex
#

That was my comment too

#

I think using arrow is good for keeping consistency with the lib, but also it's much easier to use, with less pitfalls for new contribs

#

Since it doesn't have legacy concerns like datetime

cold island
#

We don't have anything that is not UTC as far as I'm aware

static canyon
cold island
#

ah

static canyon
#

For us, it isn't really useful

cold island
#

@vale ibex I think that if we want that, then we should make that change sooner than later, before we make a bunch of PRs break again

green oriole
cold island
#

Convert what?

green oriole
#

When being from naive to aware

cold island
#

Why do you need to convert from naive to aware?

green oriole
#

I feel like making it aware is more error prone though, since we are working with UTC only

green oriole
cold island
#

Like?

green oriole
#

I do remember what we get from the API is naive

#

There are probably some other stuff that I don't remember

#

Converters too?

cold island
#

Converters can be changed to be aware in the first place

#

I just tried making an unaware datetime aware, and didn't see anything wrong

#

We can also change it to be aware in the first place

green oriole
#

Can you make sure this works if your device isn't in UTC?

cold island
#

My device isn't in UTC

#
>>> import datetime
>>> b = datetime.datetime.utcnow()
>>> b
datetime.datetime(2021, 10, 17, 18, 18, 56, 69917)
>>> b.replace(tzinfo=datetime.timezone.utc)
datetime.datetime(2021, 10, 17, 18, 18, 56, 69917, tzinfo=datetime.timezone.utc)
vale ibex
#

It's utcfromtimestamp that caused the issue

#

It assumes the timestamp given is local time, so shifts the time while converting

cold island
#

Where do we use it?

vale ibex
#

I refactored it out of the help system last time I was there

#

Nit sure if we still do

#

That's in the datetime module, not arrow

cold island
#

ctrl+shift+F gave no results for utcfromtimestamp

#

Ah wait

vale ibex
#

Also, datetime.utcnow returns a naive, so when you use other datetime methods on it, it assumes the time is local time

cold island
#

You're talking about dateimte.utcfromtimestamp right? not the arrow one

vale ibex
#

Yea

cold island
#

So it's used in two places

#

I think it should be pretty easy to change it to arrow

#

Also pretty sure Mark's PR does it

vale ibex
#

Cool

cold island
vale ibex
#

The only time I encountered the issue was in the help system, since we store timestamps in redis

#

So converting those back to datetime, using datetime caused issues due to that behaviour

cold island
#

yeah but if they're aware then it's not an issue right?

vale ibex
#

Exactly

#

So that's why I want to make things aware

cold island
#

Ah ok, now I'm following

vale ibex
#

Also psql complains about naive times now too

cold island
#

What will take to make everything in psql aware? a migration?

vale ibex
#

You've probably seen it when running tests

#

Nah, it'll just work ™️

cold island
#

wdym

vale ibex
#

If you run the site tests, psql will give warnings about naive datetimes

cold island
#

Because you're trying to insert them?

vale ibex
#

Yea, it's just a warning though

#

Since we enable tz support

cold island
#

And does it store the TZ info?

vale ibex
#

I'd have to check

#

I think is does

#

Using utc by default

cold island
#

So it's already aware in our DB?

vale ibex
#

Possibly

#

Can check later when I'm home

cold island
#

And we convert it to unaware when fetching info?

#

Because if so that's another reason to make everything aware

vale ibex
#

I think we use from timestamp

#

Which I think retains tzinfo

cold island
#

Hmmm

#

I'll poke around

brisk brook
stable mountainBOT
#
It has arrived!

Here's your reminder: ^ if not already done
[Jump back to when you created the reminder](#dev-contrib message)

stable mountainBOT
#

bot/exts/moderation/infraction/_scheduler.py line 506

expiry = dateutil.parser.isoparse(infraction["expires_at"]).replace(tzinfo=None)```
cold island
#

And it's indeed in UTC by default

fallen patrol
last patio
#

god datetime is such a footgun

clever wraith
#

hey all, where does python store the blacklisted URLs? im trying to test

#

python bot*

vale ibex
#

They're in the site db

clever wraith
#

ah

vale ibex
clever wraith
#

that explains it

#

my fork isnt deleting blacklisted urls

vale ibex
#

Do you have any added?

clever wraith
#

no

vale ibex
#

Then that's why 😄

clever wraith
#

cause i dont know how to add them :P

vale ibex
#

use !blacklist add domain_name <url>

clever wraith
#

tysm

#

lmao didnt work

vale ibex
#

Did you get an error?

fallen patrol
clever wraith
vale ibex
fallen patrol
#

I presume just at the top of the file?

#
"""
Helper methods for testing.

Original Source:
https://github.com/python-discord/bot/blob/06e90af5e19d9dd83ae44ac2ae0eb3eeb43349e2/tests/helpers.py # noqa: E501


MIT License

Copyright (c) 2018 Python Discord

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
vale ibex
#

Looks good to me

fallen patrol
#

like, that should work, right?

#

cool

vale ibex
#

I'm not a lawyer, but I'm pretty sure just having the notice in your source somewhere covers it

#

but at the top of the file is good

fallen patrol
#

ye

fallen patrol
#

its pydis, not pylawyer

vale ibex
#

lol yea

#

We haven't gone after anyone yet

fallen patrol
#

joe actually might 😳

brazen charm
#

also look into the license third party file, I believe something in the test helpers is under a different license, not sure if it's in that file

stable mountainBOT
#

LICENSE-THIRD-PARTY lines 67 to 72

---------------------------------------------------------------------------------------------------
                           PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
Applies to:
    - Copyright © 2001-2020 Python Software Foundation. All rights reserved.
        - tests/_autospec.py: _decoration_helper
---------------------------------------------------------------------------------------------------```
fallen patrol
#

which I'm not using, whew

#

lol i almost used the wrong commit hash

#

what does this method do?

stable mountainBOT
#

tests/test_helpers.py lines 222 to 227

class MockObjectTests(unittest.TestCase):
    """Tests the mock objects and mixins we've defined."""

    @classmethod
    def setUpClass(cls):
        cls.hashable_mocks = (helpers.MockRole, helpers.MockMember, helpers.MockGuild)```
vale ibex
#

It's called before tests are ran

fallen patrol
#

wtf

#

ah

static canyon
#

You have three t in unittest

fallen patrol
#

!d unittest.TestCase.setUpClass

stable mountainBOT
#

setUpClass()```
A class method called before tests in an individual class are run. `setUpClass` is called with the class as the only argument and must be decorated as a [`classmethod()`](https://docs.python.org/3/library/functions.html#classmethod "classmethod"):

```py
@classmethod
def setUpClass(cls):
    ...
```  See [Class and Module Fixtures](https://docs.python.org/3/library/unittest.html#class-and-module-fixtures) for more details.

New in version 3.2.
fallen patrol
#

;-; thanks

#

...and my tests are failing but I don't even use the mock file anywhere lol

clever wraith
#

not too difficult

fallen patrol
#

ohh that's why I'm so confused

#

a bunch of the docstrings on the test/helpers.py file and test_helpers.py are copied and pasted somewhat carelessly from the last method

brisk brook
# fallen patrol like, that should work, right?

Usually yeah. The license needs to be present, either like in the file or in its own folder together with that code. Though me and Chris share the "not a lawyer" profession and this isn't legal-advice. pwease don't sue me

fallen patrol
#

hmmmm how can i check a method on a unittest mocked object was called?

#

and to get the called with attributes

austere hornet
#

Can someone tell me why I'm getting flake8 errors here?

sleek steppe
#

It’s defined as self.blank_number but it is referenced as blank_number

austere hornet
rapid igloo
# static canyon I suppose I can do the temp-fix you mentioned above and then you can PR a proper...

that's exactly what I meant. I can send you a patch so you can have hackstats working during testing (or another one to unapply) if you want, and when you submit the PR you could actually include that fix if I don't find a better one before then.
I just thought that 1) the restructuring should just copy the logic over, not too much of modifying existing logic imo and 2) didn't you say a day or two back that you could just import functions from the hackstats file? Did it work? If that method works it'd be a lot easier since I can modify that file simultaneously with the changes you have :)

trail pilot
#

@thorny obsidian so I have a question regarding the question JSON format for the trivia night, can the question information be formatted like this:

{
     "number": 1,
     "explanation": "hsidisojedbf",
     "answers": ["ahi", "irojfe", "iidif", "oofoff"],
     "correct": "iidif"
}
thorny obsidian
#

sure!

trail pilot
#

also will it be certain that there’s only 4 options per question?

thorny obsidian
#

I can enforce it, yeah

trail pilot
#

Awesome

#

@vale ibex Also, I remember you said something about this — would we want to have a subclassed button instead of using the button decorator

trail pilot
#

By the way, just curious, are the suggestions read for the “suggest more topics here” and “suggest more facts here”?

cold moon
static canyon
# rapid igloo that's exactly what I meant. I can send you a patch so you can have hackstats wo...

So my PR is ready to be pushed now. It would just need the reviews.

In regards to doing the importing, my planned way didn't work so had to change things up a bit. I essentially have _cog.py, containing the commands themselves, and then _utils.py which contains all of the helper functions (such as get_october_prs etc.) and get imported to _cog.py.

We've got two options now:

  1. I wait until we can find a better fix for hackstats and then I commit with you as a co-author
  2. I push with the temp-fix, get the reviews, and then once it has been merged you can do a separate PR with any "better" fix you find.
rapid igloo
#

well I've just found the problem by letting aiohttp send to my own CGI script. like I half-suspected yesterday, aiohttp.ClientSession.get is actually query-encoding the params, so when it's supposed to be github.com/api/blah/issues?q=+type:pr+is:public it becomes github.com/api/blah/issues?q=%2Btype:pr%2Bis:public.

A possible solution for this (not that much better than the one I had before imo) is to provide param as a string. Because according to their docs if param is a string aiohttp won't encode it. The line would look like this:

jsonresp = await self._fetch_url(base_url, REQUEST_HEADERS, params=f"q={query_params}")

And of course self._fetch_url's param argument's type hint has to be changed to Union[str, dict]

#

tell me what to do if you'd like that change committed with me co-authoring. I guess that's the best fix I can find for now (at least I've found the real problem), I don't think they have an option to disable the encoding. After your PR is merged I can submit a separate PR for my other fixes (and a (even) neater fix if I find any). Is that ok for you?

static canyon
#

Right, I'll commit this with you as a co-author (I just need to mention you in the commit description for that) and then if you find something better at a latter date you can do a separate PR.

I'll need your GitHub username so I can co-author you
@rapid igloo

rapid igloo
#

tested with lint task

static canyon
#

Thanks 👍

#

Will do it in ~30mins

rapid igloo
#

@static canyon would your PR touch the hacktoberissues file? If it does I'll do sir-lancebot#489 after yours is merged

static canyon
rapid igloo
#

ok! thanks for clarifying

short snow
#

@patent pivot Dunno who else to ping but could you add pydis/api to #dev-log

#

it doens't get comments

green oriole
#

No perm sadge

clever wraith
#

bot#1889 is ready for review! Ignore the patch of docker-compose.yml

dusky shoreBOT
vale ibex
#

If so, I'd be interested in knowing what that error was.

clever wraith
vale ibex
#

Did it show an error saying could not find env file?

short snow
#

It never happened for me. Are you sure that's the problem?

cursive relic
#

would it be possible if !user command had trashcan?

green oriole
#

If that's indeed an error, I'd rather keep the change you made @clever wraith

dim pelican
#

Should be, now with bot running discordpy2.0 could probably have a button of some sort

clever wraith
short snow
#

i had like a reaction for that but its totally personal prefernce

vale ibex
#

since it got to the point of running the container

clever wraith
#

Huh

vale ibex
#

Can you revert the change and paste the exact error here

short snow
#

!paste

stable mountainBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

clever wraith
#

Sure, after class

short snow
#

is there a utility function for forming the discord timestamp?

stable mountainBOT
#

bot/exts/moderation/modpings.py lines 230 to 233

await ctx.send(
    f"{Emojis.ok_hand} {ctx.author.mention} Scheduled mod pings from "
    f"{start: %H:%M} to {end: %H:%M} UTC Timing!"
)```
short snow
#

wanting for that part ^

#

or do i just make one with <t:>

vale ibex
#

yea, bot.utils.time

short snow
#

umm how would i do that if i only want to show the hours?

stable mountainBOT
#

bot/utils/time.py lines 26 to 39

class TimestampFormats(Enum):
    """
    Represents the different formats possible for Discord timestamps.

    Examples are given in epoch time.
    """

    DATE_TIME = "f"  # January 1, 1970 1:00 AM
    DAY_TIME = "F"  # Thursday, January 1, 1970 1:00 AM
    DATE_SHORT = "d"  # 01/01/1970
    DATE = "D"  # January 1, 1970
    TIME = "t"  # 1:00 AM
    TIME_SECONDS = "T"  # 1:00:00 AM
    RELATIVE = "R"  # 52 years ago```
vale ibex
#

These are the formats available

short snow
#

Oh okay thanks

clever wraith
#

@vale ibex seems to be fine without it

vale ibex
#

👍

clever wraith
#

First big PR to bot for me

short snow
#

🎉

short snow
#

@brisk brook we can use the get fetch utility function for getting the helpers role

#

Also rather than adding is None or try..except can we add a validation functionality which will log all the "invalid" IDs present in the bot

#

with exception level

#

basically

#

just add roles and emojis here

#

(i am away from laptop so not logged onto github)

clever wraith
#

@vale ibex regarding your comment, which blacklisted URLs have a scheme explicitly listed? I don't see any on the test bot

vale ibex
#

you will only see domains you have added

cold island
#

iirc some filters are there by default

vale ibex
#

We have 31 domains that start with http

vale ibex
cold island
#

Where are the docs for dpy 2?

vale ibex
#

you need to manually change the url 🙃

cold island
#

hmm how do I spawn a poetry shell? it says it's spawning it and then does nothing

green oriole
#

poetry shell

vale ibex
#

if poetry shell isn't doing it for you, you can run the active script at /path/to/venv/Scripts/Activate.ps1

#

changing the ext to whatever os you're on

green oriole
#

It should usually spawn a new shell

cold island
#

it didn't

green oriole
#

What OS?

cold island
#

but then doing python seems to have done it

#

Windows

vale ibex
#

This is what I do on windows in pwsh 7 ```powershell
PS C:\Users\Chris\src\bot> & c:/Users/Chris/AppData/Local/pypoetry/Cache/virtualenvs/bot-xr7Q380s-py3.9/Scripts/Activate.ps1
(bot-xr7Q380s-py3.9) PS C:\Users\Chris\src\bot>

green oriole
#

So I guess it worked? shrugs

#

It will usually skip the hello message

cold island
#

Yeah it's weird.. it didn't spawn a new shell but it's now using the right env

vale ibex
#

Yea, mine stays in the same shell, just with the prefix

green oriole
#

Interesting, on fish it does spawn a new shell

cold island
#

Didn't even get the prefix

#

I get the prefix for conda envs

vale ibex
#

This is what I get with just poetry shell ```
PS C:\Users\Chris\src\bot> poetry shell
Spawning shell within C:\Users\Chris\AppData\Local\pypoetry\Cache\virtualenvs\bot-xr7Q380s-py3.9
PowerShell 7.1.5
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\Chris\src\bot>

#

So yea, no prefix

cold island
#

yeah powershell never gave me prefixes

#

but I did get a prefix with the pipenv envs on cmd

green oriole
#

Doesn't powershell respect PS1 lmao

fallen patrol
#

@cold island fyi the docs command is dpy2

#

!d discord.Thread

stable mountainBOT
#

class discord.Thread```
Represents a Discord thread.

x == y Checks if two threads are equal.

x != y Checks if two threads are not equal.

hash(x) Returns the thread’s hash.

str(x) Returns the thread’s name.

New in version 2.0.
cold island
#

yeah I know

fallen patrol
#

ah okay

thorny obsidian
green oriole
#

Haha, it took me like 10 minutes to figure it out last time 🤡

cold island
stable mountainBOT
#

bot/converters.py line 472

dt = dt.astimezone(dateutil.tz.UTC)```
vale ibex
cold island
#

I guess it didn't matter because the TZ was removed a line later

vale ibex
#

lol

cold island
#

Oh arrow also uses the dateutil one

#

So I guess I'll keep that

cold island
vale ibex
#

lol

cold island
#

Why are some features already using timezone aware datetimes lol

#

I thought we didn't want to mix the two

vocal prairie
fallen patrol
#

none at all, just to answer the previous discussion

#

the gist is yes, this is a new intent and will have to be patched in at that point

vocal prairie
#

Ah, I only saw the utc discussion, mb

cold island
#

He's referring to a discussion here from some time ago when Danny quit

#

not something recent

chilly quarry
#

Hi, I have a question.
Suppose we want to use face recognition in a mobile application using Python language, what library do we use or how do we link these both together?

gritty wind
#

Hey, this channel is for contributing to this server's project's specifically

cold island
#

In the places where we display a datetime, do we want to include TZ info now?

green oriole
#

Why are you doing this to me

#

What places are you talking in particular? Because if it is always +0000 I don't think it is any useful

cold island
#

ngl, I did forget it's all in UTC a couple of times

stable mountainBOT
#

bot/exts/moderation/incidents.py line 94

timestamp=datetime.utcnow(),```
cold island
#

Although I suppose that can use a proper Discord timestamp

green oriole
#

isn't that one going in a footer

cold island
#

oh

green oriole
#

because in their eternal wisdom discord decided to not support links or timestamps in footers

cold island
#

wait

#

even though it's tz naive?

#

Or maybe because of it

green oriole
#

oh yeah it is an embed timestamp native thingy

#

so discord will localize it itself

cold island
#

icic

#

So I'll just not touch it

fallen patrol
stable mountainBOT
#

bot/utils/time.py lines 69 to 70

if isinstance(timestamp, datetime.datetime):
    timestamp = (timestamp.replace(tzinfo=None) - datetime.datetime.utcfromtimestamp(0)).total_seconds()```
fallen patrol
#

correct me if I'm wrong, but it seems like int(timestamp.timestamp()) gets the same result

short snow
#
2021-10-19 05:44:49 | bot | CRITICAL | 
Traceback (most recent call last):
  File "/home/shivansh/Programming/pydis_projects/bot/bot/api.py", line 67, in maybe_raise_for_status
    response_json = await response.json()
  File "/home/shivansh/.cache/pypoetry/virtualenvs/bot-5X3Lakqr-py3.9/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1097, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('http://api.pythondiscord.local:8000/healthcheck')

#

while running the bot

#

uh subdomain migrations happened

#

yeah works

keen valley
short snow
#

@vale ibex the border for the bat is not perfect, I am not sure if that's okay (since they won't be visible as they are small on the profile pic)

austere hornet
dusky shoreBOT
austere hornet
#

Look how cool that is, huh?

green oriole
#

Yo @fervent sage! Do you have any suggestion for a d.py extension to support slash commands and/or context menus?

cursive relic
#

the bot does not have a un bookmark. Right?

green oriole
#

not yet, yes

#

feel free to open an issue if that's something you want, it sounds quite useful

cursive relic
#

I'm still bad at detailing

#

would this be good enough?

#

(I fixed the last line of it)

static canyon
#

Are bookmarks currently stored in a database?

cursive relic
#

I don't know, I have not read the source

static canyon
#

Also keep in mind the bot won't be able to do anything with reminders > 14days old because of API limitations

#

Which imo makes the feature much less useful

cursive relic
#

bot won't be able to do anything with reminders? What does that mean

static canyon
#

It won't be able to delete the discord message

#

Bots are limited to deleting messages <= 14days old

cursive relic
#

hmm

#

Well better than nothing, if you mistakenly create a bm

static canyon
static canyon
cursive relic
#

but it is detailed enough, right?

green oriole
#

I'm 99% sure they aren't?

static canyon
#

Well they were at some point 🤷

green oriole
#

That's for bulk deletion I am pretty sure

static canyon
#

Well then ignore me @cursive relic lol

static canyon
cursive relic
#

posted it 😄

clever wraith
#

i had a suggestion- instead of giving the people help-cooldown role
the bot can give the user their respective channel name role
for eg.-- the role can be #help-banana, for a person who has their help channel named as help-banana

green oriole
#

That would be a lot of roles, we are already making the role modal lag quite a bit

short snow
#

lemme have a look

cursive relic
#

I alrd opened it ¯_(ツ)_/¯

short snow
#

similar

#

but not the same

#

can be implemented together

cold island
#

You could just provide it message IDs from the DM channel

cursive relic
#

In which issue?

short snow
#

for unbookmark ^

cursive relic
#

Ye, Akarys mentioned it 😅. I completely forgot that way

static canyon
#

@austere hornet how are you developing sir-lancebot#901? What IDE & how are you committing (via command line or some other tool)?

dusky shoreBOT
static canyon
stable mountainBOT
#

bot/exts/help_channels/_cog.py lines 130 to 138

if isinstance(message.author, discord.User):
    log.warning("`​message.author`​ is a `​discord.User`​ so not handling role change or sending DM.")
else:
    await self._handle_role_change(message.author, message.author.add_roles)

    try:
        await _message.dm_on_open(message)
    except Exception as e:
        log.warning("Error occurred while sending DM:", exc_info=e)```
brisk brook
#

Change it to if not isinstance(message.author, discord.Member): and reword it to say "message.author isn't a discord.Member"

#

Also you probably want to make that an f-string so that when you look at the logs you can make out who it is

static canyon
#
if not isinstance(message.author, discord.Member):
    log.warning(f"`message.author` ({message.author} / {message.author.id}) isn't a `discord.Member` so not handling role change or sending DM.")
...```?
#

@brisk brook ^

brisk brook
#

👍

static canyon
#

Will push in a sec 👍

#

Pushed @brisk brook 👍

#

@green oriole before you merge I'd like to change log message as @vale ibex suggested

green oriole
#

Yup, wasn't going to merge

static canyon
#

Also left a comment on the PR re why log.warning

#

Another PR merged 😄

green oriole
#

Excellent

static canyon
#

sir-lancebot#909 is a pretty easy review if anyone has time by the way

dusky shoreBOT
static canyon
#

Just needs a core-dev approval

austere hornet
green oriole
brisk brook
#

Huh 🤔

cold island
#

@green oriole how can ban fail with a user if we can ban people outside the server?

green oriole
#

oooooooooh

#

it is just me being a dum dum

#

because I was testing with warn pained_smile

cold island
#

lol

green oriole
#

Nice, getting 6 emails about cancelled workflows because I pushed too quick

trail pilot
green oriole
#

lol

static canyon
short snow
#

👀 just enable pre-commit

static canyon
static canyon
short snow
#

edited or it loaded slowly for me but okay

Access to pre-commit stuff from the command prompt isn't that obvious from all command prompts

light solstice
brazen charm
#

in almost all cases you can just append objects.inv to the base url

light solstice
#

I see

#

let me try

#

oh yeah it works, thanks!

#

so the problem with commands like !d list.append is that these methods are not included in the python inventory?

green oriole
#

yes

light solstice
#

and then I thought of adding these methods exclusively in the source code, with base url as https://docs.python.org/3/tutorial/ but I realized that these pages donot follow the parsing pattern of the documentation page. So if I want to add these I will have to create a different way of parsing these pages

austere hornet
#

!remind 6H download PyCharm

stable mountainBOT
#
Of course!

Your reminder will arrive on <t:1634671498:F>!

green oriole
cold island
#

I think we need a new priority tag

green oriole
#

"pAkarys is being obnoxious"

short snow
#

@brisk brook I have left a few comments on all your 3 reviews.

vale ibex
#

Just saw your comment on bot#1892 @timid sentinel, I've made it so that we run the filters against the original, the normalised and the cleaned normalised name

dusky shoreBOT
fallen patrol
brisk brook
#

MKDocs has an extension to support this

#

It has become a standard that other tools use as well

thorny obsidian
#

@molten perch do you have a screenshot of the last iteration of the .aoc per-day stats output?

molten perch
#

Last iteration as in the last day and last star?

thorny obsidian
molten perch
#

Oh, sure.

thorny obsidian
#

I'm writing up a changelog for it now

molten perch
#

Actually, just partially. After the view reaches a timeout it deletes every button. I'll take a new screenshot.

#

@thorny obsidian That's it.

brazen charm
brisk brook
#

Mkdocstrings should have it granted you enable it

brazen charm
#

may be worth opening an issue for it then if it's something that's feasible to parse programmatically, I think that's the only other major documentation generator

stable mountainBOT
#

docs/mkdocs.yml line 63

enable_inventory: true```
brisk brook
#

I haven't tested it but it should be enabled I hope lol

short snow
#

that theme....

brisk brook
#

Yes I don't think you realize how much I've hacked it together to make it have those colors

short snow
#

btw that thanks for that, adding it for my package to get docs in my terminal 😄

brisk brook
#

It looks correct on desktop though

#

I am gonna take another pass over the docs for mobile when I get the time to

short snow
#

i am on desktop

#

chrome

brisk brook
#

I've spiraled (procrastinated) into making a sans-IO implementation of the Discord gateway

brisk brook
short snow
#

ok yeah, its white on small screens

#

big screens its ok

#

i just had the window size on edge

brisk brook
#

Feel free to DM me like a complete screenshot. I'm going eating I'll be back

brisk brook
cold island
#

unittests are the bane of my existence

cold island
#

ok I prevailed

#

this time

cursive relic
#

Does @dusky shore support buttons?

thorny obsidian
#

yup!

austere hornet
#

!remind delete 3305

stable mountainBOT
#
I'll allow it.

That reminder has been deleted successfully!

cold island
#

isort is really nice

#

bot#1895

dusky shoreBOT
green oriole
cold island
#

No, it fixed my imports without bothering me about it

green oriole
#

We take those

cold island
#

@green oriole @vale ibex I think despite its size it's a relatively simple PR, so would appreciate if you could take a look in the next few days, would like to get it out of the way as soon as possible

green oriole
#

I caaaan have a look in like 24h

#

Gotta get destroyed at my next exam first

cold island
#

Happy destruction

green oriole
#

Thank you

austere hornet
#

And thanks for the suggestion 🙂

static canyon
austere hornet
#

I did open the project but I don't see anything like what you asked

#

Also idk what you mean by "everything"?

static canyon
#

If it didn't then you need to set up the poetry env

austere hornet
#

Oh ok got it, let me check

static canyon
#

It would be really obvious if it had because there's multiple popups for it

austere hornet
static canyon
#

I can't really walk you through it because I can't remember how to do it all myself to be honest

austere hornet
#

There is Google for that lol

static canyon
#

But you'll need to configure poetry first

#

And then there's this menu for git stuff as well as the three icons in top right

austere hornet
static canyon
dim pelican
#

Maybe an uncommon opinion, but I think the git commandline works pretty well with the poetry set up and pre-commit hooks installed

static canyon
#

I personally prefer using PyCharm for git stuff other than rebasing (git rebase -i {commit_hash}) and git log --oneline

#

Example of pre-commit saving having to do a separate fix-linting commit

austere hornet
#

Will keep that in mind in the future

green oriole
rapid igloo
trail pilot
#

Does anyone know why discord.py is trying to load a file within a package as a cog?

#

discord.ext.commands.errors.NoEntryPointError: Extension 'bot.exts.events.trivianight.questions' has no 'setup' function.
I'm not trying to load the questions file as a cog though, just a helper file

#

Nevermind, turns out you need to prefix _ before the filename to avoid loading as a cog

fallen patrol
#

@brisk brook what is the website you used to deeply search the repos previously?

short snow
#

it works perfectly fine on my end

#

the hacktober issues command

rapid igloo
#

it's for our current .hackstats

short snow
#

even that works pithink

rapid igloo
#

it works for you because tizzy has the temp fix in the PR

short snow
#

but he applied it on hacktober issues not hacktober stats

rapid igloo
#

You mean this?

Added a temp-fix to the already broken .hacktoberissues courtesy of hedyhli. I believe they're planning to write a more permanent fix soon™️.
I believe it was a typo

#

though

short snow
#

Ah okay I mis-undestood your comment

rapid igloo
#

thinkmon what did you think it meant?

#

should I edit it

short snow
#

its fine, i thought that the comment was for the commit like the code, but you meant the pr description

rapid igloo
#

oh right got it

fallen patrol
#

@tawdry vapor fwiw..... arrow is not a drop-in replacement for datetime

#

and I have now learned this in all of the wrong ways

#

even if it passed the isinstance check, which it doesn't

#

!e

import arrow
time = arrow.utcnow()
print(time.timestamp)
print(time.datetime.timestamp()) # arrow.Arrow.datetime is the underlying datetime.datetime object of any arrow.Arrow object
stable mountainBOT
#

@fallen patrol :white_check_mark: Your eval job has completed with return code 0.

001 | 1634702385
002 | 1634702385.805727
tawdry vapor
#

I know

fallen patrol
#

ah okay

tawdry vapor
fallen patrol
#

any other differences that I could possibly be alerted of 😛

tawdry vapor
#

Some stuff with classmethods which I vaguely note in that discussion

fallen patrol
#

!e import arrow ; arrow.utcnow().timestamp()

stable mountainBOT
#

@fallen patrol :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | TypeError: 'int' object is not callable
fallen patrol
#

thanks

fallen patrol
#

...

#

!e import arrow ; print(arrow.version)

stable mountainBOT
#

@fallen patrol :white_check_mark: Your eval job has completed with return code 0.

0.17.0
fallen patrol
#

how to get a snekbox package updated?

#

!pypi arrow

stable mountainBOT
fallen patrol
fallen patrol
#

yes

#

thank u

#

i've been using the github source search but it doesn't help much

green oriole
steady junco
#

I know about #changelog but I see many people reviewing the change, How can I also rewiew

obtuse arrow
#

@steady junco You might want to start with making your own contributions first. Once you have some experience with our projects, you can help out with reviewing other people's contributions. See here: https://github.com/python-discord/sir-lancebot#getting-started

GitHub

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development. - GitHub - pytho...

steady junco
#

Oh great, Thanks

short snow
static canyon
#

!remind 1h10M ^

stable mountainBOT
#
Okay.

Your reminder will arrive on <t:1634716652:F>!

obtuse arrow
#

I feel like we should link a contribution starter guide in this channel's description.

#

And it should reference that review guide.

rapid igloo
#

maybe here too:

#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contributing guidelines
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
obtuse arrow
#

Oh, cool, didn't know about that either.

static canyon
# rapid igloo maybe here too:

We decided against mentioning reviews in the tag since it's usually not a good first contribution (it's better to get familiar with the codebase & our styling etc. first)

static canyon
obtuse arrow
#

Can't we link to the review guide in the contribution guidelines somewhere, though?

#

I mean, even if you're not gonna do a review, you're gonna receive one, so it might be good to know what it's about.

rapid igloo
obtuse arrow
#

Aah

#

I see

#

Nevermind, lol

obtuse arrow
#

That was a different contribution guide to the one I saw before

rapid igloo
#

maybe !contributing could be an alias?

obtuse arrow
#

Actually, the tag link says "contribution guidelines", but links to the contribution guide, and we have a separate document titled "Contribution guidelines", which is why I mixed them up

static canyon
obtuse arrow
#

So maybe the link in the tag should say "contribution guide" instead

static canyon
#

There's a PR for adding that ability though

rapid igloo
#

ah ok

static canyon
#

There's fuzzy matching but not actual aliases

rapid igloo
obtuse arrow
#

Anyway, "contributing guidelines" is still the name of an entirely different document.

#

And, again, I think we should link to the guide in the channel description.

rapid igloo
#

For the tag maybe "Contributing guides" is better (like you said but plural). As I understand it "guides" is like tutorials and "guidelines" is closer to rules/conventions, since it links to /contributing/ not /contributing/contributing-guidelines/

obtuse arrow
#

Yeah, exactly.

cold island
#

That's good and all, but a reminder that without an issue/PR nothing will change 😛

short snow
obtuse arrow
static canyon
obtuse arrow
#

Site to change a tag's content and a channel description?

static canyon
#

Oh I thought you meant the guide thing

obtuse arrow
#

What's the "guide thing"?

static canyon
obtuse arrow
#

Maybe I can just add both suggestions in a single meta issue? They're kind of related anyway.

cursive relic
#

would it be possible to add a button or reaction (if it makes sense) as some sort of check, to be sure you actually want to remove the bm?

#

at the sir-lancebot#918

dusky shoreBOT
cold island
obtuse arrow
#

Alright

stable mountainBOT
obtuse arrow
cursive relic
steady junco
#

Can I work on a Funny gif like a command .funny and it will show a funny gif for @dusky shore

vale ibex
steady junco
#

What is that error Attribute Error

vale ibex
#

That was a joke command that was added at runtime, rather than being in the bot properly

#

it's been removed now

steady junco
#

pithink cool

vale ibex
#

Depends on exactly what you are planning to implement. I'd suggest raising an issue on sir-lancebot with exactly what you intend to do

steady junco
#

I wanna make a command called .funny and it will show a funny gif

#

Simple!!

vale ibex
#

The things you should cover in the issue is where you intend to source the gifs from, and how you intend to make it less spammy

#

.src

dusky shoreBOT
steady junco
#

I can take the gifs from tenor

vale ibex
#

Sure, feel free to include all the details in the issue

#

then everyone can give feedback in their own time

steady junco
#

Ok

#

But I want permission to start making it

vale ibex
#

Yes, that's the process to get permission

#

create an issue, people discuss implementation, then you get permission or it gets closed

steady junco
vale ibex
#

Yes

steady junco
#

Alright Can I also get help from other people here for adding some features like cooldown

#

Like a team

vale ibex
#

yup, if it gets approved you can ask questions here, or you can ask people if they want to work on it with you

steady junco
#

😁 alright

cursive relic
#

So more people can discuss it if needed.

vale ibex
#

I've added it in there 🙂

cursive relic
#

Thx 😄

steady junco
#

Issue created

#

@vale ibex Now How will people start discussing on the topic 🤔

vale ibex
#

When they see the issue they will reply in their own time.

#

Be patient, everyone here is a volunteer.

steady junco
#

Oh ok I was patient but actually I didn't how would they know that I created a issue

vale ibex
#

When a new issue is added, it gets the planning label

#

we often look over those issue to add thoughts onto them

thorn ibex
#

Hey, just wondering, how long does it take for a resource to be added to the resources page?

#

Because it's nearly been a month since I submitted my issue on GitHub (yes, I understand a month in the grand scheme of things is nothing)

#

Just, any specific time range?

patent pivot
#

which issue are you referencing? I can see if I can find what the status is - we could try table it for discussion in our staff meeting

thorn ibex
#

(Also, cool mask)

patent pivot
#

haha, thank you

#

I'll add it to the agenda for this week, if we get a chance we'll talk about it, thanks for the poke

inner walrus
#

isn't @dusky shore running on dpy 2.0?

patent pivot
#

yep

sour wolf
#

does @dusky shore have any access to stats related services?

cold island
sour wolf
#

i want to try and compute a breakdown of where my messages are, total messages, % of messages in offtopic vs on topic channels, % of messages in the three ot channels, my most active channel etc

cold island
#

No, lancebot can't do that. Python has access to the metricity database, but it's mostly admin restricted

vale ibex
sour wolf
#

sad, so do i just gotta bother admins everytime?

cold island
#

At the moment yes

thorny obsidian
#

@trail pilot so, here's a fun concept, unsure how you feel about it
(also cc: @vale ibex for core dev insight)

I want to prevent people from copy+pasting+evaling code question snippets for the trivia night. What if we turn the question itself into an image?

vale ibex
#

I was semi-serious about using unicode chars for code

#

dropping a character here and there in keywords would solve that

sour wolf
thorny obsidian
#

unicode how? example?

vale ibex
#

IE if there's a for loop, use some esoteric o symbol that looks similar

#

scatter those around the place and it means that the time it would take to fix the code, the question would be over

thorny obsidian
#

I know @patent pivot maybe had some concerns with stats-on-demand but maybe there's a smart way to do a limited subset of stats available for a user?

thorny obsidian
patent pivot
#

we had some idea a while ago to do per user stats with commands on metricity

vale ibex
#

I mean at that point if they're short it wouldn't be much effort to type into a repl

#

even from an image

thorny obsidian
#

true

patent pivot
#

i think it was messages by hour of day, messages by day and messages by category or something, just needs someone to implement it

#

we also need to add thread support to metricity

#

still not fully decided on my implementation there

thorny obsidian
#

Is there an issue on metricity for it?

cold island
#

I have to wonder how resource intensive that might become

#

If anyone can invoke it

vale ibex
#

I'd suggest putting it behind discord oauth, so you can only get your own stats

#

and heavily caching

#

it shouldn't be too bad, not sure what the indexes are like on messages

patent pivot
patent pivot
vale ibex
#

Ah cool

short snow
cold moon
trail pilot
#

Could I add this in the second iteration?

thorny obsidian
thorny obsidian
#

But yeah, not a thing that's necessary for MVP

trail pilot
#

Cyrillic E could work for e

#

I’m at school rn but when I get home I’ll look into some weird Unicode

brazen charm
#

insert zero width spaces everywhere?

trail pilot
#

What’s the copy and paste for zero width spaces?

#

Or rather the Unicode escape char for python

brazen charm
#

codepoint 200b, or zero width space for the named escape

trail pilot
#

ah

#

On a good note - I finished the basic structure (MVP) for the question and scoreboard and now it’s just adding functionality for the trivia night cog

#

Also - would anyone want to review sir-lancebot#909
It’s a pretty quick review and just needs a core dev approval; just a few lines of code changed to prevent an error with .challenges

dusky shoreBOT
fallen patrol
# thorny obsidian <@!584817706646110333> so, here's a fun concept, unsure how you feel about it (a...
#

any other ideas, since an image can be easily put through ocr?

patent pivot
fallen patrol
#

so that means you'd be able to see when I send messages?

#

or anyone

#

@patent pivot ?

patent pivot
#

i can alreayd see that

#

lol

#

this is a command that allows a user to fetch their own stats

#

not anyone

#

just you

fallen patrol
#

And you wouldn't look at it either?

patent pivot
#

& it would not factor in deleted messages, only internal stats show those

#

i mean it is inside discord

#

you run a command in discord and it shows

fallen patrol
#

Fwiw, collecting that data without an explicit user consent is against the developer terms of service iirc

patent pivot
#

uhhhhh