tModLoader / tModLoader-Discord-Bot

A Discord bot written in C# using Discord.Net to serve the tModLoader server. Uses .NET Core 2.0+
https://tmodloader.net/
Apache License 2.0
13 stars 9 forks source link

Way for users to delete requested tag #3

Open JavidPack opened 5 years ago

JavidPack commented 5 years ago

It has been suggested that the user who requested a tag or search can trigger the tag to be deleted. The suggestion was to react to the message with X emoji. I was also thinking an .oops command could also undo a mod command.

This would require remembering a user to last requested message mapping.

Metacinnabar commented 4 years ago

.oops deleting the message above would be very useful, especially for unglobal tags. Also, delete the .oops command after 2 seconds or something

Agrair commented 4 years ago

I don't think the overhead would be that bad. Create a new ReplyAsync in BotModuleBase that calls the original ReplyAsync whilst indexing a static Dictionary<ulong, ulong>. The 'oops' command would have easy access to the dictionary. I don't think it even has to be concurrent.

Jofairden commented 2 years ago

I like the idea of an .oops command, it can definitely be made. The easiest way to do this is just save the command output in a short lived cache, and allow up to 30 seconds for example to use it. However, nowadays discord also support buttons. Im not sure a privately seen button can be added to messages that are viewable by everyone, but it is worth looking into