0

Arguments Example for Sporks

Free lines JavaScript 2 revisions 17 6 days ago 5 days ago
var arr = message.content.split(" ");
var user = find_user(author.id);
if(arr[0] == "I'm") {
   create_message(CHANNEL_ID, "Hi " + arr[1] + ", I'm Sporks.");
}
if (arr[0] == "Hi") {
	create_message(CHANNEL_ID, "Hi <@" + user.id + ">, I'm Sporks.");
}

An example of how to use arguments on the Sporks Discord bot: https://sporks.gg