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

Add /suppress #18

Merged
merged 6 commits into from
Nov 6, 2020
Merged

Add /suppress #18

merged 6 commits into from
Nov 6, 2020

Conversation

0xVR
Copy link
Collaborator

@0xVR 0xVR commented Oct 1, 2020

This allows anyone with Manage Messages to suppress (or unsuppress!) the embeds on a message.

Note: The code is slightly messy due to missing typings. Also, it makes use of the request handler to avoid being hit with a DiscordRESTError [50005]

@retrixe retrixe self-requested a review October 5, 2020 13:49
Copy link
Owner

@retrixe retrixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only are there are a lot of stuff that can be fixed, but there is no shortage of duplicate code, I'm only stopping here since the code is littered with too many comments from me. Apply these in batch and check back for more.

server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
Copy link
Owner

@retrixe retrixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove even more redundant code that could be common.

server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
Copy link
Owner

@retrixe retrixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we're done here with code cleanup, it looks good to me after these changes now.

server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
server/bot/commands/utilities.ts Outdated Show resolved Hide resolved
0xVR and others added 6 commits November 6, 2020 22:50
Co-authored-by: Ibrahim Ansari <retrixe@users.noreply.github.com>
Co-authored-by: Ibrahim Ansari <retrixe@users.noreply.github.com>
Co-authored-by: Ibrahim Ansari <retrixe@users.noreply.github.com>
These casts are no longer needed with Eris 0.14.0.
Copy link
Owner

@retrixe retrixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still a bit unsightly, but okay.

@retrixe retrixe changed the title Add embed suppression to the bot Add /suppress Nov 6, 2020
@retrixe retrixe merged commit 4803615 into retrixe:master Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants