예제 #1
0
파일: Owner.cs 프로젝트: mrousavy/Cirilla
        public async Task GetCommandLog()
        {
            try
            {
                var user = Context.User;
                if (!Helper.IsOwner(user))
                {
                    await ReplyAsync("Sorry, but you're not allowed to use that super premium command!");

                    return;
                }

                var dm = await user.GetOrCreateDMChannelAsync();

                await CommandLogger.Upload(dm, Context.Channel);

                ConsoleHelper.Log($"{Context.User} requested the bot log!", LogSeverity.Info);
            } catch (Exception ex)
            {
                await ReplyAsync("Whoops, unfortunately I couldn't send you the log.. :confused:");

                ConsoleHelper.Log($"Error sending log, {ex.Message}!", LogSeverity.Error);
            }
        }