#dev-contrib

1 messages · Page 126 of 1

green oriole
#

So you are a devops? Name every url on our servers

brisk brook
#

Oh you're a programmer? Name every error

vale ibex
fallen patrol
vale ibex
fallen patrol
vale ibex
green oriole
vale ibex
#

nice ctrl c ctrl v

fallen patrol
#

Yeah it looks bad

green oriole
#

tyty

#

Blame the manual

fallen patrol
#

Where'd you copy it from

#

Need it for reference

fallen patrol
#

Like legit, working on a startup sequence thing so

tough imp
#

when something you wanted to do doesn't work, but you don't know why.
thats like, everything ever for me

fallen patrol
#

Ikr

#

Oh god I am such an idiot

#

Aaaaaaaaaaaa

#

So tl;dr I wondered why nothing was printed to console

#

Because I was grabbing all of the stdout into my eval command

green oriole
#

That does sound problematic

green oriole
#

Interesting url

green oriole
#

Ikr

fallen patrol
fallen patrol
fallen patrol
#

@stable mountain actually uses that so yeah

patent pivot
#

why do we use freebsd exit codes lol

sharp timber
#

@cold island I think we should take inspiration from git

#
class Msg:
  last_channel: Msg
  next_channel: Msg
  last_user: Msg
  next_user: Msg
  message: discord.Message


history = Dict[int, Msg]
cold island
#

Ah, so that's what you mean by a dict - linked list combo

sharp timber
#

Yes

cold island
#

What will the keys be?

sharp timber
#

Well, there would be channel ID

#

But we could also have one for Message id

cold island
#

hmmm.. I don't particularly care about the channel

sharp timber
#

Stuff like clean would though

#

to clean a particular channel you just go to channel_history[channel.id] then go through last_channel until you hit whatever threshold

cold island
#

Yeah but the dpy cache exists either way no?

sharp timber
#

True, although I was thinking we'd just rely on this instead of both

cold island
#

A simple linked list runs into the same issues I have with the current cache

#

Which is bad random access and no slicing

sharp timber
#

Right, although that's what the dict is for

#

random access

cold island
#

I don't need a dict for that though, it's just indices

sharp timber
#

Well, either the messages are stored contiguously in a list/array structure, and indices work, or they're not, and someone, somewhere needs a dictionary

#

and contiguous doesn't really work for deleting from the middle

#

If we just want to delete from the front/end we could code up a circular buffer cache

cold island
#

I want to preserve deletions, so if we're making the same cache with deletions I'd rather just rely on the existing cache

sharp timber
#

ah, ok

#

What are the plans for evicting from this cache?

cold island
#

Just a size constraint

sharp timber
#

circular buffer

#

the builtin deque is a linked list

cold island
#

Why does it need to be circular?

sharp timber
#

to avoid reallocation

cold island
#

I don't follow probably

sharp timber
#

a ring buffer offers O(1) prepend, append, 0 delete, end delete

#

a python list offers O(1) append and end delete, but O(size) 0 delete and prepend

#
list:
  .insert(0) -> O(size)
  .append() -> O(1)
  .popleft() -> O(size)
  .pop() -> O(1)
  [random] -> O(1)
  growing -> amortized
deque:
  .insert(0) -> O(1)
  .append() -> O(1)
  .popleft() -> O(1)
  .pop() -> O(1)
  [random] -> O(size)
  growing -> no cost
circular:
  .insert(0) -> O(1)
  .append() -> O(1)
  .popleft() -> O(1)
  .pop() -> O(1)
  [random] -> O(1)
  growing -> amortized
cold island
#

I'm probably just unfamiliar with the data structure. Do you have a reference or something

cold island
#

How is random access kept at O(1)?

sharp timber
#

It's backed by an array

#

to access the Nth element, you go to slot (start + n) % length

cold island
#

Then how is 0 delete O(1)?

sharp timber
#

start += 1

#

now accessing indices is shifted one element right, as if it were deleted

#

Presumably, for GC purposes, we'd set the element to None too

cold island
#

Ah, so you allocate the max size in advance

sharp timber
#

yes, or you grow whenever your start pointer bumps into your end pointer if you want to be unbounded

cold island
#

We're in Python yeah? 😅

sharp timber
#

Yeah, but same deal :P

#

class RingBuffer:
  MAXLEN = 10
  slots: List[T] = [None] * MAXLEN
  start_slot: int = 0
  end_slot: int = 0

  def push(self, thing: T):
    self.start_slot -= 1
    self.slots[self.start_slot] = thing

  def popleft(self, thing: T) -> T:
    fetch = self.slots[self.start_slot]
    self.slots[self.start_slot] = None 
    self.start_slot += 1
    return fetch

  def append(self, thing: T):
    self.end_slot += 1
    self.slots[self.end_slot] = thing

  def pop(self, thing: T) -> T:
    fetch = self.slots[self.end_slot]
    self.slots[self.end_slot] = None 
    self.end_slot -= 1
    return fetch
#

This is basically it, without bounds checks

cold island
#

Hmmm we'll need to discuss it a bit more about deciding to use our own cache

#

Seems like an interesting idea though

sharp timber
#

It's a criminally underused data structure in higher languages

#

It's very popular in embedded and similar because it gives you flexibility without needing linked lists, as well as backpressure if it fills up

#

But the benefits (IE: O(1) in push/pop/pull/append) it grants are useful at any algorithmic level

cold island
#

I'll see if I can make a good case for it and make a poll for the core devs

sharp timber
#

inserting and deleting the middle though is still bad, although you could have it only move half if you really wanted to do that work

#

kk

cold island
#

Yeah it wouldn't fit if we used deletions, but if we don't care about removing deleted messages that looks like something that should work

sharp timber
#

If we were doing insert/delete then we'd want to look into a rope, but yeah

brisk brook
sharp timber
#

Yeah, but we have that on the message object

cold island
#

yeah

sharp timber
#

the question is really going backwards, from "we have channel ID and want latest message from cache"

#

which if we're not doing is fine to leave out that.. index

#

because I guess it is an index

light holly
#

i have a rope implemented

#

if you need one

fallen patrol
#

what feature are you implemented?

cold island
#

A message cache

fervent sage
#

O(1) access but also ordered and iterable?

cold island
#

Yes

#

But without removing deleted messages

brisk brook
cold island
#

Nope, they just stay there

#

They get naturally removed as newer messages arrive at the head of the cache

#

As any other message

brisk brook
#

Yeah that's what I mean

cold island
#

Ah

#

Then yes

brisk brook
#

Ahh, yeah I still am not sure how easy it will be to add

#

Like it is possible, but so far I know you have a general preference over not monkey-patching 😅

stable mountainBOT
#

discord/state.py line 217

self._messages = self.max_messages and deque(maxlen=self.max_messages)```
brisk brook
stable mountainBOT
#

discord/state.py line 1048

self._messages = deque((msg for msg in self._messages if msg.guild != guild), maxlen=self.max_messages)```
fervent sage
brisk brook
fervent sage
#

off the top of my head, take !tp add, a root alias for that is !nominate, meaning it doesnt need to be invoked as a group member

brisk brook
#

Ah

vale ibex
#

Yea, we subclass discord.ext.commands.Command to add a new kwarg root_aliases

#

Then we overwrite add_command in our sub class of Cog to iterate through the root_aliases and add them to the list of commands

cold island
#

Setting self.max_messages to None seems simple enough

brisk brook
cold island
#

Or maybe there's a way to tell it to not cache in the first place

cold island
#

Not to patch dpy's

vale ibex
cold island
#

Yes. We don't use it at all at the moment though

#

Unlike root aliases which is just subclassing, it will be a very involved monkey patch that is subject to issues every time that file is updated with new code

#

So we can just disable the dpy caching and have it as a cog

vale ibex
#

Yea

gritty wind
#

We make use of it in evals

#

Or at least, internal ones

#

Alternatively, may I suggest we just leave it as is, and maintain our own for whatever we want?

#

So have 2 caches

brazen charm
#

doesn't dpy also make use of it for something which may be useful? Having a separate cache for what it's needed or implementing the seq/deque interface to directly replace dpy's cache sounds like it'd make more sense

cold island
#

We can keep the existing cache yeah

#

Not sure what dpy uses it for

fervent sage
cold island
stable mountainBOT
#

discord/state.py line 518

def parse_message_delete(self, data):```
stable mountainBOT
#

discord/state.py line 523

if self._messages is not None and found is not None:```
cold island
#

So as far as I can see those events will update the cache, if there is one

brisk brook
#

Yes, so it handles that case

#

But those events will not propogate

stable mountainBOT
#

bot/utils/messages.py lines 97 to 105

try:
    try:
        await bot.instance.wait_for('reaction_add', check=check, timeout=timeout)
    except asyncio.TimeoutError:
        await message.clear_reactions()
    else:
        await message.delete()
except discord.NotFound:
    log.trace(f"wait_for_deletion: message {message.id} deleted prematurely.")```
cold island
#

Ugh I see

#

Why does it need the cache to dispatch the event

brisk brook
cold island
#

So dpy searches for the message in the cache

#

ok

#

Thanks for the explanation

brisk brook
# cold island So dpy searches for the message in the cache

Yup, and this is the case for most other events. reaction_remove is the word offender with having close to no information https://discord.com/developers/docs/topics/gateway#message-reaction-remove-message-reaction-remove-event-fields

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

gritty wind
#

We can use raw events (and we do for some things) if we really wanted to get rid of the cache

#

But we don’t have a compelling reason yet I don’t think

clever wraith
#

@vale ibex i resolved the lint errors on cowsay

brisk brook
#

It's a scary and easy trap to fall into though, trying to debug the bot and wondering why your events don't dispatch

dusky shoreBOT
patent pivot
#

very epic

#

i am goig to merge without testing because i live oon the edge

#

wait lint is failing @clever wraith

#

lol

green oriole
#

So hello Richard haha

#

You do have a ghost ping

vale ibex
#

just delete half of it

patent pivot
#

lmfao

green oriole
#

Make the limit 102 and hate it back

#

lol

#

If it passes I'm giving you a virtual cookie

#

No cookie, too bad

#

I gotta say though, I really appreciate you taking time to work on both smarter resources and arthur, tysm! 🍪

#

I am also on phone though haha

#

I always forget we have that

#

Get what?

#

It automatically appears in the file tab

#

We use a special format when reporting lint error instructing github to add those comments

fervent sage
green oriole
#

Yeah sure

#

they are in the whole org

patent pivot
#

arthur zone purge

#

what is the command

#

arthur zones purge

radiant merlinBOT
#

Pick which zone(s) that should have their cache purged :cloud_lightning:

patent pivot
#

wait emote in wrong place

#

lol

#

oo yea that isn't working

#

@clever wraith that code you removed for the devops check is actually meaningufl lol

gritty wind
#

Smh alias zone

patent pivot
#

hmmmm

#

I think we should be dynamically calculating the options

#

okay i'm gonna rewrite this a bit

#

I don't think using _is_devops is worth it

wind ruin
patent pivot
#

dpy v2

#

I'm also removing multiple options from cache purge

clever wraith
#

arthur help

#

Please

#

Help me

patent pivot
#

@clever wraith updates made

#

arthur zones purge

radiant merlinBOT
#

:cloud: Pick which zone(s) that should have their cache purged

radiant merlinBOT
dry folio
fallen patrol
#

so bad

#

smh

#

(/s)

radiant merlinBOT
#
arthur ed [-GVhs] [-p string] [file]

Ed is the standard text editor.

green oriole
#

akarys_rotate 🍪

#

I need to make akarys_heart but with a cookie

#

they all are joe

celest charm
clever wraith
#

if any core dev/contributor has time, could they get around to merging sir-lancebot#760 ? its been approved and just needs a merge

dusky shoreBOT
gritty wind
#

12 participants :O

#

@vale ibex good to merge?

clever wraith
#

wait what oops

gritty wind
#

Discord isn’t letting me mention wokie lol

vale ibex
#

smh wookie approving and not merging

cold island
#

Because it's wookie not wokie smh

vale ibex
#

i click green

gritty wind
#

I typed it like that to please the autocorrect gods

vale ibex
#

lol

clever wraith
#

time to test

#

it works

patent pivot
#
    async def interaction_check(self, interaction: Interaction) -> bool:
        """Check the interactor is authorised."""
        if interaction.user.id == self.authorization:
            return True

        await interaction.response.send_message(
            generate_error_message(description="You are not authorized to perform this action."),
            ephemeral=True,
        )

        return False
#

generate_error_message puts a ❌ on it

#

I like the x

#

arthur responses will always start with an emote

#

it does yeah, because it uses generate_error_message

#

arthur deploy restart xyz

radiant merlinBOT
#

:no_entry_sign: What is the airspeed velocity of an unladen swallow? Whatever the answer may be, it's certainly faster than you could select a confirmation option.

patent pivot
#

give that a try

#

i mean click the buttons

#

yeppers

#

don't standardise too much

fervent sage
#

thats BK not KA

#

smh

patent pivot
#

true true

#

because it's nice to have flexibility in future

#

there is no point standardising to the extreme now if I need to come back inn a month and undo it all

#

@clever wraith before you get started, an idea of what PRs you want to make would be nice, just so all revisions are approved and we don't have to remove some later on

thorny obsidian
#

(this really sounds like y'all should use issues to properly scope changes before work starts Sunglaso )

patent pivot
#

yeah, I'd say open issues for other proposed changes, standardising the view is fine but I don't think it's a big deal

#

actually, I think I'd rather explicitly define checks

#

we can standardise the logic, but it feelss like that is something that could slip through reviews & cause problems

patent pivot
patent pivot
#

yeah, I don't think Arthur is in need of any refactors right now

#

I can have a crack at it

#

we also have another new service in mind for devops but more on that in time

#

stuff to do with downtime monitoring on non-http services

#

batch

#

same namespace the cronjob is in

molten perch
#

Hey, could a core dev take a look at that issue? I would appreciate it! 😄
api#16

patent pivot
#

assume default if not specified

celest charm
clever wraith
patent pivot
#

kubectl create job test-job --from=cronjob/a-cronjob

fallen patrol
stable mountainBOT
#

bot/exts/info/help.py line 129

result = process.extract(default_process(string), choices, scorer=fuzz.ratio, score_cutoff=60, processor=None)```
green oriole
#

Do you have examples of inaccuracies?

fallen patrol
#

seems like a simple change of 60% to 80% isn't a solution, as it should have suggested "paste" for that one

vale ibex
#

I don't see an issue with having a lower threshold, since we list all of the suggestions anyway

#

it seems the issue is that it isn't matching at all in the second screenshot

#

It seems like that threshold is lower, because we have another fuzz with a higher threshold that auto-runs them

#

EG

#

!pastr

stable mountainBOT
#

Pasting large amounts of code

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

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

gritty wind
#

I don’t think this’ll work in this instance

#

This instance being the example you’ve provided

#

The examples are all tags

#

And tags use different scoring than what you linked

#

In fact it uses a custom built scorer

stable mountainBOT
#

bot/exts/info/tags.py line 85

def _get_suggestions(self, tag_name: str, thresholds: Optional[List[int]] = None) -> List[str]:```
gritty wind
#

Thanks python. Very cool.

green oriole
#

Not for normal commands

vale ibex
#

fixed

#

👌

cold island
#

@patent pivot question, why does Metricity store usernames but not discrims?

patent pivot
cold island
#

Hmm yeah, I would be interested in having them

patent pivot
#

make sure it defaults to 0000 though because users that left won't have one

cold island
#

The site might actually have what I want

brisk brook
vale ibex
#

Nah, discord doesn't allow it

brisk brook
#

Ah, it was 0001 I was thinking about

patent pivot
#

PR a fix that was generated by copilot LOL

cold island
#

lol that was generated by copilot?

patent pivot
green oriole
#

Why did you accept it lol

vale ibex
#

It's free code!

fervent sage
#

there are people with 0000s

vale ibex
#

not by choice though right? kek

green oriole
brisk brook
#

With a smallint you have -32768 to +32767

#

Just set it to -1

#

Or is it gonna be stored as a string?

#

Make it nullable?

fervent sage
#

result of a thing a while ago where having your account disabled and re-enabled would give you a 0000 discrim

fallen patrol
fervent sage
#

cause it doesnt matter

green oriole
#

lemon#0000 when

celest charm
#

because he is written in lua

cold island
#

Hmmm the anti spam cog sometimes refuses to work for me for some reason on my test bot, not sure why

vale ibex
#

Any errors?

cold island
#

Nope

#

Just... doesn't mute

patent pivot
#

@clever wraith am I good to take a crack at cronjobs

#

👍

vale ibex
#

have you tried adding trace logs to that cog?

#

I just have BOT_TRACE_LOGGERS=* in my .env because I'm lazy

cold island
#

The issue is that it just doesn't see the channel history for some reason

vale ibex
#

🤔

cold island
#

This returns an empty list

vale ibex
#

that's...odd

vale ibex
cold island
#

Ah, I do. Thanks

static canyon
#
#

Not sure if this is something we want to fix to keep the code accurate or whether it's a case of "it works so don't bother"

brisk brook
#

Just use Sequence[str]

static canyon
brisk brook
#

I don't see anything wrong with it, might as well. You could take the time to run mypy and Pyright on strict and correct some other type hints.

#

That way you'd fix them in batch

static canyon
#

Yeah, I suppose

#

That is, if I knew how to do that

brisk brook
#

Just install mypy through pip, then restart your console and do mypy bot, bot being the folder of course

#

Pyright I am not sure, but mypy should be easy enough I think

static canyon
#

I'll do mypy then 👍

#

Basically all the errors are just this @brisk brook

#

No clue what that means

#

"Skipping analyzing" or "Library stubs not installed"

brisk brook
#

You need to go pip install discord.py-stubs

#

Discord.py doesn't have type hints, so Mypy is saying "I can't find typehints, and there are no stubs that tell me the typings either"

static canyon
#

Right yeah fair enough

#

What about the errors towards bottom for "dateutil"?

#

These ones

brisk brook
#

Huh, I don't know if there are stubs for dateutil, try doing pip install dateutil-stubs. They're usually called that

#

Otherwise you can ignore those, it's not a module that's used a lot, so it's fine.

static canyon
#

Yeah, there's no matches so will just ignore that

static canyon
# brisk brook You need to go `pip install discord.py-stubs`

Still getting these two after this```
bot\exts\moderation\infraction\management.py:9: error: Skipping analyzing "discord.ext": found module but no type hints or library stubs
bot\exts\moderation\infraction\management.py:10: error: Skipping analyzing "discord.ext.commands": found module but no type hints or library stubs

#

Is there a separate library for that or something?

brisk brook
#

NOTE: Because discord.py uses namespace packages for its extensions, mypy must be configured to use namespace packages either with the --namespace-packages command line flag, or by setting namespace_packages = True in your mypy configuration file. See the import discovery section of the mypy documentation for more details.

static canyon
#

How can I ignore certain errors, such as error: "Logger" has no attribute "trace"?

#

Since that's just because the bot uses some custom Logger thing

#

I suppose I can ignore all attribute errors but then might ignore something I don't want ignored

static canyon
#

150 errors at the moment @brisk brook lol

#

Some seem legit and others I'm not so sure

brisk brook
#

Lmaooo

#

Take a quick look at the ones that stand out, I don't think the goal is to make the bot pass the type checker

#

Just clean up issues similar to the first one we started talking about

static canyon
#

👍

#

I don't know how to work on two branches at once with the bot so I'll wait for my current PR to get merged first so I don't accidentally mess stuff up

cold island
#

Hmmm a question about order. bot.utils has a cache.py file, but I want to add the cache logic I wrote to that directory in a separate file. What should I do about that? 🤔

brazen charm
brazen charm
# cold island yeah lol

What kind of a cache it is? maybe there is a name or location that'd fit it more than just a plain cache, or the current cache module could be renamed to lru_cache if I remember its contents correctly

cold island
#

It caches messages

#

Currently for the antispam cog but has other potential uses

#

and yeah the other file is an lru cache for async functions

#

Hmmm.. why are we not using it more often 🤔

#

But yeah, I guess I'll rename one of them or both

#

thanks

brazen charm
cold island
#

Currently it's used only in the pep cog. Which makes sense because links to peps don't really change

#

It could be used to save a few API calls to the rules endpoint. It's not a big deal either way

short snow
#

uhh why don't we sue lru cachec itself for caching the pep urls?

brazen charm
#

because it'd cache the coro returned by the coroutine function

short snow
#

yeah, (i thought it was containing some other caching logic, just saw it is a custom async implementation for lru cache)

tawdry vapor
cold island
fallen patrol
cold island
#

Hmm how do I run the bot tests in pycharm?

brazen charm
#

right click on the tests dir and run tests, though I think the cwd may need to be changed to the project root

fallen patrol
#

poetry run task test?

cold island
cold island
fallen patrol
#

oh idk lol sorry

cold island
#

np, Numerlor's answer was what I needed

fervent sage
gritty wind
#

Pro tip: edit the template to include the cwd, that way all your future suites have it

#

Top notch ux after that by just clicking the bright green button beside file/suite/test name

fallen patrol
#

(two quotes from me at different times)

green oriole
#

I do everything via my terminal and you won't make me go out of the 80s era

remote wigeon
#

lol

#

terminal rules

green oriole
#

lol @eternal owl the link to the issue on your draft PR is broken, could you please correct it?

fallen patrol
fallen patrol
patent pivot
#

what

#

!int socket

stable mountainBOT
#
WebSocket statistics

Receiving 2.01 events per second.

TYPING_START

22,558

MESSAGE_CREATE

17,241

GUILD_MEMBER_UPDATE

10,309

MESSAGE_UPDATE

2,117

VOICE_STATE_UPDATE

1,426

CHANNEL_CREATE

1,175

MESSAGE_REACTION_ADD

839

CHANNEL_UPDATE

758

MESSAGE_DELETE

589

CHANNEL_PINS_UPDATE

405

GUILD_MEMBER_ADD

315

MESSAGE_REACTION_REMOVE_ALL

269

GUILD_MEMBERS_CHUNK

251

GUILD_MEMBER_REMOVE

219

MESSAGE_REACTION_REMOVE_EMOJI

178

MESSAGE_REACTION_REMOVE

82

GUILD_JOIN_REQUEST_DELETE

49

GUILD_BAN_ADD

8

CHANNEL_DELETE

7

RESUMED

4

GUILD_CREATE

3

GUILD_UPDATE

2

READY

1

GUILD_BAN_REMOVE

1

patent pivot
#

we get typing events lol

#

it was discord end

fallen patrol
#

for dms

#

no, believe you me, I legit just talked to danny lol

patent pivot
#

oh right, you didn't specify DMs lol, the thing you mentioned was not a discord.py bug

#

the message from kat was referencing a platform bug

fallen patrol
#

ah

patent pivot
#

we have never / will never use dm typing for python

stable mountainBOT
#

bot/bot.py line 116

intents.dm_typing = False```
patent pivot
#

lol

fallen patrol
#

lol

patent pivot
#

we still don't receive user_update which again I think is platform

fallen patrol
#

ah

cold island
#

Someone around who's familiar with the antispam cog? I'm a bit puzzled by how it was designed

brazen charm
#

last time I was going to work with it I was heavily considering a rewrite first, but some other issue came up

cold island
brisk brook
#

Isn't that the code that actually groups messages?

#

So, say I was spamming in a channel. Without that code it would count as multiple spams because I used multiple messages.

#

This code sets up queues and those deletion contexts, which are simply groups of messages?

#

Or am I thinking about it incorrectly?

cold island
#

The code was already there, it was moved to a dedicated class

#

I just can't understand the commit message, because it works just fine on deleted messages

#

And also I don't see any call to a deleted messages endpoint, it just uploads them to a log

#

I'd assume from the code itself it's trying to prevent multiple log messages for the same spam event

#

Yeah if I strip the guards it tries to log it multiple times if I keep spamming after the filter is triggered

green oriole
short snow
#

There is one problem, in the wikipedia quess game, the extract includes the full name but the title only includes the first and last name

#

another one, there is no specific differentiation between such articles so i can't filter these out

#

this is how i form the questions currently

#

ok looks like those are the only two things i need to catch now

#

for names maybe we can get the match between the first and the last name, and remove that completel?

short snow
stable mountainBOT
#

bot/exts/moderation/modlog.py line 44

self._cached_deletes = []```
short snow
#

actually, I don't think we should do that since the deleted messages are only viewable by mod+ (ig) and incidents can be seen by helpers

#

cc: @sharp timber

green oriole
green oriole
clever wraith
#

hi

green oriole
#

Hello!

short snow
#

so i will just link to the message link and not display its content

#

hello 😄

green oriole
#

Oh, Bast wanted to display the message directly

clever wraith
#

iam new to this server can i get some roles

green oriole
#

Yeah, I feel like we should instead link to the log entry, although I'd like to hear Bast's input

green oriole
clever wraith
#

tq @green oriole

green oriole
#

I don' t think we would be able to even show the content of deleted messages to helpers without a privacy police amendment, but I would have to double check that. I don't think it makes sense either way, that should be a mod only information.

short snow
#

we could scrap the channel history but then we would need to parse the embed and then how many messages would be iterate through, finding messages a week back also can be a lot of messages.

Actually finding old messages isn't possible if we see the cache also since it won't retain them after restarts 🤷‍♂️

clever wraith
#

@green oriole r u talking to me

green oriole
#

I am taking to Jason

clever wraith
#

oh sorry

green oriole
clever wraith
#

@green oriole i want roles and and i wanna learn python coding here

short snow
green oriole
#

I also mean the other way around, consider the following case:

  • Someone sends a message X
  • A staffer links the message X in #incidents
  • The message X gets deleted
    I would want the bot to add a link to the deletion log of the message X in incidents
short snow
#

oh, so if a message gets deleted after linking? I would need to edit the modlog on message delete trigger then

green oriole
clever wraith
#

cant u give me roles @green oriole

green oriole
green oriole
clever wraith
#

how do i get roles bud

green oriole
#

I already told you to read #roles, I can't say better than that

clever wraith
#

oh ok dont get angry

short snow
#

thanks

clever wraith
#

ok @green oriole where can i learn coding now

green oriole
#

!resources you can have a look at our resources list

stable mountainBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

clever wraith
#

ok

trim cradle
#

@clever wraith to be clear, we do not give out roles randomly. If you have any other questions about roles, please ask in #community-meta. Thanks in advance!

cold island
#

If I have a formula with -1 in two places, should I collapse it into a -2, or keep it separate if it makes the formula clearer?

#

I suppose I can put part of it in a separate variable to make it less obvious

#

Yeah ok, I know what to do

green oriole
cold island
#

Exactly lol

fervent sage
#

It works lol

sharp timber
# green oriole Yeah, I feel like we should instead link to the log entry, although I'd like to ...

Yeah, this is completely reasonable. I was coming from the perspective that we'd want to show the message content (which is a point of the feature), with the gist that if we're forwarding message content then we need to be careful not to accidentally forward stuff if, say, someone accidentally has the wrong link in their buffer and pastes a link to a mod message, and that it would also (separately) be nice to get links to deleted message items.

timid sentinel
#

!mute 503580753947394060

stable mountainBOT
#

:incoming_envelope: :ok_hand: applied mute to @buoyant gulch until <t:1629574634:f> (59 minutes and 59 seconds).

tawdry vapor
short snow
#

can two messages in the different channels have the same id?

fallen patrol
#

no

#

all messages are different ids

#

except that some things can share message ids

short snow
#

ummm like?

#

rather than looking through the message history or the deleted cache, can i just make the deleted messages endpoint on the site GETable?

#

could probably add an addiontional key to deletedmessage_set for the modlog entry message link

short snow
#

for any admin: do you explicitly set permission for helpers to read #incidents?

#

if yes that would make my life easier to check if the role can read the channel or not

vocal wolf
short snow
#

is it explicitly set, like it is green ✅ for their role? if that isn't and it is based on a category then discord.py sets the permission to None and I would need to look a level higher to get the true value

vocal wolf
#

The green checkmark for helpers is set for view channel and send messages

#

it is not synced with the category that the channel is in

short snow
#

that should work I think, thanks xith :D

vocal wolf
celest charm
#

it does seem a bit surreal that people are contributing to features they can't even use 👀

severe tangle
#

So I messaged in a help channel but @stable mountain didn't send me a DM regarding that channel... I have my DMs on and the setting enabled 7408_shrekstare

fallen patrol
#

🤔

#

!ping

stable mountainBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

stable mountainBOT
#

bot/utils/helpers.py line 65

for thread in await channel.active_threads():```
fallen patrol
#

!source Github

stable mountainBOT
#
Bad argument

Unable to convert 'Github' to valid command, tag, or Cog.

static canyon
#

Is bot#1742 okay to be merged now that it has passed all checks? (should probably unlink bot#1757 first though since it won't actually solve)

cold island
#

So.. There's an issue here

#

If it doesn't solve it, that means we still need the FetchedUser and FetchedMember converters, just with a different functionality

static canyon
#

FetchedMember is still there, just renamed and will fallback to a discord.User (when the user isn't in server and ID was provided)

#

FetchedUser was removed

cold island
static canyon
#

To like UserIdentifier or something

#

Which will be Union[discord.Member, discord.User, DatabaseUser]

cold island
#

Hmm I suppose

static canyon
#

I think it makes more sense to create a DatabaseUser class than a FetchUser which tries User then fallsback to what would be DatabaseUser

#

Since I don't think we want a converter to be able to return multiple different types

#

From a quick look in converters.py there isn't any converter with this behaviour currently (other than the Unions like MemberOrUser) , and I think it should stay this way

#

Otherwise a converter type becomes ambiguous

#

Does that seem right? @cold island

vocal wolf
static canyon
vocal wolf
#

The top stuff is still there. Will Chris be doing it at the end of the PR, or did he just forget to force push?

static canyon
#

He did force push

vocal wolf
#

I'm still seeing all this, maybe github is borked?

static canyon
#

I see that too

vocal wolf
#

I think Chris squashed something else

static canyon
#

Yeah possibly

#

CC @vale ibex (if you can remember)

#

I'll squash if it needs to be done since learning opportunity lol

vocal wolf
#

be sure to make a backup in case things go sideways

#

aka checkout to another branch, then switch back to the branch you intend to squash a bunch

short snow
#

@vocal wolf I think the issue was approved when I started working on it and later it moved to planning

molten perch
#

My god, I think I may have did something wrong.

vocal wolf
#

oh dear

#

I see what you may have done wrong

molten perch
#

I set the default option to be rebase

#

It seems like I shouldn't have.

vocal wolf
#

git reset --hard d697860f22d13063a064ebc5982dea2dc127b0f0

#

that's when everything was normal in your PR

#

@molten perch

short snow
#

same was the case for me, when i rebased main branch to my PR all this mess happened

#

(regarding enhancing incidents pr)

vocal wolf
short snow
#

Right, I also like the status:approved label on an issue to make it even clearer, like how it is done on sir lancebot

vocal wolf
#

oh that's what I was forgetting about labels

short snow
#

yeah but it isn't used

vocal wolf
#

because it's new

#

@molten perch do you need help with fixing up your PR?

molten perch
#

I'm on it, it should be fine any minute 😂

vocal wolf
#

alright

molten perch
#

Never happened before 😄

vale ibex
vocal wolf
#

it happens at least once to every dev

vale ibex
#

It might be easier to just squash merge tbh

molten perch
molten perch
#

Everything up-to-date

vocal wolf
#

are you sure you're on the right branch?

#

and in the right repo?

static canyon
#

What do I need to do to squash the abomination?

molten perch
molten perch
#

Phew 😅 Thank you! 😄

vocal wolf
#

np lol

#

much better

molten perch
vocal wolf
brisk brook
# static canyon I'll squash if it needs to be done since learning opportunity lol

It's actually very simple:

First, pick a commit to base on. If the tree looks like this:
A - B - C - D - E - F

And you want to squash A and B, then copy the SHA of C.

Now do git rebase -i MY_SHA_FOR_C, it will open a textfile in your editor where you can change the verb to the left of the SHAs.

In this case you want to squash A and B, but more importantly, you want to squash A into B. So change pick to squash or s for A.

Finally save and close the file, it will open another that will allow you to specify the commit message. Edit it and save, then the rebase should finish

vocal wolf
#

it happens to all of us

#

and if it hasn't already, it will eventually

static canyon
molten perch
static canyon
#

I guess not since that would also change c,e,f

vocal wolf
static canyon
#

I want to "group" these into "Remove redundant..." "Update..." and "Remove unused..." (13 commits into 3)

brisk brook
#

You can also squash at the same time, so let's say we want it to be A - D. The file will look like this: ```
pick A Some text
squash C I don't know
squash B Other thing
pick D Final message

Now we squash C and B *into* D. So C, B, and D all become the same commit
vale ibex
# static canyon Wdym?

We have the option to squash everything into 1 commit when merging to main via the github ui

#

But using the opportunity to learn could be good

static canyon
static canyon
#

If I fail then we can do that lol

cold island
vale ibex
#

The reason it went wrong before is because I squashed on my local branch and pushed, but forgot to tell you to reset your local branch, so the next time you pushed, you pushed all of the other commits too

vocal wolf
#

@static canyon make dat backup if you haven't already

static canyon
#

Like copy all the files?

brisk brook
vocal wolf
#

While on your branch that you're trying to squash, before you do anything major with the git history rewriting, git checkout -b backup-remove-redundant-converters or whatever you prefer. Then checkout back to the branch that you want to do all the crazy stuff on and continue from there.

static canyon
vocal wolf
#

ye

static canyon
#

👍

vocal wolf
#

@molten perch ty for PR, works very well

short snow
#

lots of review requests 👀

vocal wolf
#

@slim widget you available?

short snow
vocal wolf
short snow
#

only akarys that i know of

molten perch
vocal wolf
green oriole
#

I will see if I can allocate some time for modpings schedule next week

#

This is totally selfish but I really want this feature :3

vocal wolf
#

cool

green oriole
#

!remind @molten perch 10s partygopher

stable mountainBOT
#
Absolutely!

Your reminder will arrive <t:1629625061:R> and will mention 1 other(s)!

stable mountainBOT
molten perch
#

Yaay, can you delete your message before the reminder arrives? Just to make sure 😄

#

Oh, wait I can also 😄

stable mountainBOT
#
Can do!

Your reminder will arrive <t:1629625157:R>!

#

@vocal wolf

It has arrived!

Here's your reminder: test
[Jump back to when you created the reminder](#dev-contrib message)

molten perch
#

Perfect :3

vocal wolf
#

now I'm realizing

#

does the embed need a link if it replies?

molten perch
#

I think @tawdry vapor mentioned it in one of the issues.

vocal wolf
#

what was the conclusion?

molten perch
vocal wolf
#

ah

#

for consistency, that's understandable

molten perch
#

So, I took the liberty and added it 😄

brisk brook
green oriole
#

And we got a sentry

There was an error when trying to reply to a reminder invocation message, 400 Bad Request (error code: 50035): Invalid Form Body
In message_reference: Unknown message, fall back to using jump_url

green oriole
vocal wolf
#

oh we didn't need that high of a log level then

green oriole
#

Actually

#

Don't you need an non empty message to be able to reply?

#

!remind 1s test

stable mountainBOT
#
Yep.

Your reminder will arrive <t:1629625379:R>!

stable mountainBOT
green oriole
#

Nope

#

That is weird

#

Yeah, we should lower the log level to like info

vocal wolf
#

I make fast PR

molten perch
#

Yeah, I'm not sure why I left it on "error" level, right after that it falls back to the jump_url behaviour 😄

#

So, it's expected.. I believe.

green oriole
#

I've just noticed your branch name for the reply PR, this is a galaxy brain move

molten perch
#

I thought no-one would notice py_guido

vocal wolf
green oriole
#

Already approved

#

I am speed

green oriole
#

LOL I like how this is an order

vale ibex
green oriole
#

Review now, or.. I can't find a great pun

vale ibex
#

Akarys is review boss

#

Xith is review master

vocal wolf
#

I've never approved on mobile before, is it even possible?

#

within the github app

#

ok

#

no

#

that's not fair lmao

vale ibex
vocal wolf
#

I disabled it, how did you still merge??

vale ibex
#

I manually merged

vocal wolf
#

ah fuck

green oriole
#

lol I reviewed quite a few little PRs on mobile

vale ibex
vocal wolf
#

github didn't give me that option

#

wait I disabled it and that gave you the power to do so

#

damn

vale ibex
#

lol

green oriole
#

lol you glitched github

vocal wolf
#

oh now it says re-enabled, thanks github, I, the troller, got trolled

#

lol

green oriole
#

Auto merge is quite buggy if the PR switches to a mergeable state

vocal wolf
#

@vale ibex ty anyways

green oriole
#

Yeah, you get exactly that

#

If you refresh it goes away and you have the green button

stable mountainBOT
#
No problem.

Your reminder will arrive <t:1629626103:R>!

#

@vocal wolf

It has arrived!

Here's your reminder: test
[Jump back to when you created the reminder](#dev-contrib message)

vocal wolf
#

it good now

#

no error

vocal wolf
#

it is the np

slim widget
#

Akarys is fast 😄

clever wraith
#

Hi

green oriole
#

Hello

static canyon
#

I have a-l and I want to make it intopy a b m # 3 commits into one c d e f g i k # 7 commits into one h j l # 3 commits into one

brisk brook
#

So copy the SHA of commit M

#

Then do git rebase -i MY_SHA

static canyon
brisk brook
#

Yup

static canyon
#
PS C:\Users\tizzy\bot> git rebase -i cbb5914bf8fa510550d9b2b6cb1b0569ccea396c
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them```
#

It's because I changed the config-default.yml but don't want to commit that change

vocal prairie
#

You can stash it then

#

I forget the exact syntax, but git stash --help should tell you

brazen charm
#

what did you change the default config for?

static canyon
brazen charm
#

the user config file should take priority for all keys

static canyon
#

I changed bot: token from !ENV "BOT_TOKEN" to just "BOT_TOKEN" so that I didn't get errors about missing env variable

vocal prairie
#

Why use the config-default.yml for that, why not just use config.yml?

static canyon
#

There isn't a config.yml

brazen charm
#

you're supposed to create it, it's not a tracked file

static canyon
#

So revert the change in config-default.yml and make the change in config.yml instead?

brisk brook
#

Just do git stash, then git stash pop when you're done

brazen charm
#

yes, just copying the changed part of the config to config.yml should work fine

static canyon
#

So having config.yml asyml bot: token: "BOT TOKEN"?

brazen charm
#

yeah I think that should work

static canyon
#

Okay, done

#

It still thinks there's a change in the config-default.yml so I'll have to stash anyway

brazen charm
#

revert the file

static canyon
#

How?

brisk brook
#

Just stash it, reverting is a bit scary

static canyon
#

I'll just stash for now since I'm meant to be doing squashing right now lol

brazen charm
#

git checkout config-default.yml

#

if they keep the changes around stashing for every change to the branch will be a pita

static canyon
#

Now git diff isn't showing the file so guess it worked

static canyon
brisk brook
#

Do you see a file open?

#

Can you copy and send the contents so I have a better idea

brisk brook
#

In subcommands, if you give it aliases like: append -> a you still need to do group a. Root aliases allow you to set an alias so for example agroup will call the subcommand

brisk brook
# static canyon

Perfect, start with reordering them as you wish. Remember that commits squash down so you will have to reorder them to be next to each other

static canyon
#

For the ones I'm going to use as a base

#

(Just out of interest)

brisk brook
#

So when you squash you will get a chance to edit the message

static canyon
#

Actually no

brisk brook
#

Otherwise you can change the verb pick to edit. This will stop the rebase and allow you to amend the commit

static canyon
#

I think I rebased the wrong thing

#

It's showing commits made after not before

#

It's showing from the first one made after (the bottom in image)

#

@brisk brook

brisk brook
#

And you want to change the first few?

static canyon
#

Yes

#

Everything before (and including) cbb5914

#

I rebased cbb5914 and it's showing everything after

brisk brook
#

Then delete all lines in the file, save, and quit it.

#

Let's abort and try again

static canyon
brisk brook
static canyon
#
PS C:\Users\tizzy\bot> git rebase -i cbb5914bf8fa510550d9b2b6cb1b0569ccea396c
error: nothing to do```seems to have worked
#

So I guess I need to git rebase -i 6dfe53b... (the top commit)?

brisk brook
# static canyon Everything *before* (and including) cbb5914

So remember, a Git commit history is a one-way timeline (append-only).

You can't do something before a commit and have it not change subsequentl commits.

What you'll have to do is pick more commits to rebase, but just change the bottom ones you don't want to change.

brisk brook
static canyon
brisk brook
#

Pick the one before it

static canyon
#

There isn't one before it

#

That's the first commit I made to the branch

brisk brook
# static canyon There isn't one before it

There is, it's in the bot's branch.

\   |
 \  |
  \ |
   \|
     |     <- This commit

Left is your branch, right is the bot branch. GitHub only shows the difference, that is, the commits you have but the main branch doesn't.

static canyon
#

Right

#

So I need to find when I made the branch I guess

#

(How do I do that? xD)

brisk brook
#

Do git log and press ENTER to scroll

static canyon
brisk brook
#

I don't know, you're really not meant to haha

static canyon
#

Because the message after it is me opening the branch

#

Although that's in a branch, not main, so nvm I guess

static canyon
brisk brook
#

I opened the commit you linked above, and pressed Parent

brisk brook
brisk brook
#

Like I said, just type git log and find the commit before "Remove redundant converters"

#

Git will know

patent pivot
#

wait this issn't stafff liunge LOL

static canyon
#

So the one you linked from the looks of it

#

6dfe is my first, d5ee is the one before

#

So git rebase -i d5ee...? @brisk brook

brisk brook
#

Yep!

static canyon
#

Right okay

#

I just need to group them together right?

brisk brook
#

I am on my phone ATM, I can't read that text file. A screenshot will be fine

static canyon
#

Okay

#

Before:

green oriole
#

Change every pick except the first one to squash

gritty wind
#

This is the point where I plug GUIs

static canyon
#

After (have only changed order)

gritty wind
#

Git User Interfaces*

#

I don’t think git will handle that particularly wel

#

Maybe it’ll just ignore it

#

You don’t need to change the order though

brazen charm
#

changing the rebase actions is relatively fine, but for resolving the conflicts that may come up I'd always go through a gui

gritty wind
#

I’ve got some fun aftermath stuff from today’s PATMA event

#

This is the entirety of the sentry error log for the bot. The 403s were just misconfigurations of perms. It speaks to the quality of @stable mountain since the code is just copied from there 😛

static canyon
gritty wind
#

For squashing, keep the order the same, and just change the ‘pick’ beside each commit

#

For commits you want to keep, leave it as pick

#

For ones you want squashed into others, use squash instead of pick

#

Then save and close the file

#

There are other keywords that are used for things that aren’t squashing

#

You may be able to see them in a comment somewhere, possibly in your terminal

brazen charm
#

they are in the generated file

gritty wind
#

More event stuff. This is my DO panel for snekbox (just snekbox, the bot ran in a separate instance). It managed really well as far as I could tell. You can actually see right about when the event started 🤡. No major problems though (now if they’d just pay for my personal cloud)

static canyon
static canyon
gritty wind
#

It’ll merge them into the commits on top (older) of them

#

For instance, if you have commits a, b, c, d (a being oldest), squashing b and c will result in:

  • a, b, c
  • d
#

Trying to jump up to the message, but mobile is being funky

#

I see your message now

#

So, if your oldest commit is a, you’d want to make sure you have b and m right below it, set a to pick, b and m to squash, and you’ll end get what you want

#

You may end up with conflicts though

#

An alternative to this approach is to reset your current branch to the base revision you checked out from using ‘soft’

#

What that’ll do is it’ll drop all your commits, but keep the actual current version of things

static canyon
gritty wind
#

Yeah

static canyon
#

Do I need to change to squash too or just reorder?

gritty wind
#

I believe so, tho I only saw the abbreviated titles, not the actual commit names

gritty wind
#

Or tennis if you’re into that

static canyon
#

Lol

static canyon
gritty wind
#

You’ll get another prompt to edit the message

#

It’ll show all three together, and you get to mold them as you like

static canyon
#

Right yeah

#

I'll do that now

#

How do I delete a commit? @gritty wind

#

I have duplicates from when Chrisjl squashed earlier but forgot to tell me I had to reset my local branch or something

gritty wind
#

So are you deleting them just from history, or do you want to remove the changes too

static canyon
#

Hmm

#

Just history, because there wasn't any changes made (the ones I'm deleting are squashes)

gritty wind
#

Okay

#

You can just squash them into any other commit, and provided the same code existed at the commit you’re merging to, it’ll disappear from history

#

I.E if commit C has the same code as commit B, squashing C into B will make it disappear (you just need to remove the message)

#

Fixup may also do this thing, but I’ve never used it

gritty wind
static canyon
#

I'm interested in doing it this way just cause I'm learning a lot about git

gritty wind
#

In that case, do look into fixup haha

static canyon
#

I'm so scared I'm gonna do this wrong lol

#

But I guess that's why I made the backup branch

brisk brook
static canyon
#

Think this is right

#

2,3 merges into 1
5,6,7,8,9 merges into 4
11,12,13 merges into 10
15 merges into 14

brisk brook
#

Yes that looks good

static canyon
#

Thanks 👍

#

Will confirm when I go back upstairs

static canyon
#

Where do I write it? @brisk brook

#

Bottom of file I guess? (L31)

brisk brook
#

The first line will be the commit message, if you have more lines under it those will become the description

static canyon
#

👌

#

So like this? @brisk brook

brisk brook
#

Remove the other uncommented lines, you don't need them

static canyon
#
PS C:\Users\tizzy\bot> git rebase -i d5ee28133f8e792526716b07d25cbf6e4faba3a1
...
error: could not apply a0f079d7... Rename converter from FetchedMember to MemberOrUser
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply a0f079d7... Rename converter from FetchedMember to MemberOrUser
Auto-merging bot/errors.py
CONFLICT (content): Merge conflict in bot/errors.py
Auto-merging bot/converters.py
PS C:\Users\tizzy\bot>```
#

I got an error

#

Not really sure what the conflict is

fallen patrol
#

open that file in a gui editor

brisk brook
#

You will see something like: ```
<<<<<<<< AAAAHHHHH
from collections import abc

from collections.abc import XYZ

AAAHHHGGG

fallen patrol
#

AAAAHHHHH
wait what

static canyon
#

Right okay

#

I may have done it

brisk brook
#

Great, now do git add bot/errors.py

#

And then git rebase --continue

static canyon
#

Yeah I've done a whole load of conflicts

#

Now got the Successfully rebased and updated refs/heads/remove-redundant-converters.message

#

No clue what to do now though lol @brisk brook

brisk brook
#

Do git log and check the history

static canyon
#

I appear to still have a duplicate (top and bottom)

#

Ah wait no I know why

#

I now need to remove 3 commits from the history

#

Right okay

static canyon
brisk brook
#

Ah okay

static canyon
#

So what do I do now?

fallen patrol
#

git push presumably

static canyon
#

Hopefully I'm in the correct branch and stuff

fallen patrol
#

then uh, git status

fallen patrol
#

something like this:

static canyon
#
PS C:\Users\tizzy\bot> git push
To github.com:python-discord/bot.git
 ! [rejected]          remove-redundant-converters -> remove-redundant-converters (non-fast-forward)
error: failed to push some refs to 'github.com:python-discord/bot.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
PS C:\Users\tizzy\bot>```
fallen patrol
#

ergh

#

uh

#

git fetch

static canyon
#

But I don't want to

brazen charm
#

you changed the history, you need to force the push

fallen patrol
#

oh

static canyon
fallen patrol
#

ye

fallen patrol
#

git fetch just checks if there's been any changes on the remotes

#

I think you're thinking of git pull

static canyon
#

Ah right I was thinking of git pull (I didn't want to change my local copy)

#

Yeah

fallen patrol
#

which internally runs git fetch && git merge (tldr)

static canyon
#

👍

#

Ty

fallen patrol
#

as an aside I tend to run git fetch --prune which removes references to deleted branches on the default remote

static canyon
#

31 comments to 15 😄

#

It looks like everything's correct too which is always nice

#

Can someone please confirm that I've done this squashing correctly on bot#1742?

static canyon
#

Also @green oriole I forgot "solves" isn't a term for linking a PR with an issue so bot#1763 has to be closed (not sure how to manually link them)

green oriole
#

Oh

#

I am not logged in on that device, can someone close it please?

static canyon
green oriole
#

Oh, of course you can, I'm silly

#

You can just say "Solved by #XXX" and close

static canyon
#

Okay 👍

static canyon
brisk brook
#

Should these perhaps be squashed?

static canyon
#

They are all different fixes

#

But I suppose they could be

#

I think the rename should be separate at least

#

The last three were a case of "commit, lint failed. Fix the lint issue, commit, etc.."

cold island
#

@static canyon made one last requested change

#

Otherwise looks good

static canyon
#

Yeah, just fixed it ^^

cold island
#

Cool

static canyon
cold island
#

Yeah I know, was just going over the commits one last time

static canyon
#

👍

vale ibex
#

I copied it from elsewhere

cold island
#

Does changing the typehint change the exceptions being directed to the function?

vale ibex
#

Calling type() on that error still shows it as a commanderror

#

so it doesn't seem like it

#

guess they don't pass through converters

cold island
#

Odd

vale ibex
cold island
#

Well I'm not sure how to functionally test it

vale ibex
#

with buttons that remove themselves after being clicked

#

🎉

vale ibex
#

Actually, you can test the share too, as long as you choose a question that's already marked as publicly shareable

brisk brook
vale ibex
#

I just thought I'd mention it since @radiant merlin doesn't remove his buttons kek

static canyon
#

Should I make a quick PR for bot#1750? It's just changing the time format used

vale ibex
#

Go for it 😄

#

Also, small note that I've finished implementing the interactions side of this, buttons are really nice to work with in d.py

fallen patrol
#

uh

static canyon
#

bot#1766 reviews please (literally just changing a timestamp format)

brazen charm
# fallen patrol

Probably match a member, should we move the mentions to the end?

vale ibex
# fallen patrol

I'm guessing the user converter got greedy, and there are people named 3D and maybe

fallen patrol
#

I mean

#

hm

static canyon
#

There is a user named 3D because I accidentally muted them the other day

vale ibex
#

I wonder if we should be stricter with those converters, since we don't really want to match strings there

fallen patrol
vale ibex
#

yea, that's my thought too

#

remove the str option for that converter

static canyon
#

!src remind

stable mountainBOT
#
Command: remind

Commands for managing your reminders.

Source Code
fallen patrol
#

!remind Chrisjl#2655 1s test

stable mountainBOT
#
Naw.

You can't mention other members/roles in your reminder!

fallen patrol
#

!remind 3D 1s test

stable mountainBOT
#
No way, José.

You can't mention other members/roles in your reminder!

fallen patrol
#

yep, its a user

static canyon
#

MentionOrID is already a converter so I guess you can use that

vale ibex
#

!remind A Real Username#8028 1s test

brazen charm
#

it's using the dpy converters for members

fallen patrol
#

should switch to using those instead, then

vale ibex
#

lol

fallen patrol
#

!remind "A Real Username#8028" 1s test

vale ibex
#

oh yea, it's using the user converter there

static canyon
#

It uses Union[discord.Member, discord.Role]