#dev-contrib
1 messages Β· Page 148 of 1
Ok cool, sir-lancebot#930 is now ready for review, the only todo left is to add leaderboard support to all game cogs which would be done after the core functionality gets an approval
Hi all, regarding sir-lancebot#902, cowpy has been switched back to Apache. Does this mean I need to find another library or just do it myself?
I am no core dev or lawyer, but if they switched the license it should be fine to use, if there is any problem with that switch it is on them, that's my personal view on the matter
Does apache require attribution? I forget
should be fine as apache, just might need to add a thrid party license file
I don't think you need to attach the license since you don't vendor anything, it is a third party library compatible with MIT
Hey @vale ibex, rapidfuzzy fully released wheels for 3.10 if you want to update the issue
@reef tinsel something I noticed on your PR is that you're using logging.getLogger and not bot.log.get_logger
You should change that
I'll formally request changes on the github when I'm on my laptop later
ok
And as for requesting reviews, it's at the top-right of the main PR tab
tbh it makes no difference to functionality currently anyway since im not using it lol
yh
i did look but i could find any thing to click
not everyone can request reviews
Oh right
If you've got time, make sure to update your base branch for your PR, so you can work out any problems before people start reviewing
wdym?
!remind 3h review bot#1917
Your reminder will arrive on <t:1635354971:F>!
So, when you created a new branch, you started at a certain point in history
non staff people can rerequest reviews but not reqeust them
aah π
It's a good idea if you have time to do it, but it's not a big deal
done the merge - will test again now
thanks π
Is it normal for our code base to type hint the variables when they are definied?
90% of the time no, the rest 10% include cases like this where the reader is not aware of what it will contain or it is not explicitly clear
There are some places where it can be useful (think Optional/None)
And collections
@reef tinsel see above? This is the first thing that stands out to me
But there it is necessary
See dict() because dict[Any, Any]
Yeah
Yes, the reader wouldn't know-how is the dict structured unless they go through the code
π
Hey! Could someone take a look at api#23? It should be pretty straightforward by now. π
I see some cascading options patching, which wasn't discussed on the PR, any context for that?
yeah
Thx
Ok @molten perch the mako script doesn't agree with black and the linter
You can update it to this
"""
${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
import sqlalchemy as sa
from alembic import op
${imports if imports else ""}
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade() -> None:
${upgrades if upgrades else "pass"}
def downgrade() -> None:
${downgrades if downgrades else "pass"}
why are you running it against black? black isn't something we use on our repos
That doesn't.... look right
We use it on api
I think we may use it on api yeah
Maybe we should just exclude the migrations directory
It's almost entirely autogenerated anyways
Without black, migrations look horrible
Who's looking at them
why do we use black on the api?
no they aren't autogenerated, only the initial one is
rest you write them on your own
They are, just run generatemigrations
I know, I ran a ton when debugging with Dorsan
Would be quite underpowered and inefficient if we still had to manually write them
I was on the same opinion. However.. here's the discussion:https://github.com/python-discord/api/pull/23#discussion_r730518309
There is a way to generate them in Alembic by diffing the sqlalchemy models, but I haven't worked with them, they aren't very accurate and most of the time one edits them manually to make them accurate. Django autogenerate are completely next level, if alembic had that support - I would have used it.
I remember this being discussed on the pr also
Yeah that linked discussion
autogenerated models
compare them with the current state
I don't think Volcy's comment is accurate, at least not anymore
That's not correct
I have an auto generated migration above
let me get it for ya
π .
@gritty wind am I right in saying that guild.get_role has never had any issues with cache (aka we don't need to await guild.fetch_all_roles())?
It's also like django with generating new files for new migrations, it doesn't overwrite anything
I'd be weary of that
I'm not sure, it's hard to know for sure beyond looking at where we use similar things, and see what works
Is this for the reminders issue?
They are different
Wdym?
There are things that are not supported alembic, however those things do not apply to our case. (Like renaming a table, or a column, although that could be done manually as well if necessary)
ok nvm, cascading was added alter by dorsan
For the patreon issue
Ah, hmm
We use get_role in a few places, doesssn't seem to be a problem I think
I'm not sure
Fetch should be fallback at least anyways
Also that patreon PR has lot of duplicated code, espcially get roles, knock them to a cog task
wait_until_guild_available already ensures that roles, members and channels have items
I don't see a need for that
hey so if i made a contribution do i get the "Contributor" role awarded ?
So, it depends
A role given by staff to people who make substantial contributions
The role is given on a case-by-case basis, but usually a single contribution not really
ohhhh okay
Unless you like idk... sprinted an entire project or something π
We do appreciate all contributions though, and we keep our peepers peeled
naaaaah not that big just a small fun command
!otn a Scale's peeled peepers
:ok_hand: Added π²caleβs-peeled-peepers to the names list.
I can't believe it took this long, I've been saying it for such a long time π
lol
Submitted a preliminary review @reef tinsel π
A few nitpicky things so sorry :p
π will take a look
This is probably my first in-depth review so let me know if you have any queries :p
Lol
@static canyon when I fix these, should I do one big commit ssaying something about the review, or should I split it up?
I think split it up for now and if we decide we want to squash it later then we can π
ok π
I tend to have more commits than (probably) needed
@short snow how were you even running black to get it to error? It shouldn't pick up the mako script because it's not python
Hell, running black . on Dorsan's branch passes
I noticed rofl
The thing is we can always squash commits, but it's had to split one commit into multiple
So I'll tend to do more than needed and then squash
I think it had the main branch merged twice over the course of the PR
Do you have precommit configured by the way? @dim pelican @reef tinsel
Yup
Good π
yep
So, do I exclude the migrations from the linting, or not? π
(Sorry, for the late ping π )
Currently, it seems fine to keep it
I'm not even sure if anything is not passing?
Also, dockerfile still needs a newline at the end of the file
I'm about to press the green button, just doing some final checks on the actions
Exciting stuff, big news for the api
Indeed π It seems like cascading works as well, so everything's fine π
Does it? It's still throwing errors for me, but I figured might as well ignore them at this point
It did not throw errors for me.
When'd it throw errors for you? Can you send your code snippet that was failing?
I did the same thing agian, just removed nomination
Oh, yeah. It's a migration problem, not cascading.
And, you just have to change the order, as alembic is not aware of them.
So what was the cascading problem?
Typically if the cascading is working properly, dropping the nomination table should drop all columns in nomination_entry, no?
Like if I manually run the SQL:
drop table api_nomination cascade;```
It'll drop the table just fine
I hope so?
I only tested with single records, not whole tables. :/
The isort pre-commit hook will stop my commit from commiting when it changes an import order, even when it is the only "failing" thing. Could this change?
An import in the wrong order will cause the commit to fail linting. It makes sense to me that it stops you from comitting because of this (otherwise it's allowing a commit which it knows is "bad")
but all i need to do is start the commit again and it will work
for it sorts the imports for me
It's still not working for tables, but that's fine, seems unfixable. I'm not sure if any cascading is working tbh. Like I tried updating the value for a user_id, but that failed, because it did not cascade
i do understand why the isort fails, as it does give me a notice that m imports have changed, but is their a way for this kind of thing to pass, but give me the notice?
It's designed to explicitly fail like that
It should on a level.
Like If you create a Nomination, and a NominationEntry, if you delete the Nomination it cascades, and deletes the NominationEntry.
Though, you can manually run it beforehand
It doesn't seem to be working like that, unless I write sql which adds cascade. Like all of the cascade seems to be operating like that
It's handled on the ORM level.
Right, but it isn't working
@trail pilot Can you provide some more guidance / an example of what you're expecting the json loaded in to look like? It's currently unclear from the code and the PR description.
It's working for now, and it's easy enough to modify the migrations if something doesn't cascade properly, so I'll just submit an approval for now
Let me go check on the actions
May I ask how you tested the cascading?
With RAW SQL or by creating a SQLAlchemy sessions and such?
I went through the cascading the other day, it seemed to work just fine.
However, I tested it using SQLAlchemy, and not by issuing SQL commands.
@reef tinsel I think you misunderstood my comment in https://github.com/python-discord/bot/pull/1917/commits/2f5aeb06e816240b08453b5cf327c6b77958a3ab
I meant that the top 3 should have different variable names to the bottom three
So like```py
tier_1_or_above_patrons = set(...)
tier_2_or_above_patrons = set(...)
tier_3_only_patrons = set(...)
tier_1_only_patrons = ...
tier_2_only_patrons = ...
aahok
edited @reef tinsel ^
Also joe is gonna reword the patreon message (see <#community-meta message>)
So for the two things related to that, just hold fire
I executed a delete from the sqlalchemy connection on a user which was used in a nomination entry:
DELETE FROM api_user WHERE id={ID};
Deleted the user just fine, but the nomination entry was still there
I can also modify the PK on api_user so that the ID no longer exists, which should update in FKs, but it doesn't
But, that's not the ORM. Let me show you.
Error? I never said I got an error, I just said the mako file would generate a template that doesn't agree with our linting tools, one is that there aren't any return type annotations and one is that the first line of the docstring should start on a new line if we have a multiline docstring.
Also I didn't run anything, its just what i guessed
also the linting tools pass as dorsan has fixed the initial migration file
yeah I saw lol
regardless, I don't think it's worth the bother to try and get it compatible with the code style. There are other things which I'm pretty sure will fail, but we can't fix
I was debating whether or not to ask Dorsan to definitely disable black on migrations, since for the most part they shouldn't need to be reviewed by humans
But at the same time, they already get linted so, what's the point
I mostly write migrations for alembic myself, and I am sure a few others also do that... so not completely sure about that
Okay, (sorry for the low quality way to show it π ) I created a user and a Nomination(using the user that was created beforehand). (You can assume that there's only on from each of them, hence the use of .first() ) Then deleted the user, and checked the existence of the Nomination created before.
If you want to torture yourself, that's fine (where does the template even fit in at this point?). My point still stands though, it doesn't make much of a difference
Thanks
(torture? lol, I just didn't knew about this and now have written a lot of alembic migrations for two of my projects so I am just used to it)
Ok yeah, I am fine with removing black then, because the main job is done anyways
could someone have a look at my latest comment on bot#1917 (latest message in #dev-log )
@reef tinsel not on my laptop so can't comment on GitHub but dopy """ ...... """instead
a little confused?
that doesn't work
Wdym?
@molten perch alright, we're getting very close now. I've asked for someone from devops to have a look at the actions so we should be ready to go soon
pre-commit doesn't like it
What does it say?
Add a newline? If so, add it
open and closing quotes should be on the same line if 1 line string
in otherwords, that format isn't allowed
I mean ig "every day" --> "daily"
Cool, thank you! π So, in the end could you get those cascading working as well?
That's 4 chars less so will fix @reef tinsel
thx! that should save the chars - when i wrote that i initially had it too long, so it is already a little compact - another change can't hurt π
Yeah, we do sometimes have to rework docstrings
no
ignore the import error lol
I'm not aware of the context. So you created a User and a NominationEntry correspondingly, right?
(Although, you'll need a Nomination for a Nomination Entry though)
I dropped nomination completely, so I didn't need nomination
But yeah
Created a user, used it to create a nom entry
dropped user
nom entry still there
I'm not sure how.
It's supposed to return None like when you do type(user) (since you named the nominationentry user)
I still see the entries for the nomination in the DB for the nomination, but not the user
I did the same thing, it seems to work.
I cleared my entire environment, and started from scratch to get something reproducible
from datetime import datetime
from sqlalchemy.orm import Session
from sqlalchemy import create_engine
import os
os.environ["database_url"] = "postgresql://pysite:pysite@localhost:7777/pysite"
os.environ["auth_token"] = "my_token"
from api.core import settings
from api.core.database.models.api.bot.user import User
from api.core.database.models.api.bot.nomination import Nomination
from api.core.database.models.api.bot.nomination_entry import Nominationentry
engine = create_engine(settings.database_url)
session = Session(engine)
session.add(User(id=1, name="test name", discriminator=8000, in_guild=True, roles=[]))
session.add(User(id=2, name="test nominee", discriminator=8000, in_guild=True, roles=[]))
session.add(Nomination(active=True, user_id=2, inserted_at=datetime.now(), id=1, end_reason="", reviewed=False))
session.add(Nominationentry(id=1, reason="Something", actor_id=1, nomination_id=1))
session.commit()
user = session.query(User).first()
session.delete(user)
session.commit()
session.query(Nomination).first()
session.query(Nominationentry).first()
You want nominations to disappear when dropping users?
Is that a good thing in this case?
There are very few cases where users are deleted
And yeah, that is intended behavior
Ah, I think I see
I feeeeel like for safety reasons the user shouldn't ever be dropped if it is referenced by a nomination
If we want to drop info on a user then cascading sounds like a good thing
And for safety reasons we have blackbox
I don't think we would notice it
Nothing does it automatically
We do drop users when they leave the guild with no infraction
I'm pretty sure we'd only get to that point if someone requests data expunging
I think @patent pivot does that every month during the data review thing
Do we? 
Okay he stopped doing those
But if they leave the guild with a nomination that will stop them from being deleted in that case as well right?
But he used to do that
There were 216,631 records in the user table containing users from the Discord server. 12,780 of these records are users who have left the server with no infraction history, these records have been removed.
It's the same in the current API
I don't know if the query accounted for that. It is a non issue anyway since he stopped those.
bot/exts/backend/sync/_syncers.py lines 212 to 223
async def _sync(diff: _Diff) -> None:
"""Synchronise the database with the user cache of `βguild`β."""
# Using asyncio.gather would still consume too many resources on the site.
log.trace("Syncing created users...")
if diff.created:
for chunk in chunked(diff.created, CHUNK_SIZE):
await bot.instance.api_client.post("bot/users", json=chunk)
log.trace("Syncing updated users...")
if diff.updated:
for chunk in chunked(diff.updated, CHUNK_SIZE):
await bot.instance.api_client.patch("bot/users/bulk_patch", json=chunk)```
Syncer doesn't delete anything either
Only time users are deleted is when someone goes in and explicitly, manually deletes them
So, what's the context in that case? You have Nomination, NominationEntry and a User and you delete a User and you expect both Nom and Nomentry to be deleted?
Well, if the user is gone, why do we still have the nomination entry
It would appear to be dangling
Actually I see why
I didn't delete the other user lol
Okay, seems to be working as intendedβ’οΈ
Phew π
Cool
Thank you for the test and all! π
In theory, I patched the actions correctly.
Yep!
example:
[
{"number": 1, "explanation": "Lorem ipsum dolor sit amet", "answers": ["answer 1", "answer 2", "answer 3", "correct-ans"], "correct": "correct-ans"}
]
have you tested your feature yet with that json?
Here's your reminder: review bot#1917
[Jump back to when you created the reminder](#dev-contrib message)
Yaay, alembic setup merged π Thank you! π
I wonder if caching will properly work if you try to use the published container as a source
Or will we have to publish the dev one too
Gotta eventually test that
!remind 18H Test that
Your reminder will arrive on <t:1635420685:F>!
I believe so, yeah! π
Yep
the json provided will throw a key error with your current code. explanation needs to be description
Ohh, oops. I thought you were asking if I had tested it with a JSON. I did not test it with that JSON because I loaded a file to test it but discord doesnβt allow file previews/downloads on phone
So I couldnβt give the JSON I tested it with
Everything looks old for me
I got the new icons (purple)
Actually yes, there are new icons, but design is same for me currently
Can't wait to get some long messy bars for my PRs
Just go to the git history tab
I guess this is scary enough as it is: https://github.com/python-discord/sir-lancebot/pull/842/commits
The heck is this
Does github wants to make us feel even worse about our commit higiene
92 commits?
Holy crap, thatβs amazing
Atomic commits mean that you should try to reach Avogadro's number right?
I like this
It would allow making releases easier to manage
Gah, limited betas
Github will end up killing me with their betas
best way of rollouts
For sure
coming from someone who has run A/B for a user base of uhh
But it is pretty argh at some point
21 million
Pff, that's only the population of Switzerland
Do they do beta testing for new chocolate brands?
Nah I don't
Focus groups, the betas of humanityβs greatest achievements
If you find out let me know where I can sign up
Sorry it is only for countries members of the European union due to food safety concerns
no I'm not trying to keep all the chocolate for myself
lol
Lol
So, I'm trying to commit to sir-lancebot with isort added, but flake and isort keep causing conflicts for each other. flake8 doesn't like the additional newline between application relative and application while isort keeps fixing it
and causing that conflict
Here's your reminder: .
[Jump back to when you created the reminder](#dev-contrib message)
!remind 4H do this
Your reminder will arrive on <t:1635390387:F>!
At theatre
Hey, so I had a similar issue with that yesterday as well. See this: #dev-contrib message
Ty!
Np
Hmmmmm
Here's your reminder: do this
[Jump back to when you created the reminder](#dev-contrib message)
I assume that Bot (and maybe some other bots) will require the message intent? Whatever it is, it's probably worth it to put this information on the contributing guides?
doesn't mention the message intent at all there...
It's not relevant until April. We'll put it there when we actually turn on the intent
@reef tinsel just had a brief look at your commits since my review and it looks pretty good π
Will re-review later when I'm on my laptop
!remind 5h4M re-review bot#1917
Your reminder will arrive on <t:1635424255:F>!
That reminder has been edited successfully!
good thing the bot can then π
deletes message what did you say, I can do maths
Lol. I still need to make my issue for allowing to give end time for the command instead of using relative time
so can I
In fact
!remind 34h Issue for providing exact end time instead of relative time on !remind
Your reminder will arrive on <t:1635528701:F>!
Also @reef tinsel I'd hold fire on wookie's reviews for now since some of them I don't agree with and would like to flesh out
yeah
i'm changing things that are clearly good (i.e. api call saving and docstring updation)
Yep π
oh I misread sorry
so even you are there
probably
yeah
i sent a message, saw?
Some information by and about Scott Chacon
hmmm, i won't be there, but im very interested in if a branch per release is before or after a release commit is made to the default branch.
eg: is the newest release part of the main branch, or the last commit goes into the release branch?
makes sense
i need to make a release workflow to generate that last commit for me to a pr lol
this is about github actions
i am free today :D
interesting....
not anymore
Er, I just noticed this is drv contrib
lol, he messed it up
does sir lancebot run on a vps? or does it run on docker?
All our infrastructure is running on Linode Kubernetes
Here's your reminder: Test that
[Jump back to when you created the reminder](#dev-contrib message)
Hey all, I ran into an issue this morning during my testing. How would you raise an error from a command group subcommand? Currently for sir-lancebot#842 the subcommands all call the same "create and send embed" function. If there is an error during the conversions (specifically, the case when a name cannot be found during the fuzzy matching) how do I raise and send an error embed?
You want to raise InvalidArgument and it will send the proper error embed
I believe that's what you are asking
Ah, discord.py's error yeah
Isn't it BadArgument?
!d discord.ext.commands.BadArgument
exception discord.ext.commands.BadArgument(message=None, *args)```
Exception raised when a parsing or conversion failure is encountered on an argument to pass into a command.
This inherits from [`UserInputError`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.UserInputError "discord.ext.commands.UserInputError")
We raise our own execrations and handle it
Thanks autocorrect
Things like
!src sheygzbeksbd
Those use that
Iirc
!src src
Ah no youβre right
Itβs bad argument
Oh right, BadArgument
Alrighty, will have to try that out. I have to take any value from the user to search for a fuzzy matched color name, but when one is not found I need to raise the BadArgument when the function is returned
We handle them there, if you are curious https://github.com/python-discord/bot/blob/main/bot/exts/backend/error_handler.py
Sounds about right, yeah
@colour.command()
async def name(self, ctx: commands.Context, user_colour: str) -> None:
"""Command to create an embed from a name input."""
hex_colour = self.match_colour_name(user_colour)
# add try / except with BadArgument
hex_tuple = ImageColor.getrgb(hex_colour)
await self.send_colour_response(ctx, list(hex_tuple))
Eh, the linode dashboard is pretty fine
unnecessary
the only thing we provision on our Linode dashboard is the cluster itself, volumes, load balancers, firewalls, etc are all defined inside Kubernetes
TF is cool, but I don't like it for infrastructure at our size and don't want to use it here
@rapid igloo feel free to PR without an issue, you have my approval
She asked me to have a look
Your reminder will arrive on <t:1635472413:F>!
Here's your reminder: re-review bot#1917
[Jump back to when you created the reminder](#dev-contrib message)
!remind 1d Do this
Your reminder will arrive on <t:1635517917:F>!
Hey!
I am looking for the New idea for sir-lancebot
Everything is done
but before that I just need to ask that, is there already another such kind of feature?
I had created .gender command which will get a parameter and return the gender of that name
And exception and all, I had handled
How is it determining gender
Is gender defined by names? I don't think it is
I don't think a command that assumes gender based on a name is something we'd be interested in
Yup to both points
Hey! Would someone mind to assign me to api#22, just for the sake of consistency? π
Using a free API
Ohh
No issue
Hope it is fine for me to assign
Β―_(γ)_/Β―
Thanks π
._. Why enterprise
how do i install pip install -r requirements.txt
Hey @clever wraith! Can you please follow the instructions in #βο½how-to-get-help to claim your very own help channel? :D
Hey @last patio (I believe we never met, I am akarys other's identity), I wouldn't mind having a way to bypass the worker, but how do we integrate that into the hastebin UI?
what if we did it as a confirm
try once, get an error and warning, try again and it goes through
well we return a string right
How do we even code that? I guess you could set a session token
Yup, we do return a message to show as an error
joe ???? this is STATELESS web application development, we don't store state about requests here, what the hell, joe
We could actually store state in the user cookies
yeah maybe something stupid like "include the string no-token-in-here anywhere in your code to bypass"
But honestly I don't think it is good UIs because we know most users don't know how to read
we could always put "uwu gazooks! our web service inklings have determined a token! oopsie" to make it more user friendly, taken from discord's example
Heh
what happened to your other account
I don't think too long messages display nicely though
My other account is fine, I'm just a plural person apparently, heh
ya cookies
morethanone.info and all that jazz, but I'd guess you already know what plurality is
fair enough
first time I heard of it
very interesting
Well, now you know, heh
I'd be scared of users just pressing save twice though
without reading
maybe we could store a timestamp in there and require like 1, 2, 3 seconds before accepting a second save?
or just a regular ratelimiter may not be a bad shout
Leave my choccy chip cookies alone joe
Hmmm
Do we have that many false positive on token filtering?
workers#13
Too bad, workers#14
Lol
Oh, nice
Mind leaving a comment pls?
I don't even know if I am allowed to work on that PR. I think it should be fine.
what language should proxy be written in
hmmmmmm
the thing for filtering egress traffic
yea
that's part of it
yes
basically when coredns sees a query from a pod which is marked to have it's egressing traffic filtered
it'll return a DNS resolution to the proxy
the proxy then checks if that domain is permitted
yeah, but having proxy do it is nicer
we don't want to run a whole rule evaluation on our DNS controllers
that's wasteful and harmful to non-filtered traffic
i need to check with linode how dns support is
left a review smh
i wasn't supposed to send that yet
Hello everyone, does this thread have a list of projects to contribute?
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
- Read our contributing guidelines
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Here's your reminder: make people not able to cheat in candies ^
[Jump back to when you created the reminder](#dev-contrib message)
gah okay
done
Hey, @gritty wind! As for site#618, would you mind opening an issue in the API repo as well? So that we can keep the models up-to-date! π (If you're busy, I can open it as well)
Iβll open it once itβs approved for site
It probably wouldnβt make sense to open it now when it can still change
Is there a quick way of reloading a cog after changes when using lancebot with docker?
From your discord server, .c r <your cog>
Also, good catch on the color review, totally blanked when I was writing those BadArgument calls for the color ranges
@dim pelican regarding your error, if you would still get it as you haven't specified trashcan emote, did you read by point 1?
Or by error you mean that the .colour rgb(etc) aren't being catched?
try adding invoke_without_command=True on the group deco
I'll have to try it when I'm back at my testing setup
!remind 8h this
Your reminder will arrive on <t:1635544483:F>!
okay π
@timid sentinel @last patio changes addressed in bot#1793 ππ
Here's your reminder: Do this
[Jump back to when you created the reminder](#dev-contrib message)
Your reminder will arrive on <t:1635578572:F>!
Here's your reminder: Issue for providing exact end time instead of relative time on !remind
[Jump back to when you created the reminder](#dev-contrib message)
Thanks, there's no rush π just wasn't sure you saw it
im new to the syntax of the bots here
i wanted to replace the reactions in the bookmark command with buttons
is this correct? https://github.com/InvisibleOS/sir-lancebot/blob/main/bot/exts/utilities/bookmark.py
i just have to make a few more changes to the text in the embeds. apart from that, i need to add a timeout as well to delete the message.
Could you open an issue on sir-lancebot's repo with your proposed changes?
We can then discuss them and see if it's something we're interested in having on the bot
preferably this is done before you actually write any code, since then you don't waste your time if it ends up getting rejected
@dim pelican let me know if you're testing sir-lancebot#842 and things don't seem to be adding up. I think there is some confusion on the pr
omg...I see what you mean
Have you noticed that embed descriptions seems to be unhelpful at best? HSB information for 20. Random information for Pigeon Post. I'm wondering if we could throw some other info in it's place
"random information" doesn't sound like you're giving a random color
I had an idea that if you use the random subcommand, a reaction pops up π so you can get a new color without retyping the command. It's probably best left for another time, once this is pushed
Here's your reminder: this
[Jump back to when you created the reminder](#dev-contrib message)
@thorny obsidian
So, the unicode trickery is working, would we want to have syntax highlighting? I think I'd likely have to avoid keywords so we can still keep syntax highlighting, here's how it looks
Also experimenting a feature where it shows the amount of people that have answered so far
The only problem with this would be ratelimits
eheheehehe this reminds me of when i accidently made a repo after renaming
so uh the gist here is that yknow how github does the auto redirects
eg https://github.com/discord-python/bot goes to python discord
well what happened is i made one of those redirect repos by mistake because i made a fork of a repo with the same name ;-;
turns out if you delete it fast enough or something github keeps those redirects
Hm, would you all think a .joke command would be cool, just like a simple Python joke pulled from a text file (maybe a YAML if itβs different for different chats) like "What is a backend developerβs favorite kids game?", answer is "Jenga"
that would be quite fun
or "What did the coroutine say to the event loop?", answer is "await! Iβm almost done"
actually that one doesnβt make much sense
"What is a Python programmerβs favorite song?", answer "Blank Space by Taylor Swift", these are just a few examples
I love that idea!
your fork is yours and it has nothing much to do with the main repo. you can even create a fresh new repo named something ridiculous but pull main repo's commits locally, make your changes, then PR to upstream. it'd work afaik as long as the repo histories match
4 lines PR for reviews, anyone? sir-lancebot#931
Merged
any opinions on sir-lancebot#932 ?
Here's your reminder: bot#1793
[Jump back to when you created the reminder](#dev-contrib message)
left a review on the colour command π
good bot
im not a bot smh
@cold island @cold island @cold island clean is heeeeere!!!
oh yeeeee
I was actually just looking at it and noticed kwzrd's comment about time.time()
So many I should've changed that
but it seems to work 
Clean rework is merged?
yep
Woooooo
!help clean
!clean [users] [traverse] [first_limit] [second_limit] [use_cache] [bots_only=False] [regex] [channels]
Can also use: clear, purge
*Commands for cleaning messages in channels.
If arguments are provided, will act as a master command from which all subcommands can be derived.
β’ users: A series of user mentions, ID's, or names.
ββ’ traverse: The number of messages to look at in each channel. If using the cache, will look at the first traverse messages in the cache.
ββ’ first_limit and second_limit: A message, a duration delta, or an ISO datetime. If a message is provided, cleaning will happen in that channel, and channels cannot be provided. If a limit is provided, multiple channels cannot be provided. If only one of them is provided, acts as clean until. If both are provided, acts as clean between.
ββ’ use_cache: Whether to use the message cache. If not provided, will default to False unless an asterisk is used for the channels.
ββ’ bots_only: Whether to delete only bots. If specified, users cannot be specified.
ββ’ regex: A regex pattern the message must contain to be deleted. The pattern must be provided enclosed in backticks. If the pattern contains spaces, it still needs to be enclosed in double quotes on top of that.
ββ’ channels: A series of channels to delete in, or an asterisk to delete from all channels.*
Subcommands:
!clean all [traverse=10] [use_cache=True] [channels]
Delete all messages, regardless of poster, stop cleaning after traversing traverse messages.
!clean between <first_limit> <second_limit> [channel]
Delete all messages within range.
!clean bots [traverse=10] [use_cache=True] [channels]
Delete all messages posted by a bot, stop cleaning after traversing traverse messages.
!clean regex <regex> [traverse=10] [use_cache=True] [channels]
Delete all messages that match a certain regex, stop cleaning after traversing traverse messages.
!clean stop
If there is an ongoing cleaning process, attempt to immediately cancel it.
!clean until <until> [channel]
Delete all messages until a certain limit.
!clean user <user> [traverse=10] [use_cache=True] [channels]
Delete messages posted by the provided user, stop cleaning after traversing traverse messages.
Look at that big boy
welp
Two full screens on mobile, heh
One more review :lemon_plead: bot#1446
yooo
sir-lancebot#842 needs reviews / testing. Will let the reviews come in before adding more commits.
!remind 5d Check, implement, test reviews for color command
Your reminder will arrive on <t:1636024440:F>!
e: none of the above
1\ngoodbye\n? :P
yes
Anyone else getting an error when running sir-lancebot's main branch on docker?
Right now it is saying it cannot find the duck game's all_cards.png. Seems like it thinks the current directory is in bot instead of sir-lancebot.
sir-lancebot | FileNotFoundError: [Errno 2] No such file or directory: '/bot/bot/resources/evergreen/all_cards.png'
sir-lancebot |
sir-lancebot | The above exception was the direct cause of the following exception:
sir-lancebot | discord.ext.commands.errors.ExtensionFailed: Extension 'bot.exts.fun.duck_game' raised an error: FileNotFoundError: [Errno 2] No such file or directory: '/bot/bot/resources/evergreen/all_cards.png'
The directory is actually correct, we place our code in /bot
Although I'm not sure why the file isn't present
So I should rename my local fork folder to bot instead of sir-lancebot?
It is definitely present: sir-lancebot\bot\resources\fun\all_cards.png
I don't see that error in prod
No no, it should be correct
Can you try to rebuild the image?
Yeah I've built down and up but let me try again
Oh wait, the path is indeed wrong
evergreen isn't a thing anymore
But the code on main is correct
Did you pulled everything and all?
What's the full traceback?
My folders are still present locally even after the restructure
nope
Does git log -1 give you ba4b0e4?
No, since I'm on my fork and merged from upstream
Mine?
Whichever you are using, yes
Okay, seems like your history is heavily messed up
lol
I can tell you how to fix it, but honestly I'd recommend you to just be working on the upstream
git fetch upstream
git checkout upstream/main
git push --force origin main
```to fix your main branch
Had a gnarly rebase but should be good now
Looks about right
Thanks btw!
Oops, I rushed the answers to test out the feature so I didnβt check for validity
Hey! Just a quick question. I'm not very familiar with django tests. Does it set up an empty database for each test? Also, is that something that we want to include in the new API?
It restores it for each case
Assuming we're using django's testing utilities
let me check actually
Nah it should restore it to empty
Cool, so I guess it should do the same thing in case of the new API as well, right?
For the new API, I think it's probably better if we don't have a test database, and just have pure unittests
Like I can't think of much we'd gain over a purely functional approach (and maybe mocking out DB calls if we have to?)
Django does a lot of heavy lifting to get the unittests to work properly when you're dealing with mock DBs
And it limits our expansion potential for things like parallelization
Okay then, but if we don't have an actual test database how are we gonna test out if it actually works? (Mocking DB calls does not seem to be a good solution for me, many things could go wrong with DB relationships and such things.)
FastAPI framework, high performance, easy to learn, fast to code, ready for production
What you're referring to would be integration testing I believe, and I'm not sure what there is to go wrong. The way I see it, the API does one thing:
Take data, analyze it, return response
The DB comes in at the analysis step, and this is where we can use mocking. This is the code worth testing imo.
I don't really follow what can go wrong with the DB itself. Could you clarify
You'll notice fastapi doesn't actually do anything here, this is just a general guide
It's still up to us to configure the creation of the DB, make sure it gets migrated, and handle cleaning
That's the part django handles
We'd also have to inject parts of this into the test cleaners so it can clean the DB between each test
Yeah, actually. I was thinking about a pytest fixture.
It's a lot of work, and I'm not convinced integration tests will be all that useful yet
I'm looking through the test suite now
Actually, since the new API has to be totally compatible with the codebase of bot, I had to make a few adjustments. (like when filtering reminders you use "author__id")
So, I would be more comfortable if I had integration tests, but it's your call to be honest π
I'm not yet done with the reminder endpoints (Still haven't implemented the DELETE and PATCH ops.) so it's still far away.
And I'm not seeing anything actually utilizing the integration rn
Mostly just mocking
Could you elaborate on this
Sure,
so https://github.com/python-discord/bot/blob/main/bot/exts/utils/reminders.py#L266
Django has this double underscore syntax, although as far as I know SQLAlchemy does not.
I had to create an alias to handle this (Pydantic alias).
So, there are a few pitfalls like this. That's why I wasn't sure about how to write the tests.
bot/exts/utils/reminders.py line 266
'author__id': str(ctx.author.id)```
Well, if it's a pydantic alias, that'd still fall under the unit testing portion, not something we need to mock out
On the DB side, it'd be the exact same
Okay then. I'll open a PR sooner or later. π
Although, I'm not sure why this is here, then. (btw. it's not that big of a work to set those integration tests up)
https://github.com/python-discord/api/blob/main/.github/workflows/lint-test.yml#L29:L41
.github/workflows/lint-test.yml lines 29 to 41
# Via https://github.com/actions/example-services/blob/main/.github/workflows/postgres-service.yml
# services:
# postgres:
# image: postgres:13
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: postgres
# ports:
# # Assign a random TCP port
# - 5432/tcp
# # needed because the postgres container does not provide a healthcheck
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5```
PostgreSQL is already set up and configured for later, and simply needs to be commented out to start.
I don't think there was anything planned for it yet, just migrated from site just in case
I see, I haven't done Mocking before, so I'll have to hit up the documentation, but it's gonna be fine. π
( Bit off-topic but congrats @molten perch on helper! )
Thank you! π
Congrats @molten perch !
tldr mocking is fun (please save me)
Alright, I finished the implementation of the reminder endpoints and the first batch of tests. (The ones that test the Token Auth)
But now I'm in a bit of a confusion, what and how to test next.
So, like how would I do the Mocking if I have to create a test user and a bunch of Reminders? Or Do I even have to test those?
(like: https://github.com/python-discord/site/blob/main/pydis_site/apps/api/tests/test_reminders.py#L49)
pydis_site/apps/api/tests/test_reminders.py line 49
class ReminderCreationTests(AuthenticatedAPITestCase):```
That's highly dependent on the code being tested. For the most part, I imagine you have the code that performs all the logic (get the request, find the appropriate action, parse arguments, etc, etc -> return some other data), and somewhere in the middle of that, you want to access database objects?
The simplest method to do that would be to mock the return of the database request and return your own User, reminder model, etc
It's basically what the current site does, it just defines the model, adds it to the DB, fetches it from the DB, and then uses that model
If you notice there, adding to the DB and fetching from the DB doesn't actually accomplish anything
Yeah, actually (at least for me) by just defining a fixture that creates a test database and returns a session then when the test ends it tears down everything seems like an easier solution, since the database queries are not tied to the database models, you just pass them as arguments when you query something using sqlalchemy, that makes it harder to mock this chain of method calling (I'm referring to requests such as session.query(Reminder).filter_by(content="test").all())
I don't think so, at least in that case, why would you add anything to your test DB besides reminders that have that content
You don't need to verify that filter_by(content="test") will work correctly, that's a reasonable thing to take as fact
Also, one of the reasons I'm so hard against having a test DB is because it adds an extra layer of complexity, which we'll then have to maintain, and will make it difficult for us to do certain things (I have test parallelization mind right now, just going off the test times in site), and can lead to non-reproducible tests
Look at it this way, you'll either put the effort into mocking the db, or creating it, cleaning it, and maintaining it
It's more effort to do that latter, and imo has much less ROI
Okay, it makes sense. I think I can mock the fastapi dependency that creates db sessions this way it'll be much easier π€
The dependency injection system was designed so that you could easily just pass arguments that would override the Depends
If you're still creating DB sessions, will that alleviate the aforementioned problems?
I believe so, yes!
congrats on helper @molten perch
More activity on metricity in the past 10 minutes than the past 10 months
At least we get to experience github's real time message fetching 
How long does discord cache external images
I'd like to see my new PFP one of these days
HELL yeah
@patent pivot question...should I strip tzinfo, or migrate to aware dts in db for metricity
since 2.0 is aware now π€‘
hmmm
I think either is fine
are there any scenarios where one is better than the other
Not really, psql stores in utc anyway, so I should just be able to set it on connection that I was aware dts
Just need to look around gino/sqlalch when I'm back later
I'll go with aware then, since it should just be a connection change, rather than shoving to strip tzinfo everywhere
Infinitedly, you need to yeet the cache
How 2 do that
What OS?
What
Web π€‘
Iβm referring to #dev-log
I hard reset my own cache if thats what you mean
I mean what client are you using
Yeah, if you use web just yeet your browser cache on the cdn domain
Discord windows, but even following that link anywhere itβs still the old image. Are you seeing the new one?
I could try another hard reload now
Everything is gonna take ages to load now, brb :P
Pfffft it's still the old one lmao
I guess it's not meant to be
How weird
how to get !d help for list.insert ?
the docs don't define a symbol for it so you can't directly
._.
As far as I can see, since d.py changed how they store user's avatars, there isn't an easy way to generate a backwards-compatible hash
My d.py 2.0 hash:```py
In [2]: hash(ctx.author.display_avatar)
Out[2]: 1811796705115642717
My d.py 1.7 hash: `a_2970a2477a6b8a040f740abc068b4d26`
Ahhhh nevermind. It's now referred to as the Asset's "key"
IE ctx.author.display_avatar.key
I was about to say, heh
Alright, since I'm here, opinions on whether we should store both guild and user avatars hash's in metricity?
CC @patent pivot
atm we only store the user's hash, so I could add a new column to store the guild specific hash too
Lol in the first one I think you were hashing the memory location lol
!e print(hash(object()))
@brisk brook :white_check_mark: Your eval job has completed with return code 0.
8792879756307
nah lol, Asset implements dunder hash
Ah
(which led to the confusion)
Since I had assumed the dunder hash of an avatar would return the same value as what used to be called the avatar_hash

I think they hash the hash though
!e print(hash('a_2970a2477a6b8a040f740abc068b4d26'))
@brisk brook :white_check_mark: Your eval job has completed with return code 0.
2074662032031832231
I guess not..
It's a hash of the cdn url now
Ooh, I guess that makes sense
aaaaall right, I think that's d.py 2.0 and threads working in metricity
nvm lol, the message event triggers before the thread create event
yea sounds good to me
Why isn't the lint-test showing under checks for bot#1901?
it isn't running because you have conficts
Ah right
Now I need to remember how to resolve conflicts when it's "too complex" for doing in the website
git fetch origin
git merge origin/main```
Thanks
I think I broke my bot
It just mutes me for every message I send saying "burst"
I don't even know how
It looks like the value isn't resetting
anti_spam:
# Clean messages that violate a rule.
clean_offending: true
ping_everyone: true
punishment:
remove_after: 600
role_id: *MUTED_ROLE
rules:
attachments:
interval: 10
max: 6
burst:
interval: 10
max: 7```do you mean this?
yes
I haven't touched anything to do with antispam so I'm really confused as to why this is happening
Thanks windows
It's 5pm not 4pm
It's even set to London timezone
Wtf is going on lol
10/10
The messages I'm sending are freaking out too
It initially shows sent time as 16:32 (laptop time) then discord corrects it
the UK is switching during the Saturday to Sunday night, right?
Yeah
how weird
I think my laptop went back an hour twice?
doesn't seem like it applied daylight saving
The thing is I was just in greece (2 hrs ahead of england) so maybe that screwed with it
I have no clue
have you restarted since?
are you dual booting?
please tell me not with ubuntu
Linux Mint
Okay, I don't know if this screws with the BIOS time or not
I mean I just manually set the time to 17:35 (correct) and I'm still getting auto-muted
even after a bot restart?
my bot is starting if you wanna check
Okay, it seems to be fixed
@static canyon linux and windows don't play nice with bios time
windows sets local time and displays it, linux sets utc, stores offset, and displays calculated local
or vice versa
so they set it differently unless you live in utc all year
I've always had the same issue
I'm utc half the year and utc+1 the other half
And yes, it's still very much broken
interesting
As long as I manually set time on windows it's fine
But as soon as I go back to automatic, although my laptop stays the same time, the bot starts muting me
It doesnβt like time travelers
Whhhyyyyy isn't this working
Okay so even setting time manually doesn't work
I am completely and utterly fucked
@hoary anvil @green oriole Do either of you know how to get around this?
pain and suffering
timedatectl set-local-rtc 1 --adjust-system-clock on Linux could help
So I honestly don't know what's happening
huh, how weird
Why isn't what working
I'm dual booting Win & Linux which is causing funkiness in the antispam detection
It keeps saying I'm breaking burst rules
Windows
In Docker?
Yea
Restart WSL?
WSL?
I'm not using WSL
I'm dual booting
I have a physical installation of both Windows 10 and Linx Mint on my drive
Ok but you're saying you're running the bot in Windows through Docker. I'm not sure how the Linux installation is related
^ π€·
Linux and Windows doesn't use the same BIOS time system and just fuck each other up
It could be something other than the dual booting
But I don't know what because I didn't touch any antispam code
sadly not
yes, except it is trying to count messages in the past 1h10s instead of 10s
Wait
I guess this is the case maybe I don't know
but I barely use windows on my main pc so idrc
But what does the Linux install have to do with where the bot is running
Nothing
So you're running it in Docker. Is Docker using WSL or Hyper-V?
How do I tell?
If you installed it recently it's probably WSL
do you have a win pro edition
No, home
then WSL
Ok, so as a first step I suggest restarting WSL
If it doesn't work we can think of something else
How do I restart WSL?
Don't remember the command, I'll check
wsl.exe --shutdown
or that
I have 
yeah
I just realised the logs in the terminal have time as 16: instead of 17:
erm```py
Traceback (most recent call last):
File "docker\api\client.py", line 214, in _retrieve_server_version
File "docker\api\daemon.py", line 181, in version
File "docker\utils\decorators.py", line 46, in inner
File "docker\api\client.py", line 237, in _get
File "requests\sessions.py", line 543, in get
File "requests\sessions.py", line 530, in request
File "requests\sessions.py", line 643, in send
File "requests\adapters.py", line 439, in send
File "urllib3\connectionpool.py", line 670, in urlopen
File "urllib3\connectionpool.py", line 392, in _make_request
File "http\client.py", line 1255, in request
File "http\client.py", line 1301, in _send_request
File "http\client.py", line 1250, in endheaders
File "http\client.py", line 1010, in _send_output
File "http\client.py", line 950, in send
File "docker\transport\npipeconn.py", line 32, in connect
File "docker\transport\npipesocket.py", line 23, in wrapped
File "docker\transport\npipesocket.py", line 72, in connect
File "docker\transport\npipesocket.py", line 52, in connect
pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 81, in main
File "compose\cli\main.py", line 200, in perform_command
File "compose\cli\command.py", line 60, in project_from_options
File "compose\cli\command.py", line 152, in get_project
File "compose\cli\docker_client.py", line 41, in get_client
File "compose\cli\docker_client.py", line 170, in docker_client
File "docker\api\client.py", line 197, in init
File "docker\api\client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
[16568] Failed to execute script docker-compose
PS C:\Users\tizzy\bot>```
That happens when I docker-compose run bot
Is Docker up yet?
It is started
I've got it open
I guess I'll try to restart
Okay, it's running
And the time in the console is correct π
That's a good sign lol
My mute has been auto-ended
Niice
I'm guessing it was caused by the hour shift and WSL stayed in the old time or something
Yeah, maybe
weird, wsl should've restarted when you restarted windows
@patent pivot Does the bot's API for infractions support some form of an oldest_first kwarg? If not, how would I go about implementing it? I've never touched api/database stuff before so got no clue where to look/start
hmmm honestly not sure, never worked with DRF
look at something that you know has it
What do you mean?
I don't know anything that has it lol
Or not at the api-level
I mentioned nominations earlier
One case has reversed(...) but that won't work here because it'll be reversed of the 100 most recent -- not the actual 100 oldest
Yeah, everything seems to be either reversed(...) or xxx.reverse() @cold island
There's no comments or anything saying what it does, but 'ordering': '-inserted_at' might just do it
Nope, that didn't work lol
Didn't work as in it didn't accept the arg?
I don't know
The resulting embed isn't oldest first
Ah, it shouldn't have the -
So 'ordering': 'inserted_at'
Looking at the viewset it should be able to accept the arg
@static canyon why is the bot migrating to ogblurple?
It's role colour is the new blurple
It's not, actually
Yeah, it's not
Our entire branding is the old blurple
We made the decision not to change
In that case, maybe just patch the blurple method to return og?
I'm confused with what's so bad about my approach
Future use
We don't want to be patching just for the sake of it
og_blurple is going to stay og_blurple π€·
I don't think that ppl are always gonna remember to not use discord.Colour.blurple() and that it's going to make it past reviews
then we fix it when people notice
and if it becomes problematic then we write lints for it
we aren't going to be monkeypatching anything discord.py, if we need to make substantial changes in the future we'll fork, patching for things like this is bad practice
Ah
Question
Why on the bot are we using the allowed_strings converter instead of Literal?
because it predates the Literal converter and wasn't migrated
What do we gain by migrating?
lol
Alright, the diff will be small enough, have fun @clever wraith
Yup
Go crazy
@clever wraith if you can, wait for bot#1926 so you can do that one too
Thanks
I've done this, and it's showing a warning about the conflict, but I can't actually see it?
I open the file and there's no conflict showing
Oh wait, I think it's because the entire file was deleted
CONFLICT (modify/delete): bot/exts/utils/clean.py deleted in origin/main and modified in HEAD. Version HEAD of bot/exts/utils/clean.py left in tree.
Oh yep
So I just delete the file?
Yeah, and port the changes made in your PR to the new file
right
I have just realised that @cold island's PR uses the old logging.getLogger instead of bot.log.get_logger
I suppose I should do a new PR for that
@green oriole how do I now push the resolve without pushing all the commits fetched from origin?
you push the commits from origin, because they're already on the target branch they won't show up and only the merge commit is visible
right
okay
Except I can't do that
Because origin is already updated? @brazen charm
You add, commit and push
What do I add?
The two files that had conflicts
And when I push it pushes a whole load of commits (all the ones that were fetched)
Right okay
Yeah that worked
I was thinking it'd add each individual commit to my PR's commits but it didn't
Apparently not the webhook though lol
lol, you did push 94 commits onto the branch
It isn't lying
Github is just deceting which one are from the PR when rendering the page
Right, yeah
there seems to be a bug at .wiki command. I was able to remove the message by pressing trashcan when eivl made the command.
is that supposed to happen?
Seems intentional
Or at least, the call to the paginator doesn't try to limit who can modify it
oh, so it is not a bug?
I'm not sure, it's not a bug, probably just an oversight. I wouldn't mind seeing it limited though. Would you like to open an issue or PR for that?
Opened a issue for it
PS C:\Users\tizzy\sir-lancebot> docker-compose run sir-lancebot
Starting sir-lancebot_redis_1 ... error
ERROR: for sir-lancebot_redis_1 Cannot start service redis: driver failed programming external connectivity on endpoint sir-lancebot_redis_1 (760f41add314f5f1951a61cc7269c28aa72164d1c193aedb75d3606b489c9838): Bind for 127.0.0.1:6379 failed: port is already allocated
ERROR: for redis Cannot start service redis: driver failed programming external connectivity on endpoint sir-lancebot_redis_1 (760f41add314f5f1951a61cc7269c28aa72164d1c193aedb75d3606b489c9838): Bind for 127.0.0.1:6379 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
```how do I fix this?
It's saying it's already allocated but I'm not sure why
That gave invalid container so just used the UI
I guess you have to do bot_site etc.
right
if you want to take the entire compose down, you need the compose file
It is bot_web_1 fwiw
You can just change it to use Literal already, and then @clever wraith won't be blocked
How do I change the logging level of the bot?
Should be:
logger.setLevel("DEBUG")
Or something like that right?
trace logging can be configured through the env var, otherwise I believe you just have to change it in the source or at runtime
You have a LOG_LEVEL env var in most projects, otherwise just turning on debug mode should be lowering to trace
I was hoping on changing it during runtime but yeah I see
you can change the root logger's level with internal eval
Yeah that's what I was trying to mess around with but couldn't figure out
should just be getLogger().setLevel(...) and it'll propagate to every logger (if they aren't set through the trace loggers env var)
I can't for the life of me get the bot to fetch the incidents webhook π€
Oh wait smh π€¦ββοΈ
@brisk brook maybe we can settle on a nice color for incidents that isn't transparent?
Transparent is meh
Haha yeah
I was gonna suggest literally "copying" the message. So the webhook author would be the message link's author and you would remove it from the embed
So that it "kind of" looks like the message right there
hmm
It adds some extra info, and I think it helps that it doesn't look like one of the reports
Also the purpose of the webhook author being the person reporting is that it's easier to associate the report with the embed
The embed currently shows a mention of the message author
Some embed fields don't support mentions
!u
Created: <t:1542225348:R>
Profile: @cold island
ID: 512354988157173763
Joined: <t:1582826109:R>
Roles: <@&267628507062992896>, <@&807415650778742785>, <@&267629731250176001>, <@&831776746206265384>, <@&587606783669829632>, <@&778376272509141023>, <@&267630620367257601>, <@&825337057181696020>, <@&295488872404484098>, <@&585529568383860737>, <@&764802720779337729>, <@&463658397560995840>, <@&518565788744024082>, <@&542431903886606399>
Total: 31
Active: 0
I'm guessing that title is what you were referring to? @brisk brook
Yeah the author name doesn't support mentions, that's why i didn't use it
I think Ak added an emoji there
