#dev-contrib
1 messages · Page 57 of 1
Then how py bot does scraping of docs?
for example python has the inventory on http://docs.python.org/objects.inv, that's downloaded when the bot starts
Oooo
How can I check that
pythondiscord.com - A Django and Bulma web application. - python-discord/site
all the ones we have stored
and we can add them with
!doc set
Missing required argument package_name.
!docs set <package_name> <base_url> <inventory_url>
Can also use: docs s
*Adds a new documentation metadata object to the site's database.
The database will update the object, should an existing item with the specified package_name already exist.
Example:
!docs set python https://docs.python.org/3/ https://docs.python.org/3/objects.inv*
So can I store this data in db
Like bot make inventory url and store in db and when someone fire command bot look there
you need to find the inventory URLs, but yes
If they don't have the inventory then your choices are pretty much only getting the urls for every symbol yourself or redesigning the whole cog
Actually I love to do programming but I am a very big noob and where I live programming is not so appreciated I don't know y so sorry if I disturb you much ,I only have this server to clear my doubts
@patent pivot where can these emojis be found?
hmmmmmm
k
right click > copy link > save image
I don't see a reason why not
Would some stats be wanted for the doc (something like fetched package) joe? slowly reworking parts of it so can throw those in
oh that'd be super dope
yeah
hmm you know
maybe we could do the whole symbol
flask.Response or whatever
docs_fetches.flask.Response
@brazen charm
Stat for the individual symbol counts?
because if we want total number of flask we can do doc_fetches.flask.*
hmmm
let me see
There's a lot of individual symbols that'd can potentially be fetched, not familiar with the stats but could that be an issue?
@patent pivot @clever wraith they're GitHub's assets: https://github.com/primer/octicons
ahhh
I have 2 ideas for PyDis GitHub bot: (Note: Both suggestions is for Contributors in this server only. Giving these permissions to everyone will be too risky to be abused, but I think Contributors is enough trusted for these.)
-
Make possible to add some labels with defining them in title of issue/PR. Example:
[level:0][planning][area:api,moderation] My issueshould add these labels to issue/PR (don't addplanningto PR, in PRsWIPshould available). This should not apply to all labels, like priority is something that users can't measure themself I think. After applying labels, this should edit title and remove labels from there. -
Add possibility to self-assign to issue with attaching
[assign]at start of comment. This should not do this when some user is already assigned. This should automatically assignWIPlabel too.
The titles would be way too messy with that info included
I mean, title should automatically edited after labels added by bot.
@cold moon I like the ideas
not so sure about the [assign]
i like the natural language bots
like
I would like to work on this issue.
Title changes will be kept in the PR so I don't think putting it there if it's deleted right away would be nice
It's also totally non-discoverable
I wonder whether it'd be possible to automatically transfer area tags from the linked issue, if there is one
but I guess there can be multiple
Maybe yes verbose version for assigning is better
Maybe for @dusky shore there should available [season:<season>] label assigning, when SeasonalBot will use GitHub bot too in one day.
SeasonalBot does use it
It's currently down because I upgraded to macOS Big Sur and I'm just going to deploy it to K8S instead of set it up locally
I also think labels is something that core devs should be assigning kind of
since things have been mislabelled before where people don't get the labels and such
and it's kind of the purpose of this chat to communicate with core devs
pinging a core dev and asking for an assignment of labels is fine if we haven't already got to it
How bot decide we are talking asking about discord or datetime like !d discord.clinet or !d datetime😅
As I mentioned, it uses the pregenerated inventory those doc pages provide. That's then parsed into the inventories dict of the cog. For example the entry for discord.Client looks like this "discord.Client": "https://discordpy.readthedocs.io/en/stable/api.html#discord.Client"
The packages aren't differentiated, it's just one big dict of symbols
Ok
Means bot only need this url = https://discordpy.readthedocs.io/en/stable/api.html/objects.inv and it breaks when command is fired plz correct if I am wrong
the url will be https://discordpy.readthedocs.io/en/stable/objects.inv but what do you mean with "it breaks" ?
I meant it breaks into base url and package name auto?
with the site set up, you use the commands joe has shown above to add the inventory url and that adds all the symbols to the dict
https://discordapp.com/channels/267624335836053506/635950537262759947/725763875936534610 all 3 need to be provided
Ty
@green mesa help me yaar
Ahhh actually u have to ask for help in help section
ok
This is dev contrib channel
Plz read the topic
@clever wraith We don't encourage helping 1v1 via DM, you can definitely get one of the free help channel / ask in a topical chanel, that way others who have similar questions can benefit from the conversation as well
To grab a free help channel, you can check out #❓|how-to-get-help for more information
@gusty sonnet it's not for help, he's my friend
I assumed that you needed help from your message. If you ever need help for specific python question, please do ask in the server instead
One more suggestion about GitHub bot. Not high-priority, but maybe good:
- When user who don't have write access approve PR, bot should give approval too. Currently core devs have to force-merge PRs, because not enough review, but this will remove it. Also maybe this help to display better in GitHub UI.
We don't need to force merge, another core dev adds an approval
Yes, I got the seasonalbot running on my Raspberry Pi. Took me 'only' two days...
Yeah, it is a bit hard to setup on arm devices
And Apple is moving computer to their own ARM processors...
!eval command have no external dependencies
It does have some libs, but there wouldn't be much use from the discord package
yeah it can't interact with discord so
GitHub bot is up and running in Kubernetes now and has auto-deploy setup (I'll maybe open source the repo down the line)
!evalcommand have no external dependencies
@cold moon we so have some, on top of my head, I think they are numpy, scipy, networkx, pandas and forbiddenfruit available in the container
yeah
Oh
I have currently some ideas about @stable mountain aliases (what is currently in Aliases cog) rework to custon decorators and I hope I can open issue later today.
@patent pivot so for the doc stats, should it be package.symbol or just package ? You mentioned something about nesting problems but I'm not familiar with the stats to know what those could be
package.symbol was dodgy yeah, just package will do
Would that be a counter increment or a gauge?
counter would probably be best
Wasn't sure from the explanation here https://pythondiscord.com/pages/statistic-infrastructure/#counters where it's suggested counters are for the rate and gauges for precise numbers
Does the actual number matter here, or just their relative increases? Or did I misunderstand that
I should probably reword that
In our case at least, I think counters can be thought of as things that will always increase, as opposed to gauges which fluctuate
counters can still be used to fetch totals by using the integral function in graphite, which is what I do for things like message count
accuracy is less important and it takes a bit less storage space
we use gauges for stuff like guild member counts or statuses
counters for pretty much everything else
Gauges are a constant data type. They are not subject to averaging, and they don’t change unless you change them. That is, once you set a gauge value, it will be a flat line on the graph until you change it again.
Gauges are useful for things that are already averaged, or don’t need to reset periodically. System load, for example, could be graphed with a gauge. You might use incr to count the number of logins to a system, but a gauge to track how many active WebSocket connections you have.
Counters are the most basic and default type. They are treated as a count of a type of event per second, and are, in Graphite, typically averaged over one minute. That is, when looking at a graph, you are usually seeing the average number of events per second during a one-minute period.
are their names from the inventories fine or should it use the ones they have in the api?
In [2]: self.bot.get_cog("Doc").rs
Out[2]:
{'Django', 'Flask', 'Kivy', 'Matplotlib', 'NetworkX',
'NumPy', 'Pillow (PIL Fork)', 'PySide', 'Python',
'Python Arcade Library', 'Requests', 'SciPy', 'aiohttp',
'dateutil', 'discord.py', 'more-itertools', 'pandas',
'urllib3'}
These are from the inventories I have locally
alright I'll pass those lowercased then
most of the time we use the import name
Joe, are you maintaining your own k8s cluster on bare metal?
@prisma path for what? pydis or personal?
Well both, but I saw your screenshot from pydis :-)
pydis does not use kubernetes, I use kubernetes personally but don't manage it, it's a Scaleway Kapsule https://www.scaleway.com/en/docs/get-started-with-scaleway-kubernetes-kapsule/
Discover how to get started with Scaleway Elements Kubernetes Kapsule

this deploys dashboard, updates things and autoheals your nodes for you
Their prices are kinda reasonable actually.
I wanted to use k8s for my personal stuff too, but I only have 1 physical server 
Yeah, I get most of my stuff through them and have never had a bad experience. I pay €7.99 for my Kapsule & I think €2.99 for my VPS
monthly that is
yeah I just run a single node kubernetes
👍
is there something I'm missing about the bot's in_whitelist check?
even copying it basically verbatim doesnt work
gonna need more info than that, @clever wraith
but that check also had a decorator counterpart, and the deco is usually combined with certain constants so maybe those are the pieces missing
no i-- i kinda forgot to load my error handler
okay
honestly im learning some decent thing from that bot's code ^.^
good. that's a big part of the intention
okay, so, i'm creating a discord bot heavily inspired on @stable mountain, and i'd like to know how more or less you save infractions like tempbans and tempmutes
i know they go in a database, but, how they are more exactly organized?
this might interest you:
https://github.com/python-discord/site/blob/master/pydis_site/apps/api/models/bot/infraction.py
pythondiscord.com - A Django and Bulma web application. - python-discord/site
oh thanks
i was diving into bot instead of site so i didn't notice it
well i think you didn't understood my question
imagine this is a table, right?
| ------ | ----- | ----- |
| | | |
|--------|-------|-------|```
(sql)
how would be the infractions organized?
Table "public.api_infraction"
Column | Type | Collation | Nullable | Default
-------------+--------------------------+-----------+----------+--------------------------------------------
id | integer | | not null | nextval('api_infraction_id_seq'::regclass)
inserted_at | timestamp with time zone | | not null |
expires_at | timestamp with time zone | | |
active | boolean | | not null |
type | character varying(9) | | not null |
reason | text | | |
hidden | boolean | | not null |
actor_id | bigint | | not null |
user_id | bigint | | not null |
Indexes:
"api_infraction_pkey" PRIMARY KEY, btree (id)
"unique_active_infraction_per_type_per_user" UNIQUE, btree (user_id, type) WHERE active = true
"api_infraction_actor_id_ed96dde9" btree (actor_id)
"api_infraction_user_id_8714e9f5" btree (user_id)
Foreign-key constraints:
"api_infraction_actor_id_ed96dde9_fk_api_user_id" FOREIGN KEY (actor_id) REFERENCES api_user(id) DEFERRABLE INITIALLY DEFERRED
"api_infraction_user_id_8714e9f5_fk_api_user_id" FOREIGN KEY (user_id) REFERENCES api_user(id) DEFERRABLE INITIALLY DEFERRED
thanks @patent pivot!!!
np
so, as i see, basically each infraction is a table, right?
each infraction is a row in the table
okay
I wouldn't really recommend that
I don't think the current system is particularly great
What's the hidden attribute on your infractions database?
I think it's set to True when you use shadow actions but I'm not sure
yeah, shadow infractions
thanks joe 
#ask-joe

Where can I find the public eval command? I found so far the internal one, on bot/bot/cogs/eval.py
it's in bot/bot/cogs/snekbox.py
@patent pivot mind looking at https://github.com/python-discord/bot/issues/878#issuecomment-650816094 when you have the time?
having a gander
@brazen charm 👍
we are more than okay for RAM though. We have an alert set at 60% RAM usage and haven't hit that yet
last time we hit a RAM alert was when I started up a java application lol
is https://github.com/python-discord/bot/issues/1024 something we'd like to have in the bot?
I think I got solution however it works nearly completely in different way than current purge
Actually its probably possible to do it same way, still interested in the issue itself
if you have a solution proposal, it would be nice if you could comment on the issue itself
More or less I got whole idea of code, and somewhat prepared code ready
Oh hey, I've been doing the exact same functionality a few weeks ago for our kotlin bot
I've chosen to delete all the message posted between the clean invokation timestamp and the target timestamp
I did some eval testing found a more-or-less perfect way of cleaning all messages from invocation till message ID/URL
Had 3 ideas out of which 2 worked and 1 for some reason would result in python process to hang completely
Hello guys
I think maybe should @stable mountain paginator to python package in PyPi. This will make possible to use it for other projects. Discord.py's own menus have one big design problem: This don't remove reactions after moving.
Our current paginator is a bit old as well and could use a redesign
the re-running functionality on the code evaluator is great, gj developers
Glad you like it 😁
<@&295488872404484098> Critical issue opened on the bot, in case someone wants it. If nobody grabs this in the next couple of days I'll probably do it myself. https://github.com/python-discord/bot/issues/1031
please only take this if you can solve it quite quickly.
just to make sure, when !eval tries to circumvent filters, it sends a message to mods the same as regular filters do?
@crude gyro
I'm not very familiar with the filtering cog but I'd assume that should notify the mods
yeah it does but like should it be the same message or a custom message saying that they tried to use !eval to circumvent it
cool
important thing is that we are notified.
also with the !raw command, discord.py's MessageConverter returns a BadArgument error with the error message containing the argument
so do i just use string formatting to format it out
Just remove the formatting
the formatting is currently await ctx.send(f"Bad argument: {e}\n") with e being the error text that the BadArgument is sent - changing that would involve changing all the BadArgument errors that are raised by other parts of the code
Yes
ok cool
just replace it with something generic.
Bad argument: Please check your input arguments and try again or something.
ok cool
easy and straight forward and completely fixes the problem
Also am I checking all !eval messages or just those from non-whitelisted channels/members?
a fair question. I suppose you can check it for only non-staff
i'm implementing fetch & eval
but
there's a problem
you can only use fetch_message method on instances of discord.TextChannel
i need to crawl on all channels
Are you working on a specific issue?
One issue I see is this one: https://github.com/python-discord/bot/issues/1022
But it's not assigned to anyone yet and the labels say it's in the planning phase
yeah
that one
but considering that there are +100 channels here
wouldn't be a huge performance issue?
Alright, but you should first get yourself assigned to the issue and the issue should be fully approved/out of the planning phase
Do you have an outline of the implementation you have in mind to discuss in that issue?
well
I don't think the details as of yet are set in stone
i have a simple idea on mind
Yes, but you should probably get that idea into the issue first, before you start working on the implementation
okay
in what format do i write a comment to an issue, im not a very formal guy and i suck at essays
please dont assign me to nothing for now :p
We need to decide on an implementation before anyone can start working on it
So, if you have an idea for that, you should describe the idea and why you think it's a good idea to do it that way
well my implementation is like this:
- convert
codeto an int - if it raises ValueError, it's not an ID (go to 5)
- crawl on all channels to fetch the code using the message ID
- if the message is not found, return (if its found convert it to a valid format)
- execute it
i'm typing my implement here so we can discuss it better here
and it's a good idea my implementation because... there's no other way to do it 
You should add your idea to the issue, so it's documented and other people can look at it
okay
You are not allowed to use that command here. Please use the #bot-commands channel instead.
@celest charm Hey, why did you close your generator tag PRs? Are you still interested in adding that tag? I was just looking at stale branches to clean up.
I don't remember. Probably I got something screwed up with git. Right now I'm busy, so I won't be able to work on it. But globally - yes.
Alright, I'll keep the branches around for now then.
@exotic ember since ks129 has a PR open for the source command, can I delete your branch? Sorry I didn't realise you had a branch for it when I unassigned you. At the time, I just noticed you had self assigned 5 months ago without any word since.
@tawdry vapor yaya go ahead, thats okay
I'm having a bit of trouble getting my instance of seasonalbot to find any channel, in this server or on my own test with bot.get_channel. I feed it an ID, it always seems to return None.
I've made small changes to a branch in an attempt to fix the exploit, I just can't test it since I haven't figured out why it's not detecting channels as of now.
Here's the changes I've made off of the main branch to the mentions-fix branch:
Allowing only certien pings: https://github.com/python-discord/seasonalbot/blob/mentions-fix/bot/exts/christmas/adventofcode.py#L121-L125
Kwarg when contructing the bot for allowed_mentions: https://github.com/python-discord/seasonalbot/blob/mentions-fix/bot/bot.py#L206-L211
Assume you've changed the constants locally? You won't be able to get the channels from here unless you're working on the production instance
When I worked with the bot I changed them locally within constants.py on my own server, along with changing environment variables within docker-compose.yml
Hello coders
One question how mute or temp ban system work basically my question is about timing ,like timing is random or it decided through something?
Just a random question 😅
Or timing is upto staff to decide
It's an argument passed to the command
The staff decide it when they invoke the command
what good would it do if it was random lol
Lol
but yeah, staff decides
Then it will luck
1 year or 1 minute if we import random module hehehehehe
Ok ty for your answer @sullen phoenix
and Mark as well
Can we have channel for challenging question like we can participate there and py will give 10 random question which has to be solved in certain time duration
This will make beginners work in their basics
Bcz it's like a competition
We have almost everything in this server, if we have championship for coding it will boost interest of new coders
This isn't the right channel. Please use #community-meta for community suggestions
Hi - I'm working on the PR #1032 of the bot repo and I'm not the most familiar with unit tests and I've had to change a couple of the !eval ones because they now call the Filtering Cog and I was wondering how to replicate the filtering cog in the unit test
yeah
so you need something Filtering-coglike for the test? Usually the easiest is for you to just create a MagicMock object
or, if possible, use the cog itself in the test.
that'll be most precise
but that's often wildly inconvenient
which tests are you changing?
snekbox tests
test_send_eval is the main one and the others need to be changed accordingly
are you trying to change them so that they test if filters are run or what's the idea?
currently they give out the exception TypeError: object MagicMock can't be used in 'await' expression
uh lemme get the full traceback
If you want to mock a coroutine/awaitable, then there's an AsyncMock to use instead of a MagicMock
ah
i'll post the traceback too just in case but lemme see what i can do
ERROR: test_send_eval (tests.bot.cogs.test_snekbox.SnekboxTests)
Test the send_eval function.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\suhai\AppData\Local\Programs\Python\Python38\lib\unittest\async_case.py", line 65, in _callTestMethod
self._callMaybeAsync(method)
File "C:\Users\suhai\AppData\Local\Programs\Python\Python38\lib\unittest\async_case.py", line 88, in _callMaybeAsync
return self._asyncioTestLoop.run_until_complete(fut)
File "C:\Users\suhai\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\Users\suhai\AppData\Local\Programs\Python\Python38\lib\unittest\async_case.py", line 102, in _asyncioLoopRunner
ret = await awaitable
File "D:\Suhail\Documents\Python Discord\bot\tests\bot\cogs\test_snekbox.py", line 240, in test_send_eval
await self.cog.send_eval(ctx, 'MyAwesomeCode')
File "D:\Suhail\Documents\Python Discord\bot\bot\cogs\snekbox.py", line 217, in send_eval
filter_triggered = await filter_cog.filter_eval(msg, ctx.message)
TypeError: object MagicMock can't be used in 'await' expression```
right, so you are changing this test to check if filters are triggered?
I would suggest you don't do that, and instead write an additional test or two for that
but yeah, the AsyncMock may be what you need
The changes broke the current tests
right, the filter_eval call is from inside snekbox, not from the test
my bad
well that error seems to be because ctx.message is a MockMessage which is a MagicMock subclass
to which the easiest solution is probably just to make ctx.message an AsyncMock that contains whatever you need it to contain
it's not awaiting the message
looks like it's just trying to await some coro which is mocked with a MagicMock
maybe it wasn't a coro before? i haven't looked at the diff
it didn't exist beforehand
so to mock a coro you need to use AsyncMock, so that it can be awaited
I don't get it, why would filter_cog.filter_eval possibly be a MagicMock
This is a newly written test, right?
No
nope
something has changed in the test file, because the line numbers don't match up
The line that's in the traceback is on line 236 in the current master
lemme discard all changes and rerun it
You can just get the same error message from the Azure build log on the PR
Which hasn't touched the test file
Alright, I'm just trying to establish that I'm looking at the correct code
Okay
filter_cog = self.bot.get_cog("Filtering")
filter_triggered = await filter_cog._filter_eval(msg, ctx.message)
bot here is mocked by a MockBot, which is a subclass of MagicMock. That means that any attribute accessed on bot will be mocked by MagicMock as well (unless otherwise specified), including the get_cog attribute. When that attribute is called, it will return another MagicMock (it's magic mocks all the way down).
That means that filter_cog will be a MagicMock
When you then access an attribute on filter_cog, that will be a MagickMock as well, which means that the _filter_eval attribute will be a MagicMock as well
so shall i set get_cog's return_value to an AsyncMock?
That would work, although a Cog isn't awaitable itself, so it doesn't strictly fit.
You could do this to make it more precise:
mocked_filter_cog = MagicMock()
mocked_filter_cog._filter_eval = AsyncMock()
self.bot.get_cog.return_value = mocked_filter_cog
okay cool thanks :D
also this is a minor issue but whenever i run the pipenv run lint, i always get every file's line endings modified - is there any way to change that?
(since it causes all files to show up as modified in my git client)
you on windows?
yep
you may have cloned it with windows endings. the solution would be to tell git that you want Linux line endings on that repo
I thought we already did that though
with like a .gitattributes file or something
@rocky bloom Is the test issue solved?
yep solved!
thanks so much for your help! i just committed it and seems like the tests worked!
Oh, nice, good to hear.
I've got a function in 927 that I'd like to use in an another branch, but the commit that added it contains done other things so it can't be cherry picked alone. Should I wait for it to get merged or is there an another way of going about this?
Let me know if it's be more fitting in #tools-and-devops
@brazen charm one other way to go about it is to cherry pick it anyway and then write in the new pull request that #927 must be merged first, but it's a little messy
Not sure if lint would pass if I only cherry picked that
well, base yourself off that whole branch then
But htinking about it lint doesn't really matter for a wip pr
Could the current doc inventory names that use capital letters be changed to lowercase? joe mentioned that stats should be a-z_ and I'm logging the names lowercased, but that wouldn't change anything for digits etc. So I'm thinking of just restricting it when entered through the command
They're also addable through the site which doesn't seem to put in any restrictions, should I also look into changing that?
I don't think we have ever added them through the site, it'd be nice to have a validation but not required
I've never worked with django but I'll look at what I can do there
!docs [symbol]
Can also use: doc, d
Lookup documentation for Python symbols.
Subcommands:
!docs delete <package_name>
Removes the specified package from the database.
!docs get [symbol]
Return a documentation embed for a given symbol.
!docs refresh
Refresh inventories and send differences to channel.
!docs set <package_name> <base_url> <inventory_url>
Adds a new documentation metadata object to the site's database.
!doc refresh
+ python, arcade
- Python, Arcade```
excellent
Thanks
Do we really need to use the site
Is a move to redis possible, or are the models too complex?
hmmmm
well
it's literally 3 columns
but I don't know how I feel about redis for persistence
Y py bot don't send .TXT file when it's output is long?
Py bot can add paginaton by breaking output in pages and then adding paginator to it
Is a move to redis possible, or are the models too complex?
@tawdry vapor
no no, it's not about whether the models are too complex, it's about whether the data is disposable or not.
I don't think this data is disposable
we don't do backups of redis data, nor is restoring redis data from backup a good idea even if we did, because think about the help channels for example. We restore a redis snapshot and now suddenly we've time traveled back to a time where users are registered as claimants for channels they shouldn't actually own
if we keep using RedisCache for caching, the way we should, that means that the data often is tied to a particular point in time. It represents right now. And that's not compatible with a model of persistance and snapshots and backup restores. We'd have to start storing a bunch of timestamps and doing all sorts of integrity checks and so on, it's basically gross
so the easiest thing is to use Redis for temporarily caching disposable data, and use postgres for anything you care about persisting.
I think in time we should implement some sort of cache clearing strategy too, like if we have extended downtime (multiple hours), I think the cache should probably just be cleared when the bot comes back up for the sake of integrity.
hello i how bot convert ISO time to utc
i check pybot repo but havent able to find anywhere
just curious to know
@green mesa for what command?
check bot/utils/time.py
ok ty
some of that also happens on the site side
... I think
might be wrong
hmm, actually maybe all of it happens on the site, lemme take a quick look
aha, right
we're doing it with the Duration converter in bot/converters.py. Most of the magic happens in its parent class, DurationDelta
essentially we have this regular expression:
duration_parser = re.compile(
r"((?P<years>\d+?) ?(years|year|Y|y) ?)?"
r"((?P<months>\d+?) ?(months|month|m) ?)?"
r"((?P<weeks>\d+?) ?(weeks|week|W|w) ?)?"
r"((?P<days>\d+?) ?(days|day|D|d) ?)?"
r"((?P<hours>\d+?) ?(hours|hour|H|h) ?)?"
r"((?P<minutes>\d+?) ?(minutes|minute|M) ?)?"
r"((?P<seconds>\d+?) ?(seconds|second|S|s))?"
)
And then we feed that into a relativedelta.
@green mesa
It's beautiful
ohk
I'd like to contribute to the bot, but don't have any real experience with GitHub. Do you have any good resources to recommend and could you help me get started with it in some way? I'm still not quite sure about the workflow
for learning the git cli, Corey Schafer has a great series https://www.youtube.com/watch?v=HVsySz-h9r4&list=PL-osiE80TeTuRUfjRe54Eea17-YfnOOAx
Git is the most popular version control system out there and for good reason. In this video, we'll go over the basics of what git is and how to use it within the command-line. There are several GUI tools out there to help you get started with git, but it can be extremely benef...
for GitHub itself, well, all you need to learn is that workflow. Essentially to contribute to our bot you want to fork our repository, make a new branch on your fork to work in, and write your solution there.
then you open a pull request from that branch to our master branch
we have resources for the specific repos here: https://pythondiscord.com/pages/contributing/
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
specifically for the bot here https://pythondiscord.com/pages/contributing/bot/
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
and more git resources here https://pythondiscord.com/pages/contributing/working-with-git/
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
Are you using some kind of an editor with builtin version control tools? Most of the git(hub) stuff will be creating a new branch, switching around, commiting and pull/push
I'm using VS Code
Thanks, I'll keep learning about git. I've seen Corey Schafer's videos before, so that looks promising
I'll follow the steps laid out in the article quite soon then, but how do I know what to work on? Do I check the issues tab on GitHub and just start creating a solution or is there something else that I should know?
I have one question y we have ISO converter?
If you know any good article or video explaining how the collaboration part works, I'd love to read/watch
There are some issues available on the bot repos, for a start you can try something with the beginner or good first issue tags. If there's something you'd like to work on from the current issues then you can comment there and you'll get assigned if possible
I have one question y we have ISO converter?
@green mesa
if you're still referring to being able to do !tempmute 1H30M, why wouldn't we have that. it's easy and user friendly.
the alternative is to literally pass in an expiration datetime
otherwise I have no idea what you're asking.
So, I'll have a look in the issues and comment that I'm up for solving the issue?
sounds good
there's like 150 open issues on bot, so I'm sure you can find something nice
I also wnt to contribute but I don't have much experience in py 😐
Perfect! And then, I'll fork the repo, develop a solution and create a pull request?
I didn't have all that much experience myself when I started contributing here, there are simpler issues around and other contributors or people in help channels can help if you get stuck on something
You'll want to fork it before that, as the bot requires a bit of setup to work including the site for most features
Right. I read about that. Do I fork before I do the setup, or the other way around?
Okay
the contribution guide for the bot I linked above is important in getting it running
once you've got a copy of the bot running on a test server and the console output isn't full of errors, you can make yourself a branch and start writing your contribution
remember to keep your commits small and atomic, and the commit messages descriptive and clean. Follow the 7 rules of a good commit message (google this term).
make sure your branch passes lint and tests
when everything looks good, open a pull request to us
one question if I get stuck at somewhere while solving bot issue can I ask in helpchannel😊
and we'll review
Thanks a lot. I'll take a closer look and get started
@green mesa depends how you're stuck. if you're stuck on a Python problem, of course you can. If you're stuck on something that's specific to our repo, probably best to ask in here
Ok ty
The blame may offer some insight
yeah, checking it now
But last time I checked the paginator could use a small rewrite, if it didn't get one since then
Going to copy pasta for relevance:
Sorry guys. I'm looking at @stable mountain 's code, and I stumbled upon this bit in the paginator code:
# Magic happens here, after page and reaction_type is set
embed.description = ""
await message.edit(embed=embed)
embed.description = paginator.pages[current_page]
image = paginator.images[current_page]
if image:
embed.set_image(url=image)
embed.set_footer(text=f"Page {current_page + 1}/{len(paginator.pages)}")
log.debug(f"Got {reaction_type} page reaction - changing to page {current_page + 1}/{len(paginator.pages)}")
await message.edit(embed=embed)
(sic. indentaton). My question is, why do you guys first clear the embed, update th emessage with the empy embed, and then update it again and re-edit it? Should I open a help channel?
Oh, did it rended the embed wrong if it did not clear it first?
I guess so, but that was 2 years ago and it might be fixed now
Mhm. I've taken the liberty of copying the core mechanism of the paginator for my own bot, and the rendering seems ok?
@slow bone doesn’t seem to have this issue, we could probably update @stable mountain
yeah
DO we have games in seasonal bot?
Yes
Which ones
Wow havent tried yet
And I chek the links which lemon shared and I think I can contribute on tic tac toe
I don't know what is PR new to GitHub 😐
Oonpull req
Oo pull req*
😅
Came to know by link
That guy made cool tic tac toe game
No
I have a plan for bm command
We can do like this if we have a message like this
Hello h
How
R
U
Then if we do .bm no of message link of message to save as bookmark
Then it will be cool for bookmark
We already have a bookmark command
So how it's bookmark?
Let me see if I can get the bot back up and you'll see for yourself
Ok ty
Well I scrolled up .bm works for only one line
What if user wnts to bookmark some code
Which is of 10 lines?
you can bookmark the starting message
But isint it will be nice if .bm sends embed and at description it shows some code and in it
Not a single line
So like if I have list of 10 things I can bookmark it and it will show me in embed and add jump bck url also
this is what a bookmark looks like
I don't know what's funnier
the fact that people bothered to troll in pr #1049
or the fact that the 3 lines they replaced every file with isn't actually python syntax
@tawdry vapor you there? mind having another look at https://github.com/python-discord/django-crispy-bulma/pull/34 ?
I'm not 100% sure if it actually works, but it ought to. A little hard to test stuff like this without just pushing it to production
which is fine for this particular repo
Yes, I'll have a look
Honestly I don't know anything about GH actions
What's the benefit of using a flake8 action?
Can't it just be invoked as a shell command?
It does fancy things like add annotations to your PRs inline.
Ok that's cool
maybe we should just remove django-crispy-bulma from site altogether
and archive the whole repo
nobody is maintaining it, after all
yeah, for the account deletion form
pretty sure I could get that working with just plain django forms, or at least with plain crispyforms
I'm having a go at that right now but I'm not really sure how to get to that page on the dev site
I think OAuth is one of the things I couldn't get to work locally
yeah
Even on the master branch
I don't recall if I specifically used crispy for that
but it's a pretty simple form
no no, the question is "how the fuck do you test this locally"
Oh, you want to test the oauth integration
not really, I just want to see that account deletion screen
I made an oauth app on the discord developers site, you can have a redirect url under localhost
so I can remove all the crispy-bulma from it
that's how I tested it locally
maybe I can just log in via /admin/login ?
Yeah, that might work
it's been long enough that I can't remember if I checked for an oauth login specifically, but I highly doubt that I did
\o/
@tawdry vapor Okay, I'm opening a PR to site to remove django-crispy-bulma as a dependency
feels more reliable
Sounds good
once this is merged, we can probably go ahead with the Django 3.0 migration, right?
or are there any other blockers?
Not really but I do have a couple concerns
First are these empty list bugs
I've fixed two so far.
The other concern is django-environ. Many people saying that it doesn't support Django 3.0 but it seems to work when I tried it. I tried to ask for clarification on what doesn't work but never got a response.
@crude gyro so how do I test this delete form?
I logged in with admin then tried to delete my account
I got
that is weird.
it worked fine on my end
but, hmm
okay, right, I think that's a bug
I will have to look at it tomorrow
feel free to leave a review, I think I might know why it's happening.
do y'all mind if i test !eval filtering? i just wanna see if it works
but i don't wanna get infractions
has it been merged?
just now actually
go ahead
@tawdry vapor I see now, it's because of django-crispy-forms itself. I'm getting rid of that dependency, too.
it's only used for account delete, so
kinda pointless
yes
I kinda dont want to delete my admin account
it doesn't really delete the account
or, at least I don't think so.
I think it just deletes its connection to the discord user
you're using docker-compose, right?
Yes
just docker-compose up --build should fix it then I suppose
Alright you have my approval
Is the 0.0.0.0 thing safe?
yeah
it's convenient though, because when you spin up the containers via docker-compose it will link you to the site in the terminal output and it links to 0.0.0.0
so you can just click the link
<@&587606783669829632>
Easy review at https://github.com/python-discord/site/pull/368. This review gets us one important step closer to running Django 3.0 in production, which is a blocker for my whitelist PR, so I'd appreciate if someone has 3 minutes to spare for it
already tested by both me and Mark, so really just needs a sanity review
The other concern is
django-environ. Many people saying that it doesn't support Django 3.0 but it seems to work when I tried it. I tried to ask for clarification on what doesn't work but never got a response.
@tawdry vapor
If you're worried about this, we could easily get rid of that dependency too
it's literally being used for 4 lines of code
env = environ.Env(
DEBUG=(bool, False),
SITE_SENTRY_DSN=(str, "")
)
that's all
Well, less dependencies is better
I don't fully understand this plugin but I suspect that's just default values
oh wait, it does something weird in addition to that. okay.
never mind
I don't understand what this fixes but apparently 5 people agree https://github.com/joke2k/django-environ/issues/239#issuecomment-606245487
wait.. pathlib support - 2 as a way of moving up two directory levels?
news to me
that's pretty hot
I don't think that's from pathlib
I think it's broken if trying to read from a file
But we rely on pipenv to do this so we don't care
well, I do actually set my DEBUG env var in a .env file
but you're saying that pipenv will load that into the environment anyway
so it doesn't matter
Yeah pipenv reads .env
The repos seem a bit more active lately, anyone mind also looking at https://github.com/python-discord/bot/pull/927 ?
then this doesn't affect us, if that's the only problem
I just realised how shit that issue is. Vague title, no description, no comment clarifies what's wrong
And just a bunch of thumbs up
yes
I'll take a look now, @brazen charm
okay @tawdry vapor, so the django-crispy-bulma blocker is gonna be gone soon, we don't need to care about django-environ, your last concern was something to do with.. empty lists? can you elaborate on that?
Some models that may need to allow empty lists might not allow them anymore
One of the commit messages had details
Need to go over and ensure FKs allow empty lists if they need to be allowed, since DRF fixed a big and now we have to be more explicit with allowing empty lists.
right, I remember running into that when I was migrating to Django 3 myself
but I think that's a problem you'd see at startup
not 100% confident though
but when I migrated, I just tried to run the app and it kept crashing with all the stuff I needed to fix. So fix, run again, fix, run again, fix, everything was fine
how does the bot keep anchors in the YAML file?
im assuming the config can be modified within the bot, right?
No, not really
It's technically possible with an eval but there's no "official" feature for modifying config values
Our config system is not that good. We want to re-do it
ah, ok. i have a yaml file, that can be roundtripped (ruamel.yaml), but i also want to use it in a config object, but i have no clue how i'd save it
guess i'll stick with accessing config values as a dict then
Sorry if this is a stupid question I am new to git I am not able to find which issues are still open of seasonal bot I wnt to contribute to seasonal bot repo at beginner level
All issue seems to have been solved😅
Anything without the WIP label and/or someone assigned should be available
Ok ty
quick question: are you using psycopg2 or asyncpg?
for our site?
site and bot
Our bot does not communicate with the database directly
the site does, and uses psycopg2
or, well, it uses Django's ORM, and Django uses psycopg2
with Django 3.x well on its way into asynchronicity, though, it's quite possible that it will support asyncpg in the future
in which case we'd be happy to make use of that.
but right now there's no support
This reminded me that Django will get async views support in this summer I think 🤩
you can always propose them at https://github.com/python-discord/meta @green mesa
ok ty
what's defcon and how is it used?
it looks like a server protection -- just autokicking new members?
@clever wraith autokicking new users
defcon of 1 day means any account with age <1 day is kicked
oh so thats all it is?
yes
soon™️ it will be much more
yeah
and i noticed its not normally supposed to be turned on manually ("only do this if you know what you are doing")
what triggers it?
DEFCON enabled.
!defoff
DEFCON disabled.
¯_(ツ)_/¯

that line seems to imply there's an automatic trigger, and the manual one isnt normally supposed to be used
not sure how you are inferring that
the "be sure you know what you're doing!" is because it's... y'know... kicking our new users lol
well i just interpreted it as "only manually do this if you know what you're doing, otherwise let someone else handle it"
but that was when i thought it was more than just kicking new people
I need some advice on code I'm writing
I'm writing a decorator. It's meant to decorator instance methods.
The decorator relies on a dictionary existing in the instance. The dictionary is internal, as in, it's only meant to be used by the decorator.
What is a good design to ensure the dict will exist in the instance?
My first design is a mixin, but it feels clunky to have to subclass something. The decorator will also be misleading since it'll have to be a static method, but it would fail if ever called outside something that's subclassing the mixin.
My other idea is to "inject" the dict into the instance if it sees the attribute does not exist yet. However, I worry that being so inexplicit could lead to unexpected results for users unless they're familiar with the internals of the decorator.
I suppose it's not too much different than the mixin.
I take it you're planning to use the same decorator on multiple methods of the class and they should have access to the same shared dictionary within each instance
Yes
It's basically going to be the locked decorator, but cross-function support
Locking by an ID
have your decorator access a property? any dictionary injecting would then be in your class instead (I have no idea if I understand your problem)
Sorry I don't understand the question
Here's the code, if it helps https://paste.pythondiscord.com/qufifotita.py
I'm considering create a dict of WeakValueDictionary as a module-scoped variable, rather than storing them in instances of classes. That way, this decorator could work across instances or even on normal functions.
Though I don't currently need it to support such feature
I was thinking having your locks be accessible through a property, and have the property deal with whether or not the lock exists
Doesn't the dict still need to exist though?
I've made something similar for Rattlesnake, but that had the advantage of being bound to a Redisobject instance
That means the lock can be part of the thing it's trying to lock and the methods are decorated by a method on the cache instance
Do you all think having a dict of dicts is a good idea?
I'm playing with it right now
Looking at your function, the point is to just cancel anything else decorated with the same id_ while something is already running
Yes
This is what I have now. Haven't tested any of it.
Don't know if what I am doing is stupid
Will call it for the night though
How py checks for which lib we are trying to fetch docs?
Like it fetched !doc asyncio also
And !doc discord.ext.command also?
My question is how bot knows which tag belongs to which lib?
@green mesa well, you are providing the name no?
we pull the docs from several packages such as the stdlib, discord.py, arcade and so on
they publish their contents like "my contents contain a symbol called asyncio.sleep"
Ok
Would this channel be alright for some design questions around code for a feature, or should I get a help channel?
no, that sounds fine for this channel provided it's a feature for one of our projects
Not workign code since some uneeded parts were deleted and otehrs weren't working to begin with, but for this method here https://github.com/Numerlor/bot/blob/0f6172846f6b54dd39ef95a86495180ac1d5a4d7/bot/cogs/doc.py#L386-L414 does this look as a viable approach (not minding the long lines)?
What I needed is the same behaviour that's in find_elements_until_tag for those 4 bs4 methods so I was aiming for something that's wouldn't just be copying the body, and keeping the caller interface clearer without the need to pass the methods itself; later I'm planning to move this to a separate class that would just do the parsing after I figure hwo one other thing should behave
And also wondering if the BS4FindManyMethod callback protocol looks okay
Maybe a normal factory would be better at this point to get rid of some of the parials and staticmethod calls but then I'm not sure if it should stay in the class where the methods are defined
This ultimately seems like a partial vs no partial question
The other way to do these is ```py
def find_next_children_until_tag(...):
stuff = find_all(...)
return find_next_children_until_tag(stuff, ...)
That's a bit more redundant but also more explicit than partials.
I think the partials are fine
Though the staticmethod stuff is a bit ugly
Not a big deal
I don't really know what BS4FindManyMethod is for.
That's kind of getting overkill for type annotations, considering this seems like an internal function currently
I think this looks a bit better
def find_elements_until_tag_factory(func: BS4FindManyMethod):
def find_elements_until_tag(
...,
) -> t.Optional[str]:
"""
...
"""
...
return elements
return staticmethod(find_elements_until_tag)
find_next_children_until_tag = find_elements_until_tag_factory(functools.partial(BeautifulSoup.find_all, recursive=False))
find_previous_children_until_tag = find_elements_until_tag_factory(BeautifulSoup.find_all_previous)
find_next_siblings_until_tag = find_elements_until_tag_factory(BeautifulSoup.find_next_siblings)
find_previous_siblings_until_tag = find_elements_until_tag_factory(BeautifulSoup.find_previous_siblings)
find_elements_until_tag_factory = staticmethod(find_elements_until_tag_factory)
But as I said I'm not sure if the factory staying in the class would be nice.
Do you think a Callable with an explanation in the docstring would be good for the typehint? I wanted something that'd be clear but I don't think it particularly matters to the static checkers with bs4 not doing hints anywhere so it can just be explained or an alaised typehint
Yeah I think some documentation will be much clearer
I started the typehint as for a method that accepts the args for the instance and a limit that are used, but then it turned into a whole hint for the methods
It's a neat new feature but it seems overly verbose if you're not using static type checker tools
Well, technically your IDE is one but I mean something more like mypy
Which of the definitions would you say is the best all things considered; partial, normal wrapped funcs or the factory? the normal functions would look a bit nicer decorated with static methods isntead of being normal calls to it, but still feels a bit redundant
Why are the staticmethods needed?
Maybe you should just not define them in a class to begin with
Perhaps a separate module if it'd seem out of place
I was planning a separate class for the parsing side of the things that'd accept html and return markdown, but a module doesn't sound so bad either considering I was thinking it'd just be class/static methods
Then I don't think a factory is necessary
Also prefer the partials since it's less boilerplate
We're not writing a public library meant to be used by hundreds of people so it's acceptable to sacrifice docstrings for each partial
Only thing I don't particularly like about decoupling it is that I'll have to pass the aiohttp session to the parser if I want to cache soups with a simple cache
You could leave that one method that needs the session in the cog.
I think the tradeoff of passing it would be worth it here, because leaving it in also means parsing the URL in both modules or passing it along for resolving links and finding the symbol by id in the parser. So, don't particularly like it but it's probably better. But I'll get to that after figuring out other things
Thanks for the help
Np
Some heavy refinements are overdue for whitelisted and blacklisted things. e.g. a few sites that should be blacklisted:
nsfwyoutube
adf.ly
xxxvideos
any links ending in .onion
Blacklisted words:
Sucide (A typo of one of the words up there)
The n word (Like cmon guys this one was obvious)
Spacing out the letters like t h i s
Thanks, Galaxy.
I am pretty sure the n word in there
I was about to say xD
Ok, then the names of some parts of the male and female body should very much be added
And the name of the action they can do... (I’m trying to get the point across whilst still keeping this PG)
DM me if this was unclear or you need more obscure words
I too have a blacklist of my own
*on my bot
Also different variations of “grape without the g” should be added, such as adding an r, ing, s, or d on the end
Trying to keep this as PG as I can
It’s not easy
Onion links shouldn't be banned wholesale imo
I mean sure there's some bad stuff on tor, but there's also Facebook and other legit sites
It'd be like banning .com
It's mostly just hard to moderate I'd say
Yeah
And trying to maintain a comprehensive list of NSFW sites is.. well..
It's not gonna happen
Ok, then the names of some parts of the male and female body should very much be added
@hazy dune
..why?
Well, adf.ly is notorious for getting you to download viruses (it’s a common whole-screen pop up ads when you try downloading other things (most commonly seen when downloading OptiFine))
@hazy dune
..why?
@crude gyro they’re inappropriate
I know adfly, although they've gotten better lately
But you know adfly isn't the only one
There's hundreds of domains
it's not our intention to moderate everything that's "inappropriate"
it's our intention to catch hateful interactions
This is true, but do you really want people talking about it in public chat?
they ping all the mods
yeah
so that we can have a look at the conversation and determine whether we need to take action.
Well then I’m sure you would like (for moderation purposes) to be pinged when people start discussing it just to be sure.
many words that describe human anatomy would produce far too many false positives to be worth it
how often do you think dick is used on this server to refer to penis versus how many times it's used to refer to a person who is a bit of a jerk?
the latter is fine
we've added cunt to the list because it's considered a really, really bad word in parts of the world, but then you get australians who just use it to more or less mean "mate"
Oh.
so, what we're interested in having on the list are words that are unequivocally bad
the n-word is a good example. We don't wanna see that in this community no matter what
unless you're posting kanye lyrics or something
Ok, is the s p a c i n g and st*rr*ng of the words still a good idea to add?
Or too far?
I think the cog itself sanitises for that
I’m tempted to try (as I enjoy finding glitches) but the better part of me says it’s a bad idea
plus in 99% of scenarios, a mod can make their own decision
I mean, it's open source
Looking at the source, they expand spoilers
the word filter won't catch stuff that you've s p a c e d o u t, no.
we had an issue to do that at some point but I think we ran into more complications and edge cases than we thought were worth dealing with
it's surprisingly difficult to do
any word that bypasses the filters can be reported by others to moderators or even seen by one so it doesn't have to fit every scenario
generally speaking, anything that isn't caught by our filters is reported to us pretty quickly via @slow bone or by a staff member
but still, having the filter catch obfuscated tokens isn't a bad idea necessarily
if someone opened a really good pull request for it, we'd probably be happy to accept it.
but it's not as trivial as it sounds
The kotdis bot just strips out markdown formatting chars, which seems to work fairly well
not that hard to get our attention
This is true, but do you really want people talking about it in public chat?
@hazy dune
I think our ideas of where the boundary of "appropriate" lies differs. We are a 13+ community, and parts of human anatomy, in either slang or a more conventional version, don't seem that inappropriate to me unless used very inappropriately.
Ves, why are you the only owner not boosting the server?
@hazy dune
technically @patent pivot isn't boosting it either, he gets free nitro because he's our discord partnership contact.
so we get a free boost
besides, we don't need the entire staff to boost
we have everything we need
out of curiosity, who owns the server?
we get most of the boost features just by being a partner
joseph is currently the registered owner.
And that goes for a few other suggestions as well: We're not trying to create an environment where everything is considered inappropriate and that's why we only filter very sensitive or inappropriate terms. In all other situations, it's up to a judgement of the situation. If something inappropriate happens, ping mods or report it to ModMail and we'll figure it out.
but in every other way than on the paperwork, all three of us do
Oh also happy Saturday
Wait hold on... when is the earliest time in the world right now?
Brb Google is calling to me
It’s hard to find because you don’t know if it’s 12 PM on Friday or Saturday
Ok so unless you live in Niue Time (GMT), then happy Saturday!
How has no one talked in here for hours?
That looks like an astute observeration
I was concerned Discord wasn’t loading properly
Is the None a known bug?
Reconnecting doesn't solve the problem
I unlinked my discord account and linked it again, I got this
hm, the None isn't something that showed up when I implemented this
but this would be difficult to debug without the database state, and I definitely should not have access to that
also, uh
how did you unlink your discord account?
that's not supposed to be possible without entirely deleting your account
I meant that I logged out
I don't see a reason to display the real name, just display the handle
(I remember how I'm called)
I don't recall why I display the real name
it might have been a library thing, I'm not sure
but that's cosmetic, I'm more concerned about that 500
Maybe there's some kind of error log?
I haven't found anything overly exciting in the logs yet
[pid: 37|app: 0|req: 41762/59713] 162.158.88.49 () {70 vars in 1744 bytes} [Sat Jul 18 18:35:16 2020] GET /accounts/discord/login/callback/?code=...&state=... => generated 145 bytes in 491 msecs (HTTP/1.1 500) 6 headers in 239 bytes (1 switches on core 0)
[pid: 37|app: 0|req: 41805/59756] 162.158.88.49 () {72 vars in 1528 bytes} [Sat Jul 18 18:35:59 2020] GET /accounts/discord/login/callback/?code=...&state=... => generated 145 bytes in 204 msecs (HTTP/1.1 500) 5 headers in 154 bytes (1 switches on core 0)
My IP starts with 178, if that matters
Weird, you'd think there'd be a traceback
maybe grep 178?
I think it probably gets cloudflare IPs
yep
These two entries have the same callback code that you had in the URL in the address bar of your screenshot
And there's no traceback?
If you're looking in Sentry, the error may be ignored.
Though 500s are ignored more so for the bot than the site
There's nothing in Sentry, as far as I can tell, including ignored
The logs for site don't show a traceback to go with that 500
Hey everyone. I implemented something to cancel other commands if a resource is already in-use. For example, it will cancel a delete if a reminder is in the middle of being sent or edited.
Should the commands be aborted silently?
Or should some message be sent e.g. "this resource is already in use; please try again later"
Probably not silently
c_time = datetime.utcnow()
print(c_time)
f_time = c_time+timedelta(minutes=mute_time)
print(f_time)
this is giving me current time in utc
but how py bot convert time in user timezone
it doesn't
it gives it to discord in embed time stamps sometimes and discord does the conversion
don't think thats in user timezone
pretty sure its UTC based
according to source code it uses UTC
there is no way of even knowing timezone of a user
You can set up test bot and do that yourself, I don't apply false infractions
well ok
i tried with bot
but that bot is giving time in utc
but embed.timestamp give time in user current timezone
because what you sent in the screenshot is UTC based
Embed.timestamp is something local client formats to its local time
I dont think its possible to get another user's timezone, if thats what you're after
the conversion in the embed footer is most likely done locally
either way, the API doesn't expose such information about users
Seems like the cat n°418 is broken
.statuscat 418
Okay well, .statuscat 418 gaves an error, although this cat exists https://http.cat/418
It's not in the http module which is used to validate the codes
That's a shame 😔
3.9 adds it fwiw
How complete would you say commits should be? I'm reworking some of the main methods in a module. Replacing them all at once would be a big commit, although it would be still about one thing; but they also aren't really compatible with the new design so the code wouldn't work if I went in steps without introducing unrelated changes just for that
@brazen charm Speaking only for myself, I don't think it's necessary to ensure every commit works and runs. After all, you're in the middle of development. It's fine to commit incomplete work, as long as you could say some subset of that is complete for that commit.
Trying to make every commit work just adds too much overhead
Also, big commits are fine. Not everyone works incrementally. It just has to be within reason.
For example, I reviewed Lemon's PR today and he had a commit that added an entire cog with helper functions and some commands.
It could have been separate commits for each function, or maybe a separate one for all the commands, but ultimately, that doesn't have too much benefit and may be inconvenient for him to have worked like that.
I do prefer them more separate when changing things instead of only adding new ones as it provides the opportunity to exaplin them a bit with the changes grouped with only the relevant commit message
I think almost every commit I've done so far would work when checked out, at least as code if not functionally, but that would be a bit of a pita in this case.
Can we have name of author who reply when modmail message bck
So we can know who replied to us
you will know who replies, unless they use an anonymous reply
or it's a close message
i wnt to know of close message f1re
@green mesa kind of irrelevant information
we don't write the modmail bot so if you want that you can PR it to https://GitHub.com/kyb3r/modmail
@cold moon Hi, I've noticed that your PR for 1.3.0 functionality update is still open, however it has conflicts, do you think you could resolve those conflicts so the PR is merge-able?
I'm not sure why I am getting this error, Error: the command flake8 could not be found within PATH or Pipfile's [scripts]., when running the precommit hooks in pycharm for the bot
All the other checks pass, and everything else seems to work fine
Do you have it on path?
running which flake8 in the pycharm terminal gives .../.local/share/virtualenvs/bot-r6FnQRJj/bin/flake8 So i'd assume that's what it should be using?
does pipenv run flake8 work?
This is all it gives me```
$ pipenv run flake8
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables…
Is there a timeout after that where it's running flake8 or does it just stop at the .env?
Not sure what the issue could be, but maybe something with the virtualenv not being pipenv's environment that you got a notice for
It pauses for a few seconds after Loading .env environment variables… and then just goes back to the prompt.
I'll play around with it for a bit and see
Yeah it's bugged for me and ves too at least
We had to edit the hook and set an env var
I think it was the ignore virtual envs one
It's cause pipenv fixed a bug we apparently relied on
Ha, well it's nice to know it isn't just me
What did you edit in the hook?
Actually I think I've managed to get something working
Ok, I made the pull request, and I think I did everything right 🤞
Here's hoping I didn't mess up
OH yeah, that's just testament to the extremely high quality of the code I wrote
@tawdry vapor just wanna confirm, ^ doesn't really matter does it?
What did I do...
missed analysis 
not exactly bad since github doesn't mark it as bad but it doesn't mark as good
No
Will merge it then if thats okay by you
sure
I wouldnt bother with the merge commits
Not for something like this at least
I like branches updated
so just merge it then in future?
will do so next time I suppose


