Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Command("rps")]
- public async Task RockPaperScissor(string rps = null)
- {
- if (rps is null)
- {
- await ReplyAsync("You do not have choosen one of the options Rock, Paper or scissor.");
- return;
- }
- if (rps.Contains("rock"))
- {
- string message = "You chose Rock, I chose Scissor.\n So you won :c|You chose Rock, I chose Paper.\n So I won :3|You chose Rock, I chose Rock too!\n So its a draw :o";
- string[] options = message.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- Random r = new Random();
- string selection = options[r.Next(0, options.Length)];
- await ReplyAsync(selection);
- return;
- }
- if (rps.Contains("paper"))
- {
- string message = "You chose Paper, I chose Scissor.\n So I won :3|You chose Paper, I chose Paper too!\n So its a draw :o|You chose Paper, I chose Rock.\n So you won :c";
- string[] options = message.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- Random r = new Random();
- string selection = options[r.Next(0, options.Length)];
- await ReplyAsync(selection);
- return;
- }
- if (rps.Contains("scissor"))
- {
- string message = "You chose Scissor, I chose Scissor too!\n So its a draw :o|You chose Scissor, I chose Paper.\n So you won :c|You chose Scissor, I chose Rock.\n So I won :3";
- string[] options = message.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
- Random r = new Random();
- string selection = options[r.Next(0, options.Length)];
- await ReplyAsync(selection);
- return;
- }
- await ReplyAsync($"{rps} isn't one of the options! choose Rock, Paper or scissor! :3");
- }
Add Comment
Please, Sign In to add comment