コード例 #1
0
        public async Task <string> Input(string question)
        {
            var q = await ReplyAsync(question);

            var a = (await _interactivity.AwaitMessagesAsync(base.Context.Channel, message => message.Author == base.Context.User, 1)).FirstOrDefault();
            await q.DeleteAsync();

            if (a != null)
            {
                await a.DeleteAsync();
            }
            if (a == null)
            {
                var cancel = await ReplyAsync("Abgebrochen");

                await Task.Delay(1000);

                await cancel.DeleteAsync();

                return(null);
            }
            return(a.Content);
        }