Beispiel #1
0
        public async Task Calc(params string[] args)
        {
            Utilities.CheckAvailability(Context.Guild, Program.Module.Communication);
            await p.DoAction(Context.User, Program.Module.Communication);

            DataTable table = new DataTable();

            try
            {
                await ReplyAsync(table.Compute(string.Join("", args), "").ToString());
            }
            catch (EvaluateException)
            {
                await ReplyAsync(Sentences.InvalidCalc(Context.Guild));
            }
            catch (SyntaxErrorException)
            {
                await ReplyAsync(Sentences.InvalidCalc(Context.Guild));
            }
        }