-
-
Save HurricanKai/6e13478cc25baa4c259bc5d2315e67ad to your computer and use it in GitHub Desktop.
For Sharing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var channel = ctx.Guild.GetChannel((ulong)v.channelid); | |
//Get Resulsts, and Post in First Message. | |
foreach (var v2 in v.Ids) | |
{ | |
var message = await channel.GetMessageAsync((ulong)v2.PurpleId); | |
foreach (var v3 in avatars) | |
{ | |
var reactors = await message.GetReactionsAsync(v3.Value); | |
if (votes.TryGetValue(v3.Key, out int Value)) | |
{ | |
votes.Remove(v3.Key); | |
votes.Add(v3.Key, Value + reactors.Count); | |
} | |
else | |
votes.Add(v3.Key, reactors.Count); | |
if (voters.TryGetValue(v3.Key, out List<DiscordUser> value)) | |
{ | |
voters.Remove(v3.Key); | |
value.AddRange(reactors); | |
voters.Add(v3.Key, value); | |
} | |
else | |
voters.Add(v3.Key, reactors.ToList()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment