Quotes and rocket paperclip scissors added

This commit is contained in:
Master Kwoth
2016-03-15 20:21:27 +01:00
parent ce01440ee3
commit 9781606316
6 changed files with 958 additions and 14 deletions

View File

@ -89,6 +89,43 @@ namespace NadekoBot.Modules {
var t = GetType(usr.Id);
await e.Channel.SendMessage($"{usr.Name}'s type is {GetImage(t)} {t}");
});
cgb.CreateCommand(Prefix + "rps")
.Description("Play a game of rocket paperclip scissors with nadkeo.\n**Usage**: >rps scissors")
.Parameter("input", ParameterType.Required)
.Do(async e => {
var input = e.GetArg("input").Trim();
int pick;
switch (input) {
case "r":
case "rock":
case "rocket":
pick = 0;
break;
case "p":
case "paper":
case "paperclip":
pick = 1;
break;
case "scissors":
case "s":
pick = 2;
break;
default:
return;
}
var nadekoPick = new Random().Next(0, 3);
var msg = "";
if (pick == nadekoPick)
msg = $"It's a draw! Both picked :{GetRPSPick(pick)}:";
else if ((pick == 0 && nadekoPick == 1) ||
(pick == 1 && nadekoPick == 2) ||
(pick == 2 && nadekoPick == 0))
msg = $"{NadekoBot.BotMention} won! :{GetRPSPick(nadekoPick)}: beats :{GetRPSPick(pick)}:";
else
msg = $"{e.User.Mention} won! :{GetRPSPick(pick)}: beats :{GetRPSPick(nadekoPick)}:";
await e.Channel.SendMessage(msg);
});
cgb.CreateCommand(Prefix + "linux")
.Description("Prints a customizable Linux interjection")
@ -194,5 +231,14 @@ There really is a {loonix}, and these people are using it, but it is just a part
private enum PokeType {
WATER, GRASS, FIRE, ELECTRICAL
}
private string GetRPSPick(int i) {
if (i == 0)
return "rocket";
else if (i == 1)
return "paperclip";
else
return "scissors";
}
}
}

View File

@ -219,22 +219,16 @@ namespace NadekoBot.Modules {
await e.Channel.SendMessage("💢 Failed finidng a definition for that tag.");
}
});
//todo when moved from parse
/*
cgb.CreateCommand(Prefix + "osubind")
.Description("Bind discord user to osu name\n**Usage**: ~osubind My osu name")
.Parameter("osu_name", ParameterType.Unparsed)
cgb.CreateCommand(Prefix + "quote")
.Description("Shows a random quote.")
.Do(async e => {
var userName = e.GetArg("user_name");
var osuName = e.GetArg("osu_name");
var usr = e.Server.FindUsers(userName).FirstOrDefault();
if (usr == null) {
await e.Channel.SendMessage("Cannot find that discord user.");
return;
}
await
e.Channel.SendMessage(
NadekoBot.Config.Quotes[new Random().Next(0, NadekoBot.Config.Quotes.Count)].ToString());
});
*/
});
}
}
}