コード例 #1
0
        public async Task AddCommandAsync([Summary("Name of the command you're creating")] string cmdName, [Summary("What you want the command to say")][Remainder] string cmdContent)
        {
            string result = await CommandUtilities.AddCommandAsync(cmdName, cmdContent, _commandService);

            if (result == "success")
            {
                await ReplyAsync($"Created command !{cmdName}");
            }
            else
            {
                await ReplyAsync(result);
            }
        }