public async Task <RuntimeResult> RandomKeys(int rotorCount = 3) { if (rotorCount < 1) { return(EmoteResults.FromInvalidArgument()); } await enigma.RandomKeysAsync(Context, rotorCount).ConfigureAwait(false); return(NormalResult.FromSuccess()); }
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()); } }
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()); } }