示例#1
0
        public async Task <RuntimeResult> RandomKeys(int rotorCount = 3)
        {
            if (rotorCount < 1)
            {
                return(EmoteResults.FromInvalidArgument());
            }
            await enigma.RandomKeysAsync(Context, rotorCount).ConfigureAwait(false);

            return(NormalResult.FromSuccess());
        }
示例#2
0
        public async Task <RuntimeResult> EncipherKeys([Remainder] string text)
        {
            try {
                await enigma.EncipherAsync(Context, text, true).ConfigureAwait(false);

                return(NormalResult.FromSuccess());
            } catch (Exception ex) {
                await ReplyAsync($"**Error:** {ex.Message}").ConfigureAwait(false);

                return(EmoteResults.FromInvalidArgument());
            }
        }
示例#3
0
        public async Task <RuntimeResult> Decipher([Remainder] string text = null)
        {
            try {
                if (text == null && !Context.Message.Attachments.Any())
                {
                    return(EmoteResults.FromInvalidArgument());
                }
                await enigma.DecipherAsync(Context, text, false).ConfigureAwait(false);

                return(NormalResult.FromSuccess());
            } catch (Exception ex) {
                await ReplyAsync($"**Error:** {ex.Message}").ConfigureAwait(false);

                return(EmoteResults.FromInvalidArgument());
            }
        }
 public Task <RuntimeResult> React()
 {
     return(Task.FromResult(EmoteResults.FromSuccess()));
 }