Exemplo n.º 1
0
 private static void Client_OnReactionAdded(DiscordSocketClient client, ReactionEventArgs args)
 {
     if (args.Reaction.UserId.Equals(611040420872585226) ||
         args.Reaction.UserId.Equals(582537632991543307) ||
         args.Reaction.UserId.Equals(294882584201003009) ||
         args.Reaction.UserId.Equals(570338970261782559))
     {
         if (client.GetMessageReactions(args.Reaction.ChannelId, args.Reaction.MessageId,
                                        args.Reaction.Emoji.GetMessegable()).Count == 1)
         {
             giveawaysTotal++;
             if (new Random().Next(1, 100) <= config.GiveAwayReactChance)
             {
                 client.AddMessageReaction(args.Reaction.ChannelId, args.Reaction.MessageId,
                                           args.Reaction.Emoji.GetMessegable());
                 giveawaysParticipated++;
                 Console.WriteLine(
                     $"[Drops/GIVEAWAYS] Participated in https://discordapp.com/channels/{args.Reaction.GuildId}/{args.Reaction.ChannelId}/{args.Reaction.MessageId}");
                 Console.Title =
                     $"AutoNitro - By iLinked | Account: {username} | Hits: {successes}/{attempts}/{messages} | Balance: ${balance} | Drops/Giveaways Participated: {giveawaysParticipated}/{giveawaysTotal}";
             }
             else
             {
                 Console.WriteLine(
                     $"[Drops/GIVEAWAYS] Did not participate in https://discordapp.com/channels/{args.Reaction.GuildId}/{args.Reaction.ChannelId}/{args.Reaction.MessageId} due to reaction chance. (Roll was ");
                 Console.Title =
                     $"AutoNitro - By iLinked | Account: {username} | Hits: {successes}/{attempts}/{messages} | Balance: ${balance} | Drops/Giveaways Participated: {giveawaysParticipated}/{giveawaysTotal}";
             }
         }
     }
 }