Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SlackBot v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if(input === "ping"){ //if the message sent is "ping"
}

//main function (getting the data)
else if(input.indexOf("robostats") !== -1){
else if(input.indexOf("robostats") !== -1){ //if any message has robostats anywhere in it
let index = input.indexOf("robostats"); //where the person typed robostats in their message
let pika = input.substring(index, 9999) //the rest of the message after that
let args = pika.split(" ").slice(1); //splits the messages by spaces instead of characters and takes the first thing after "robostats"
Expand Down