Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function performTreeOps(channelID, userID, args) {
  2.     switch (args[0]) {
  3.         case "plant":
  4.             plantTree(channelID, userID);
  5.             break;
  6.         case "water":
  7.             waterTree(channelID, userID);
  8.             break;
  9.         case "harvest":
  10.             if(args.length >== 2){
  11.                 harvestAmount(channelID, userID, parseInt(args[1]));
  12.             }
  13.             else{
  14.                 harvestTree(channelID, userID);
  15.             }
  16.             break;
  17.         case "status":
  18.             sendTreeStatus(channelID, userID);
  19.             break;
  20.         case "count":
  21.             sendPearCount(channelID, userID);
  22.             break;
  23.         case "leader":
  24.             sendPearLeaderboard(channelID);
  25.             break;
  26.         default:
  27.             sendMessageToChannel(channelID, TREE_HELPER_MESSAGE);
  28.             break;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement