예제 #1
0
        public async Task DoMegaTipAsync(decimal Amount, [Remainder] string Remainder = null)
        {
            try { await Context.Message.DeleteAsync(); }
            catch { }
            if (Operators.ContainsKey(Context.Message.Author.Id))
            {
                if (RainBorg.IsTipBotOnline())
                {
                    await RainBorg.MegaTipAsync(Amount);

                    try
                    {
                        RainBorg.Log(2, "Command", "Megatip for {0} {1} called by {2}", RainBorg.Format(Amount), RainBorg.currencyName, Context.User.Username);

                        // Add reaction to message
                        IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact);
                        await Context.Message.AddReactionAsync(emote);
                    }
                    catch
                    {
                        await Context.Message.AddReactionAsync(new Emoji("👌"));
                    }
                }
                else
                {
                    RainBorg.Log(2, "Command", "Megatip for {0} {1} called by {2}, but it failed because tip bot is not online",
                                 RainBorg.Format(Amount), RainBorg.currencyName, Context.User.Username);
                }
            }
        }
예제 #2
0
        public async Task DoTipAsync([Remainder] string Remainder = null)
        {
            try { await Context.Message.DeleteAsync(); }
            catch { }
            if (Operators.ContainsKey(Context.Message.Author.Id))
            {
                if (RainBorg.IsTipBotOnline())
                {
                    RainBorg.waitTime = 0;
                    try
                    {
                        RainBorg.Log(2, "Command", "Manual tip called by {0}", Context.User.Username);

                        // Add reaction to message
                        IEmote emote = Context.Guild.Emotes.First(e => e.Name == RainBorg.successReact);
                        await Context.Message.AddReactionAsync(emote);
                    }
                    catch
                    {
                        await Context.Message.AddReactionAsync(new Emoji("👌"));
                    }
                }
                else
                {
                    RainBorg.Log(2, "Command", "Manual tip called by {0}, but it failed because tip bot is not online", Context.User.Username);
                }
            }
        }