getArgsStr() public method

public getArgsStr ( ) : String
return String
示例#1
0
文件: Tell.cs 项目: Top-Cat/SteamBot
		public override String run(CommandInfo cmdInfo, Bot bot) {
			foreach (SteamID steam in bot.SteamFriends.getFriends()) {
				Console.WriteLine(bot.SteamFriends.GetFriendPersonaName(steam));
				if (bot.SteamFriends.GetFriendPersonaName(steam).Equals(cmdInfo.getArg(0), StringComparison.OrdinalIgnoreCase)) {
					bot.SteamFriends.SendChatMessage(steam, EChatEntryType.ChatMsg, Util.removeArg0(cmdInfo.getArgsStr()));
					return "Message sent!";
				}
			}
			return "Could not find user :/";
		}
示例#2
0
文件: Quote.cs 项目: Top-Cat/SteamBot
		public override String run(CommandInfo cmdInfo, Bot bot) {
			try {
				if (cmdInfo.getArg(0).Equals("add", StringComparison.OrdinalIgnoreCase)) {
					String quote = Util.removeArg0(cmdInfo.getArgsStr());
					bot.sql.update("INSERT INTO sayings (message) VALUES ('" + quote + "')");
					return "Quote added :D";
				} else {
					List<object[]> myReader = bot.sql.query("SELECT message FROM sayings ORDER BY RAND() LIMIT 1");
					if (myReader.Count > 0) {
						return (string) myReader[0][0];
					} else {
						return "Woops, I canne finda de quotes";
					}
				}
			} catch (Exception e) {
				Console.WriteLine(e.Message);
			}
			return "I'm in SPAAAAAAAAAAAAACE! ...and there are no quotes in space :<";
		}
示例#3
0
文件: Say.cs 项目: Top-Cat/SteamBot
		public override String run(CommandInfo cmdInfo, Bot bot) {
			return cmdInfo.getArgsStr();
		}