Advertisement
halfordC

Discord.net help

Jan 29th, 2023 (edited)
937
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1.         private async Task ReactionMadeAsync(Cacheable<IUserMessage, ulong> messageIn, Cacheable<IMessageChannel, ulong> channelIn , SocketReaction reaction)
  2.         {
  3.             //first, we want to see what the emoji is. If it is not a punisher, we are not concerned.
  4.             string reactionName = reaction.Emote.Name.ToString();
  5.             if (reactionName != "Punisher")
  6.             {
  7.                 Console.WriteLine("not punisher emoji, break out");
  8.                 return;
  9.             }
  10.             int punisherCounter = 0;
  11.            
  12.  
  13.             ulong messageId = reaction.MessageId;
  14.             IUserMessage messageContent = (IUserMessage)messageIn.GetOrDownloadAsync();
  15.             string messageAuthor = messageContent.Author.ToString(); //This doesn't seem to work
  16.  
  17.  
  18.             Console.WriteLine("An emoji has been made on a message by " + messageAuthor + " with " + reactionName);
  19.            
  20.  
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement