Farcrada / DiscordPlugins

This repo holds all the plugins I made for Discord.
GNU Affero General Public License v3.0
113 stars 64 forks source link

Addition of HotKeys for Replying and Editing #121

Closed aquafenaa closed 1 year ago

aquafenaa commented 1 year ago

I added hotkeys (such as shift, control, none, or any) for the user to press while editing or replying. This allows the user to:

  1. Reply to user's own replies, and
  2. Allowing nothing to happen when double clicking, stopping the user from being forced to choose between editing/replying, and copying text inside of a message.

That being said, I left the ability to copy things with a hotkey (or as you said, "modifier") of their choice, just in case they wish to auto-copying things still.

Additionally, as the plugin is still named "DoubleClickToEdit," editing is still the preferred action. If you have both edit and reply both configured to the same key, the client will open the "edit" box, instead of the "reply" box. The only exceptions are when the user cannot edit a message (e.g. if it is another user's message), and if edit is set to "Any," with the reply set to something else. In this case, if the reply key is being held down, it will activate instead of an edit.

A few things for the developer to note:

  1. The settings do not look the best, and I am unsure on how you would like them to look. I would recommend changing them to your liking :)
  2. This is my first time ever messing with BetterDiscord, and their API. I apologize if something doesn't work properly, and if something's broken and you're too busy let me know and I'll happily try to fix it.
Farcrada commented 1 year ago

I love the open source community.

Farcrada commented 1 year ago

There is also another variable that we'll need from BdApi at the top: Data. { Webpack, Webpack: { Filters }, Data } = BdApi,

As well as an increase in the version. 9.4.4

Farcrada commented 1 year ago

Uhh. You added a indent or two everywhere.

If you can revert back to your previous commit and then commit this version with the original indenting I can actually look at it, because it's a major mess now.

Edit: To make it easy there's the Github desktop app: https://desktop.github.com/ And in there you can revert a commit: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/reverting-a-commit

Farcrada commented 1 year ago

Ah. Did not know I could do that. Cool.