Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto icon changer #61

Conversation

ivandardi
Copy link
Contributor

No description provided.

ivandardi and others added 30 commits June 7, 2023 15:44
Adding a `\n` at the end of the `note` would, when the message gets
truncated, separate the note itself and the 'Output too large. Godbolt
link: ...' message. And, in the case the note would happen to be at the
end of the message, Discord trims trailing newlines.

I'm pretty sure this should work but haven't actually tested it.

Signed-off-by: Astroide <[email protected]>
That encourages people to use the modmail command more often because it doesn't feel like snitching.
danielrab and others added 28 commits July 24, 2023 18:48
the PR includes the following changes:
- adding MODMAIL_CHANNEL_ID to the template, because the bot doesn't
start with that field abscent
- removing the discriminator digits from the /ban command output,
because they don't exist in discord anymore, so always defaulted to
#0000
- a small refactor to the filtering of the /cleanup command, it just was
in the area I was looking at, and I got confused by how it works
- making all slash commands also accept ?, because that's what the help
message says is supposed to happen.
- fixing a bug where truncation will sometimes produce a message longer
than 2000 characters, while also refactoring the function responsible
for it

---------

Co-authored-by: danielrab.work <[email protected]>
<!-- what develop branch? -->

ball miri `unsafe`

Signed-off-by: bendn <[email protected]>
Problem: when using `/selftimeout`, if you *only* specify the duration
in hours, then an unexpected extra hour is added to the time.

Result: pain and suffering. I have to wait an extra hour before ~~being
offtopic in general~~ participating in productive conversations.

Solution: match on the `hours` value when minutes isn't specified. If
it's `0`, then the current default (60) is still used. If it's nonzero,
use 0 instead.
Currently, Ferris attempts to edit the reply after the timeout of 600
seconds. However, if Ferris' response has been deleted, this will cause
an Unknown Message error. To fix this, errors from editing the message
will be ignored.
(...and bump other dependencies)

Closes #17. Necessary for #8. Will supersede #20 if merged.

Please note that I haven't tested that it actually works.
If you forgot to give the bot access to the modmail channel you entered
in `Secrets.toml`, the error message wouldn't help you to figure out
what went wrong.

Previous error that was inscrutable:

> 024-01-09T14:32:02.131-05:00 [Runtime] WARN chaitrex_ferrisbot_test:
Encountered error: Setup { error: Missing Access

New error message:

> 2024-01-09T14:28:38.710-05:00 [Runtime] WARN chaitrex_ferrisbot_test:
Encountered error: Setup { error: Cannot enter modmail channel, …

Signed-off-by: Ivan Borgia Dardi <[email protected]>
Co-authored-by: Ivan Borgia Dardi <[email protected]>
so while discord renders emojis `<a:$emoji_id>` just fine poises matcher
thing does not, and therefore I sort of broke the emoji based commands.
As recently discussed in #rustbot-development.

Closes #26.
I did not test this locally. I attempted to revert it as cleanly as
possible.
If you prefer I can also revert the *entire* change which has a higher
chance of being correct.

fixes #29

---------

Co-authored-by: bendn <[email protected]>
@ivandardi
Copy link
Contributor Author

omg I didn't mean to open a PR to the fork origin

@ivandardi ivandardi closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants