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-trigger alias support #3081

Merged
merged 13 commits into from
Aug 21, 2021
Merged

Conversation

popeeyy
Copy link

@popeeyy popeeyy commented Aug 8, 2021

Add support for alias commands in auto-triggers for easy editing of multiple triggers. Let me know if anything I did can be improved, I'm not very experienced with Python or any libraries such as discord.py.

RealCyGuy and others added 12 commits June 5, 2021 22:03
- **Case insensitive snippets**: Allow snippets to be ran even if with the wrong case. For example, `?Dm-RePort` will be recognized as `?dm-report`.
- **Close message:** Add a `?closemessage` command that will close the thread after 15 minutes with a default message.
- **MDLink**: Generate a ready to paste link to the thread logs.
- **Reply cooldown**: Forbid you from sending the same message twice in ten seconds.
- **Tagging**: Add a `?tag` command capable of adding a `$message|` header to the channel name.
…plugins

Add Python Discord's plugins to the registry
@fourjr fourjr changed the base branch from master to development August 8, 2021 07:28
Copy link
Collaborator

@fourjr fourjr left a comment

Choose a reason for hiding this comment

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

This implementation is too basic and does not support multistep aliases (i.e. reply hi && move appeals), also arguments are not being passed for some reason (reply hi does not pass my hi argument). Is it possible to extract alias functionality to another function within Bot and call it (here and when invoking commands)?

Also, before committing, do remove your debug print statements and run black . for formatting checks. See out CONTRIBUTING.md for tips. PRs should also be pointed into development instead of master.

@popeeyy
Copy link
Author

popeeyy commented Aug 8, 2021

Is it possible to extract alias functionality to another function within Bot and call it (here and when invoking commands)?

I found the function that did this and I was looking for yesterday, but it is stuck on "if self._skip_check(message.author.id, self.user.id):" and otherwise works fine. What is skip_check as I don't see anything in the discord.py documentation and doing a search through all the code yields no results. Once I know what this is, I will fix that part and commit my changes and all the functionality should be brought back.

Also, before committing, do remove your debug print statements and run black . for formatting checks. See out CONTRIBUTING.md for tips. PRs should also be pointed into development instead of master.

Thank you for letting me know, I will try to do that in the future. As you can see from the commits, I tried my best to look for all the debug statements and I thought I got them all out.

@fourjr
Copy link
Collaborator

fourjr commented Aug 9, 2021

@popeeyy popeeyy requested a review from fourjr August 9, 2021 02:40
@fourjr fourjr merged commit 86ccf50 into modmail-dev:development Aug 21, 2021
Copy link
Collaborator

@fourjr fourjr left a comment

Choose a reason for hiding this comment

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

lgtm thanks!

@fourjr fourjr added the staged Staged for next version label Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staged Staged for next version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants