Beispiel #1
0
        public override async Task DoWork(AbbybotCommandArgs aca)
        {
            AbbyTable table = await AbbySql.AbbysqlClient.FetchSQL("select * from jokes");

            if (table.Count == 0)
            {
                return;
            }

            int i = aca.AbbyRngRoll(0, table.Count);

            await aca.Send(table[i]["Joke"] is string joke?joke : "");

            await Task.Delay(1000);

            await aca.Send(table[i]["punchline"] is string pl?pl : "");
        }