diff --git a/ChaosBot/Discord/Services/CommandHandler.cs b/ChaosBot/Discord/Services/CommandHandler.cs index af9d4a3..f2d2290 100644 --- a/ChaosBot/Discord/Services/CommandHandler.cs +++ b/ChaosBot/Discord/Services/CommandHandler.cs @@ -33,6 +33,10 @@ namespace ChaosBot.Discord.Services _client.MessageReceived += MessageReceivedAsync; + _client.ReactionAdded += ReactionAddedAsync; + + _client.ReactionRemoved += ReactionRemovedAsync; + _client.UserJoined += AnnounceJoinedUser; _client.UserLeft += AnnounceLeftUser; @@ -81,6 +85,16 @@ namespace ChaosBot.Discord.Services } } + public async Task ReactionAddedAsync(Cacheable cacheableMessage, ISocketMessageChannel socketMessageChannel, SocketReaction reaction) + { + RoleReactionHandler.HandleReactionAdded(cacheableMessage, socketMessageChannel, reaction); + } + + public async Task ReactionRemovedAsync(Cacheable cacheableMessage, ISocketMessageChannel socketMessageChannel, SocketReaction reaction) + { + RoleReactionHandler.HandleReactionRemoved(cacheableMessage, socketMessageChannel, reaction); + } + public async Task AnnounceJoinedUser(SocketGuildUser user) { try diff --git a/ChaosBot/Discord/Services/RoleReactionHandler.cs b/ChaosBot/Discord/Services/RoleReactionHandler.cs new file mode 100644 index 0000000..f6980f9 --- /dev/null +++ b/ChaosBot/Discord/Services/RoleReactionHandler.cs @@ -0,0 +1,18 @@ +using Discord; +using Discord.WebSocket; + +namespace ChaosBot.Discord.Services +{ + public static class RoleReactionHandler + { + public async static void HandleReactionAdded(Cacheable cacheableMessage, ISocketMessageChannel socketMessageChannel, SocketReaction reaction) + { + // This would grant roles based on database lookup + } + + public async static void HandleReactionRemoved(Cacheable cacheableMessage, ISocketMessageChannel socketMessageChannel, SocketReaction reaction) + { + // This would take roles based on database lookup + } + } +} \ No newline at end of file