index.js 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456
  1. //
  2. // Welcome to Ricky The Raccoon Bot source code!
  3. // For more information about recent updates and commands, see "README.md"
  4. //
  5. console.log("I'm ready!");
  6. const Discord = require("discord.js");
  7. const ytdl = require('ytdl-core');
  8. const bot = new Discord.Client();
  9. bot.login("");
  10. const queue = new Map();
  11. // Ping Check
  12. const http = require("http");
  13. const express = require("express");
  14. const app = express();
  15. app.get("/", (request, response) => {
  16. console.log(Date.now() + " Ping Received");
  17. response.sendStatus(200);
  18. });
  19. app.listen(process.env.PORT);
  20. setInterval(() => {
  21. http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
  22. }, 280000);
  23. // Bot Activity Status
  24. bot.on("ready", () => {
  25. bot.user.setStatus("available");
  26. bot.user.setPresence({
  27. game: {
  28. name: ">:3 | $help",
  29. type: "STREAMING",
  30. url: "https://www.twitch.tv/monstercat"
  31. }
  32. });
  33. });
  34. // Set the prefix
  35. const prefix = "$";
  36. bot.on("message", message => {
  37. // Exit and stop if it's not there
  38. if (!message.content.startsWith(prefix)) return;
  39. // Check if content of message is "$ping"
  40. if (message.content.toLowerCase().startsWith(prefix + "ping")) {
  41. // Call .send() on the channel object the message was sent in
  42. message.channel.send("h");
  43. }
  44. });
  45. // Last updated
  46. bot.on("message", message => {
  47. if (message.author == bot.user) {
  48. return;
  49. }
  50. if (message.content.toLowerCase().startsWith(prefix + "update")) {
  51. message.channel.send("> **Ricky The Raccoon bot was last updated on** `2019-02-09`");
  52. }
  53. });
  54. // Give roles when joins server
  55. bot.on('serverNewMember', function(server, user) {
  56. user.addTo(server.roles.get("⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯", "⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯"));
  57. });
  58. // Messages
  59. bot.on("message", message => {
  60. // Prevent bot from responding to its own messages
  61. if (message.author == bot.user) {
  62. return;
  63. }
  64. if (message.content.toLowerCase().startsWith(prefix + "help")) {
  65. message.channel.send("> You Called for help, but nobody came");
  66. }
  67. // Repeat what the user says
  68. if (message.content.toLowerCase().startsWith(prefix + "say")) {
  69. message.channel.send(message.author.username + " says: " + message.content.replace("+say ", "")
  70. );
  71. }
  72. // Send a message through the bot
  73. if (message.content.toLowerCase().startsWith(prefix + "send")) {
  74. message.delete(1);
  75. message.channel.send(message.content.replace("$send ", ""));
  76. }
  77. // Colors roles Commands
  78. // Show all available colors
  79. if (
  80. message.content.toLowerCase().startsWith(prefix + "colors") ||
  81. message.content.toLowerCase().startsWith(prefix + "colorslist")
  82. ) {
  83. const exampleEmbed = new Discord.RichEmbed()
  84. .attachFiles(["embed/colors.png"])
  85. .setImage("attachment://colors.png");
  86. message.channel.send(exampleEmbed);
  87. }
  88. // Rainbow (Since 2019-08-24, Rainbow bot doesn't works anymore, this command will be remain until further function)
  89. if (message.content.toLowerCase().startsWith(prefix + "iam " + "rainbow")) {
  90. message.channel
  91. .send("``It doesn't works anymore, you frick!!``")
  92. .then(sentMessage => {
  93. sentMessage.delete(3000);
  94. message.delete(1);
  95. })
  96. .catch();
  97. }
  98. if (
  99. message.content.toLowerCase().startsWith(prefix + "iamnot " + "rainbow")
  100. ) {
  101. message.channel
  102. .send("``It doesn't works anymore, you frick!!``")
  103. .then(sentMessage => {
  104. sentMessage.delete(3000);
  105. message.delete(1);
  106. })
  107. .catch();
  108. }
  109. // Light Red
  110. if (
  111. message.content.toLowerCase().startsWith(prefix + "iam " + "light red") ||
  112. message.content.toLowerCase().startsWith(prefix + "iam " + "1")
  113. ) {
  114. message.member.addRole("608191366090063892");
  115. message.channel
  116. .send(message.author.username +" enjoy your <@&608191366090063892> color role!")
  117. .then(sentMessage => {
  118. sentMessage.delete(3000);
  119. message.delete(1);
  120. })
  121. .catch();
  122. }
  123. if (
  124. message.content.toLowerCase().startsWith(prefix + "iamnot " + "light red") ||
  125. message.content.toLowerCase().startsWith(prefix + "iamnot " + "1")
  126. ) {
  127. message.member.removeRole("608191366090063892");
  128. message.channel
  129. .send("<@&608191366090063892> color role successfully removed!")
  130. .then(sentMessage => {
  131. sentMessage.delete(3000);
  132. message.delete(1);
  133. })
  134. .catch();
  135. }
  136. // Red
  137. if (
  138. message.content.toLowerCase().startsWith(prefix + "iam " + "red") ||
  139. message.content.toLowerCase().startsWith(prefix + "iam " + "2")
  140. ) {
  141. message.member.addRole("519029920530169857");
  142. message.channel
  143. .send(message.author.username + " enjoy your <@&519029920530169857> color role!")
  144. .then(sentMessage => {
  145. sentMessage.delete(3000);
  146. message.delete(1);
  147. })
  148. .catch();
  149. }
  150. if (
  151. message.content.toLowerCase().startsWith(prefix + "iamnot " + "red") ||
  152. message.content.toLowerCase().startsWith(prefix + "iamnot " + "2")
  153. ) {
  154. message.member.removeRole("519029920530169857");
  155. message.channel
  156. .send("<@&519029920530169857> color role successfully removed!")
  157. .then(sentMessage => {
  158. sentMessage.delete(3000);
  159. message.delete(1);
  160. })
  161. .catch();
  162. }
  163. // Satan Red
  164. if (
  165. message.content.toLowerCase().startsWith(prefix + "iam " + "satan red") ||
  166. message.content.toLowerCase().startsWith(prefix + "iam " + "3")
  167. ) {
  168. message.member.addRole("608084225115160616");
  169. message.channel
  170. .send(message.author.username + " enjoy your <@&608084225115160616> color role!")
  171. .then(sentMessage => {
  172. sentMessage.delete(3000);
  173. message.delete(1);
  174. })
  175. .catch();
  176. }
  177. if (
  178. message.content.toLowerCase().startsWith(prefix + "iamnot " + "satan red") ||
  179. message.content.toLowerCase().startsWith(prefix + "iamnot " + "3")
  180. ) {
  181. message.member.removeRole("608084225115160616");
  182. message.channel
  183. .send("<@&608084225115160616> color role successfully removed!")
  184. .then(sentMessage => {
  185. sentMessage.delete(3000);
  186. message.delete(1);
  187. })
  188. .catch();
  189. }
  190. // Deep Orange
  191. if (
  192. message.content.toLowerCase().startsWith(prefix + "iam " + "deep orange") ||
  193. message.content.toLowerCase().startsWith(prefix + "iam " + "4")
  194. ) {
  195. message.member.addRole("519052968155283456");
  196. message.channel
  197. .send(message.author.username + " enjoy your <@&519052968155283456> color role!")
  198. .then(sentMessage => {
  199. sentMessage.delete(3000);
  200. message.delete(1);
  201. })
  202. .catch();
  203. }
  204. if (
  205. message.content.toLowerCase().startsWith(prefix + "iamnot " + "deep orange") ||
  206. message.content.toLowerCase().startsWith(prefix + "iamnot " + "4")
  207. ) {
  208. message.member.removeRole("519052968155283456");
  209. message.channel
  210. .send("<@&519052968155283456> color role successfully removed!")
  211. .then(sentMessage => {
  212. sentMessage.delete(3000);
  213. message.delete(1);
  214. })
  215. .catch();
  216. }
  217. // Orange
  218. if (
  219. message.content.toLowerCase().startsWith(prefix + "iam " + "orange") ||
  220. message.content.toLowerCase().startsWith(prefix + "iam " + "5")
  221. ) {
  222. message.member.addRole("519031205656788993");
  223. message.channel
  224. .send(
  225. message.author.username + " enjoy your <@&519031205656788993> color role!")
  226. .then(sentMessage => {
  227. sentMessage.delete(3000);
  228. message.delete(1);
  229. })
  230. .catch();
  231. }
  232. if (
  233. message.content.toLowerCase().startsWith(prefix + "iamnot " + "orange") ||
  234. message.content.toLowerCase().startsWith(prefix + "iamnot " + "5")
  235. ) {
  236. message.member.removeRole("519031205656788993");
  237. message.channel
  238. .send("<@&519031205656788993> color role successfully removed!")
  239. .then(sentMessage => {
  240. sentMessage.delete(3000);
  241. message.delete(1);
  242. })
  243. .catch();
  244. }
  245. // Brown
  246. if (
  247. message.content.toLowerCase().startsWith(prefix + "iam " + "brown") ||
  248. message.content.toLowerCase().startsWith(prefix + "iam " + "6")
  249. ) {
  250. message.member.addRole("519036336351477761");
  251. message.channel
  252. .send(message.author.username + " enjoy your <@&519036336351477761> color role!")
  253. .then(sentMessage => {
  254. sentMessage.delete(3000);
  255. message.delete(1);
  256. })
  257. .catch();
  258. }
  259. if (
  260. message.content.toLowerCase().startsWith(prefix + "iamnot " + "brown") ||
  261. message.content.toLowerCase().startsWith(prefix + "iamnot " + "6")
  262. ) {
  263. message.member.removeRole("519036336351477761");
  264. message.channel
  265. .send("<@&519036336351477761> color role successfully removed!")
  266. .then(sentMessage => {
  267. sentMessage.delete(3000);
  268. message.delete(1);
  269. })
  270. .catch();
  271. }
  272. // Piss Yellow
  273. if (
  274. message.content.toLowerCase().startsWith(prefix + "iam " + "piss yellow") ||
  275. message.content.toLowerCase().startsWith(prefix + "iam " + "7")
  276. ) {
  277. message.member.addRole("608084227485073418");
  278. message.channel
  279. .send(message.author.username + " enjoy your <@&608084227485073418> color role!")
  280. .then(sentMessage => {
  281. sentMessage.delete(3000);
  282. message.delete(1);
  283. })
  284. .catch();
  285. }
  286. if (
  287. message.content.toLowerCase().startsWith(prefix + "iamnot " + "piss yellow") ||
  288. message.content.toLowerCase().startsWith(prefix + "iamnot " + "7")
  289. ) {
  290. message.member.removeRole("608084227485073418");
  291. message.channel
  292. .send("<@&608084227485073418> color role successfully removed!")
  293. .then(sentMessage => {
  294. sentMessage.delete(3000);
  295. message.delete(1);
  296. })
  297. .catch();
  298. }
  299. // Yellow
  300. if (
  301. message.content.toLowerCase().startsWith(prefix + "iam " + "yellow") ||
  302. message.content.toLowerCase().startsWith(prefix + "iam " + "8")
  303. ) {
  304. message.member.addRole("519031288422727745");
  305. message.channel
  306. .send(message.author.username + " enjoy your <@&519031288422727745> color role!")
  307. .then(sentMessage => {
  308. sentMessage.delete(3000);
  309. message.delete(1);
  310. })
  311. .catch();
  312. }
  313. if (
  314. message.content.toLowerCase().startsWith(prefix + "iamnot " + "yellow") ||
  315. message.content.toLowerCase().startsWith(prefix + "iamnot " + "8")
  316. ) {
  317. message.member.removeRole("519031288422727745");
  318. message.channel
  319. .send("<@&519031288422727745> color role successfully removed!")
  320. .then(sentMessage => {
  321. sentMessage.delete(3000);
  322. message.delete(1);
  323. })
  324. .catch();
  325. }
  326. // Light Yellow
  327. if (
  328. message.content.toLowerCase().startsWith(prefix + "iam " + "light yellow") ||
  329. message.content.toLowerCase().startsWith(prefix + "iam " + "9")
  330. ) {
  331. message.member.addRole("608084233327476737");
  332. message.channel
  333. .send(message.author.username + " enjoy your <@&608084233327476737> color role!")
  334. .then(sentMessage => {
  335. sentMessage.delete(3000);
  336. message.delete(1);
  337. })
  338. .catch();
  339. }
  340. if (
  341. message.content.toLowerCase().startsWith(prefix + "iamnot " + "light yellow") ||
  342. message.content.toLowerCase().startsWith(prefix + "iamnot " + "9")
  343. ) {
  344. message.member.removeRole("608084233327476737");
  345. message.channel
  346. .send("<@&608084233327476737> color role successfully removed!")
  347. .then(sentMessage => {
  348. sentMessage.delete(3000);
  349. message.delete(1);
  350. })
  351. .catch();
  352. }
  353. // Lime
  354. if (
  355. message.content.toLowerCase().startsWith(prefix + "iam " + "lime") ||
  356. message.content.toLowerCase().startsWith(prefix + "iam " + "10")
  357. ) {
  358. message.member.addRole("519031608997707797");
  359. message.channel
  360. .send(message.author.username + " enjoy your <@&519031608997707797> color role!")
  361. .then(sentMessage => {
  362. sentMessage.delete(3000);
  363. message.delete(1);
  364. })
  365. .catch();
  366. }
  367. if (
  368. message.content.toLowerCase().startsWith(prefix + "iamnot " + "lime") ||
  369. message.content.toLowerCase().startsWith(prefix + "iamnot " + "10")
  370. ) {
  371. message.member.removeRole("519031608997707797");
  372. message.channel
  373. .send("<@&519031608997707797> color role successfully removed!")
  374. .then(sentMessage => {
  375. sentMessage.delete(3000);
  376. message.delete(1);
  377. })
  378. .catch();
  379. }
  380. // Mint Green
  381. if (
  382. message.content.toLowerCase().startsWith(prefix + "iam " + "mint green") ||
  383. message.content.toLowerCase().startsWith(prefix + "iam " + "11")
  384. ) {
  385. message.member.addRole("608084229930090526");
  386. message.channel
  387. .send(message.author.username + " enjoy your <@&608084229930090526> color role!")
  388. .then(sentMessage => {
  389. sentMessage.delete(3000);
  390. message.delete(1);
  391. })
  392. .catch();
  393. }
  394. if (
  395. message.content.toLowerCase().startsWith(prefix + "iamnot " + "mint green") ||
  396. message.content.toLowerCase().startsWith(prefix + "iamnot " + "11")
  397. ) {
  398. message.member.removeRole("608084229930090526");
  399. message.channel
  400. .send("<@&608084229930090526> color role successfully removed!")
  401. .then(sentMessage => {
  402. sentMessage.delete(3000);
  403. message.delete(1);
  404. })
  405. .catch();
  406. }
  407. // Light Green
  408. if (
  409. message.content.toLowerCase().startsWith(prefix + "iam " + "light green") ||
  410. message.content.toLowerCase().startsWith(prefix + "iam " + "12")
  411. ) {
  412. message.member.addRole("519052647278444545");
  413. message.channel
  414. .send(message.author.username + " enjoy your <@&519052647278444545> color role!")
  415. .then(sentMessage => {
  416. sentMessage.delete(3000);
  417. message.delete(1);
  418. })
  419. .catch();
  420. }
  421. if (
  422. message.content.toLowerCase().startsWith(prefix + "iamnot " + "light green") ||
  423. message.content.toLowerCase().startsWith(prefix + "iamnot " + "12")
  424. ) {
  425. message.member.removeRole("519052647278444545");
  426. message.channel
  427. .send("<@&519052647278444545> color role successfully removed!")
  428. .then(sentMessage => {
  429. sentMessage.delete(3000);
  430. message.delete(1);
  431. })
  432. .catch();
  433. }
  434. // Green
  435. if (
  436. message.content.toLowerCase().startsWith(prefix + "iam " + "green") ||
  437. message.content.toLowerCase().startsWith(prefix + "iam " + "13")
  438. ) {
  439. message.member.addRole("519031954188795936");
  440. message.channel
  441. .send(message.author.username + " enjoy your <@&519031954188795936> color role!")
  442. .then(sentMessage => {
  443. sentMessage.delete(3000);
  444. message.delete(1);
  445. })
  446. .catch();
  447. }
  448. if (
  449. message.content.toLowerCase().startsWith(prefix + "iamnot " + "green") ||
  450. message.content.toLowerCase().startsWith(prefix + "iamnot " + "13")
  451. ) {
  452. message.member.removeRole("519031954188795936");
  453. message.channel
  454. .send("<@&519031954188795936> color role successfully removed!")
  455. .then(sentMessage => {
  456. sentMessage.delete(3000);
  457. message.delete(1);
  458. })
  459. .catch();
  460. }
  461. // Tree Green
  462. if (
  463. message.content.toLowerCase().startsWith(prefix + "iam " + "tree green") ||
  464. message.content.toLowerCase().startsWith(prefix + "iam " + "14")
  465. ) {
  466. message.member.addRole("608084229825364014");
  467. message.channel
  468. .send(message.author.username + " enjoy your <@&608084229825364014> color role!")
  469. .then(sentMessage => {
  470. sentMessage.delete(3000);
  471. message.delete(1);
  472. })
  473. .catch();
  474. }
  475. if (
  476. message.content.toLowerCase().startsWith(prefix + "iamnot " + "tree green") ||
  477. message.content.toLowerCase().startsWith(prefix + "iamnot " + "14")
  478. ) {
  479. message.member.removeRole("608084229825364014");
  480. message.channel
  481. .send("<@&608084229825364014> color role successfully removed!")
  482. .then(sentMessage => {
  483. sentMessage.delete(3000);
  484. message.delete(1);
  485. })
  486. .catch();
  487. }
  488. // Aquamarine
  489. if (
  490. message.content.toLowerCase().startsWith(prefix + "iam " + "aquamarine") ||
  491. message.content.toLowerCase().startsWith(prefix + "iam " + "15")
  492. ) {
  493. message.member.addRole("519032187815985152");
  494. message.channel
  495. .send(message.author.username + " enjoy your <@&519032187815985152> color role!")
  496. .then(sentMessage => {
  497. sentMessage.delete(3000);
  498. message.delete(1);
  499. })
  500. .catch();
  501. }
  502. if (
  503. message.content.toLowerCase().startsWith(prefix + "iamnot " + "aquamarine") ||
  504. message.content.toLowerCase().startsWith(prefix + "iamnot " + "15")
  505. ) {
  506. message.member.removeRole("519032187815985152");
  507. message.channel
  508. .send("<@&519032187815985152> color role successfully removed!")
  509. .then(sentMessage => {
  510. sentMessage.delete(3000);
  511. message.delete(1);
  512. })
  513. .catch();
  514. }
  515. // Teal
  516. if (
  517. message.content.toLowerCase().startsWith(prefix + "iam " + "teal") ||
  518. message.content.toLowerCase().startsWith(prefix + "iam " + "16")
  519. ) {
  520. message.member.addRole("519052208080420865");
  521. message.channel
  522. .send(message.author.username + " enjoy your <@&519052208080420865> color role!")
  523. .then(sentMessage => {
  524. sentMessage.delete(3000);
  525. message.delete(1);
  526. })
  527. .catch();
  528. }
  529. if (
  530. message.content.toLowerCase().startsWith(prefix + "iamnot " + "teal") ||
  531. message.content.toLowerCase().startsWith(prefix + "iamnot " + "16")
  532. ) {
  533. message.member.removeRole("519052208080420865");
  534. message.channel
  535. .send("<@&519052208080420865> color role successfully removed!")
  536. .then(sentMessage => {
  537. sentMessage.delete(3000);
  538. message.delete(1);
  539. })
  540. .catch();
  541. }
  542. // Cyan
  543. if (
  544. message.content.toLowerCase().startsWith(prefix + "iam " + "cyan") ||
  545. message.content.toLowerCase().startsWith(prefix + "iam " + "17")
  546. ) {
  547. message.member.addRole("519032473561071675");
  548. message.channel
  549. .send(message.author.username + " enjoy your <@&519032473561071675> color role!")
  550. .then(sentMessage => {
  551. sentMessage.delete(3000);
  552. message.delete(1);
  553. })
  554. .catch();
  555. }
  556. if (
  557. message.content.toLowerCase().startsWith(prefix + "iamnot " + "cyan") ||
  558. message.content.toLowerCase().startsWith(prefix + "iamnot " + "17")
  559. ) {
  560. message.member.removeRole("519032473561071675");
  561. message.channel
  562. .send("<@&519032473561071675> color role successfully removed!")
  563. .then(sentMessage => {
  564. sentMessage.delete(3000);
  565. message.delete(1);
  566. })
  567. .catch();
  568. }
  569. // Pastel Cyan
  570. if (
  571. message.content.toLowerCase().startsWith(prefix + "iam " + "pastel cyan") ||
  572. message.content.toLowerCase().startsWith(prefix + "iam " + "18")
  573. ) {
  574. message.member.addRole("608087343030730753");
  575. message.channel
  576. .send(message.author.username + " enjoy your <@&608087343030730753> color role!")
  577. .then(sentMessage => {
  578. sentMessage.delete(3000);
  579. message.delete(1);
  580. })
  581. .catch();
  582. }
  583. if (
  584. message.content.toLowerCase().startsWith(prefix + "iamnot " + "pastel cyan") ||
  585. message.content.toLowerCase().startsWith(prefix + "iamnot " + "18")
  586. ) {
  587. message.member.removeRole("608087343030730753");
  588. message.channel
  589. .send("<@&608087343030730753> color role successfully removed!")
  590. .then(sentMessage => {
  591. sentMessage.delete(3000);
  592. message.delete(1);
  593. })
  594. .catch();
  595. }
  596. // Light Blue
  597. if (
  598. message.content.toLowerCase().startsWith(prefix + "iam " + "light blue") ||
  599. message.content.toLowerCase().startsWith(prefix + "iam " + "19")
  600. ) {
  601. message.member.addRole("519032676100079626");
  602. message.channel
  603. .send(message.author.username + " enjoy your <@&519032676100079626> color role!")
  604. .then(sentMessage => {
  605. sentMessage.delete(3000);
  606. message.delete(1);
  607. })
  608. .catch();
  609. }
  610. if (
  611. message.content.toLowerCase().startsWith(prefix + "iamnot " + "light blue") ||
  612. message.content.toLowerCase().startsWith(prefix + "iamnot " + "19")
  613. ) {
  614. message.member.removeRole("519032676100079626");
  615. message.channel
  616. .send("<@&519032676100079626> color role successfully removed!")
  617. .then(sentMessage => {
  618. sentMessage.delete(3000);
  619. message.delete(1);
  620. })
  621. .catch();
  622. }
  623. // Discord Blue
  624. if (
  625. message.content.toLowerCase().startsWith(prefix + "iam " + "discord blue") ||
  626. message.content.toLowerCase().startsWith(prefix + "iam " + "20")
  627. ) {
  628. message.member.addRole("608087654420185104");
  629. message.channel
  630. .send(message.author.username + " enjoy your <@&608087654420185104> color role!")
  631. .then(sentMessage => {
  632. sentMessage.delete(3000);
  633. message.delete(1);
  634. })
  635. .catch();
  636. }
  637. if (
  638. message.content.toLowerCase().startsWith(prefix + "iamnot " + "discord blue") ||
  639. message.content.toLowerCase().startsWith(prefix + "iamnot " + "20")
  640. ) {
  641. message.member.removeRole("608087654420185104");
  642. message.channel
  643. .send("<@&608087654420185104> color role successfully removed!")
  644. .then(sentMessage => {
  645. sentMessage.delete(3000);
  646. message.delete(1);
  647. })
  648. .catch();
  649. }
  650. // Blue
  651. if (
  652. message.content.toLowerCase().startsWith(prefix + "iam " + "blue") ||
  653. message.content.toLowerCase().startsWith(prefix + "iam " + "21")
  654. ) {
  655. message.member.addRole("519033502390550530");
  656. message.channel
  657. .send(message.author.username + " enjoy your <@&519033502390550530> color role!")
  658. .then(sentMessage => {
  659. sentMessage.delete(3000);
  660. message.delete(1);
  661. })
  662. .catch();
  663. }
  664. if (
  665. message.content.toLowerCase().startsWith(prefix + "iamnot " + "blue") ||
  666. message.content.toLowerCase().startsWith(prefix + "iamnot " + "21")
  667. ) {
  668. message.member.removeRole("519033502390550530");
  669. message.channel
  670. .send("<@&519033502390550530> color role successfully removed!")
  671. .then(sentMessage => {
  672. sentMessage.delete(3000);
  673. message.delete(1);
  674. })
  675. .catch();
  676. }
  677. // Navy Blue
  678. if (
  679. message.content.toLowerCase().startsWith(prefix + "iam " + "navy blue") ||
  680. message.content.toLowerCase().startsWith(prefix + "iam " + "22")
  681. ) {
  682. message.member.addRole("608084227027632128");
  683. message.channel
  684. .send(message.author.username + " enjoy your <@&608084227027632128> color role!")
  685. .then(sentMessage => {
  686. sentMessage.delete(3000);
  687. message.delete(1);
  688. })
  689. .catch();
  690. }
  691. if (
  692. message.content.toLowerCase().startsWith(prefix + "iamnot " + "navy blue") ||
  693. message.content.toLowerCase().startsWith(prefix + "iamnot " + "22")
  694. ) {
  695. message.member.removeRole("608084227027632128");
  696. message.channel
  697. .send("<@&608084227027632128> color role successfully removed!")
  698. .then(sentMessage => {
  699. sentMessage.delete(3000);
  700. message.delete(1);
  701. })
  702. .catch();
  703. }
  704. // Indigo
  705. if (
  706. message.content.toLowerCase().startsWith(prefix + "iam " + "indigo") ||
  707. message.content.toLowerCase().startsWith(prefix + "iam " + "23")
  708. ) {
  709. message.member.addRole("519034578866929674");
  710. message.channel
  711. .send(message.author.username + " enjoy your <@&519034578866929674> color role!")
  712. .then(sentMessage => {
  713. sentMessage.delete(3000);
  714. message.delete(1);
  715. })
  716. .catch();
  717. }
  718. if (
  719. message.content.toLowerCase().startsWith(prefix + "iamnot " + "indigo") ||
  720. message.content.toLowerCase().startsWith(prefix + "iamnot " + "23")
  721. ) {
  722. message.member.removeRole("519034578866929674");
  723. message.channel
  724. .send("<@&519034578866929674> color role successfully removed!")
  725. .then(sentMessage => {
  726. sentMessage.delete(3000);
  727. message.delete(1);
  728. })
  729. .catch();
  730. }
  731. // Deep Purple
  732. if (
  733. message.content.toLowerCase().startsWith(prefix + "iam " + "deep purple") ||
  734. message.content.toLowerCase().startsWith(prefix + "iam " + "24")
  735. ) {
  736. message.member.addRole("519053870425702430");
  737. message.channel
  738. .send(message.author.username + " enjoy your <@&519053870425702430> color role!")
  739. .then(sentMessage => {
  740. sentMessage.delete(3000);
  741. message.delete(1);
  742. })
  743. .catch();
  744. }
  745. if (
  746. message.content.toLowerCase().startsWith(prefix + "iamnot " + "deep purple") ||
  747. message.content.toLowerCase().startsWith(prefix + "iamnot " + "24")
  748. ) {
  749. message.member.removeRole("519053870425702430");
  750. message.channel
  751. .send("<@&519053870425702430> color role successfully removed!")
  752. .then(sentMessage => {
  753. sentMessage.delete(3000);
  754. message.delete(1);
  755. })
  756. .catch();
  757. }
  758. // Purple
  759. if (
  760. message.content.toLowerCase().startsWith(prefix + "iam " + "purple") ||
  761. message.content.toLowerCase().startsWith(prefix + "iam " + "25")
  762. ) {
  763. message.member.addRole("519033808180477952");
  764. message.channel
  765. .send(message.author.username + " enjoy your <@&519033808180477952> color role!")
  766. .then(sentMessage => {
  767. sentMessage.delete(3000);
  768. message.delete(1);
  769. })
  770. .catch();
  771. }
  772. if (
  773. message.content.toLowerCase().startsWith(prefix + "iamnot " + "purple") ||
  774. message.content.toLowerCase().startsWith(prefix + "iamnot " + "25")
  775. ) {
  776. message.member.removeRole("519033808180477952");
  777. message.channel
  778. .send("<@&519033808180477952> color role successfully removed!")
  779. .then(sentMessage => {
  780. sentMessage.delete(3000);
  781. message.delete(1);
  782. })
  783. .catch();
  784. }
  785. // Mauve
  786. if (
  787. message.content.toLowerCase().startsWith(prefix + "iam " + "mauve") ||
  788. message.content.toLowerCase().startsWith(prefix + "iam " + "26")
  789. ) {
  790. message.member.addRole("608084233625272332");
  791. message.channel
  792. .send(message.author.username + " enjoy your <@&608084233625272332> color role!")
  793. .then(sentMessage => {
  794. sentMessage.delete(3000);
  795. message.delete(1);
  796. })
  797. .catch();
  798. }
  799. if (
  800. message.content.toLowerCase().startsWith(prefix + "iamnot " + "mauve") ||
  801. message.content.toLowerCase().startsWith(prefix + "iamnot " + "26")
  802. ) {
  803. message.member.removeRole("608084233625272332");
  804. message.channel
  805. .send("<@&608084233625272332> color role successfully removed!")
  806. .then(sentMessage => {
  807. sentMessage.delete(3000);
  808. message.delete(1);
  809. })
  810. .catch();
  811. }
  812. // Magenta
  813. if (
  814. message.content.toLowerCase().startsWith(prefix + "iam " + "magenta") ||
  815. message.content.toLowerCase().startsWith(prefix + "iam " + "27")
  816. ) {
  817. message.member.addRole("519033938170216458");
  818. message.channel
  819. .send(message.author.username + " enjoy your <@&519033938170216458> color role!")
  820. .then(sentMessage => {
  821. sentMessage.delete(3000);
  822. message.delete(1);
  823. })
  824. .catch();
  825. }
  826. if (
  827. message.content.toLowerCase().startsWith(prefix + "iamnot " + "magenta") ||
  828. message.content.toLowerCase().startsWith(prefix + "iamnot " + "27")
  829. ) {
  830. message.member.removeRole("519033938170216458");
  831. message.channel
  832. .send("<@&519033938170216458> color role successfully removed!")
  833. .then(sentMessage => {
  834. sentMessage.delete(3000);
  835. message.delete(1);
  836. })
  837. .catch();
  838. }
  839. // Hot Pink
  840. if (
  841. message.content.toLowerCase().startsWith(prefix + "iam " + "hot pink") ||
  842. message.content.toLowerCase().startsWith(prefix + "iam " + "28")
  843. ) {
  844. message.member.addRole("519034420552794122");
  845. message.channel
  846. .send(message.author.username + " enjoy your <@&519034420552794122> color role!")
  847. .then(sentMessage => {
  848. sentMessage.delete(3000);
  849. message.delete(1);
  850. })
  851. .catch();
  852. }
  853. if (
  854. message.content.toLowerCase().startsWith(prefix + "iamnot " + "hot pink") ||
  855. message.content.toLowerCase().startsWith(prefix + "iamnot " + "28")
  856. ) {
  857. message.member.removeRole("519034420552794122");
  858. message.channel
  859. .send("<@&519034420552794122> color role successfully removed!")
  860. .then(sentMessage => {
  861. sentMessage.delete(3000);
  862. message.delete(1);
  863. })
  864. .catch();
  865. }
  866. // Pink
  867. if (
  868. message.content.toLowerCase().startsWith(prefix + "iam " + "pink") ||
  869. message.content.toLowerCase().startsWith(prefix + "iam " + "29")
  870. ) {
  871. message.member.addRole("519034029907902484");
  872. message.channel
  873. .send(message.author.username + " enjoy your <@&519034029907902484> color role!")
  874. .then(sentMessage => {
  875. sentMessage.delete(3000);
  876. message.delete(1);
  877. })
  878. .catch();
  879. }
  880. if (
  881. message.content.toLowerCase().startsWith(prefix + "iamnot " + "pink") ||
  882. message.content.toLowerCase().startsWith(prefix + "iamnot " + "29")
  883. ) {
  884. message.member.removeRole("519034029907902484");
  885. message.channel
  886. .send("<@&519034029907902484> color role successfully removed!")
  887. .then(sentMessage => {
  888. sentMessage.delete(3000);
  889. message.delete(1);
  890. })
  891. .catch();
  892. }
  893. // Pastel Pink
  894. if (
  895. message.content.toLowerCase().startsWith(prefix + "iam " + "pastel pink") ||
  896. message.content.toLowerCase().startsWith(prefix + "iam " + "30")
  897. ) {
  898. message.member.addRole("608087340434325504");
  899. message.channel
  900. .send(message.author.username + " enjoy your <@&608087340434325504> color role!")
  901. .then(sentMessage => {
  902. sentMessage.delete(3000);
  903. message.delete(1);
  904. })
  905. .catch();
  906. }
  907. if (
  908. message.content.toLowerCase().startsWith(prefix + "iamnot " + "pastel pink") ||
  909. message.content.toLowerCase().startsWith(prefix + "iamnot " + "30")
  910. ) {
  911. message.member.removeRole("608087340434325504");
  912. message.channel
  913. .send("<@&608087340434325504> color role successfully removed!")
  914. .then(sentMessage => {
  915. sentMessage.delete(3000);
  916. message.delete(1);
  917. })
  918. .catch();
  919. }
  920. // Ivory
  921. if (
  922. message.content.toLowerCase().startsWith(prefix + "iam " + "ivory") ||
  923. message.content.toLowerCase().startsWith(prefix + "iam " + "31")
  924. ) {
  925. message.member.addRole("608086842428096532");
  926. message.channel
  927. .send(message.author.username + " enjoy your <@&608086842428096532> color role!")
  928. .then(sentMessage => {
  929. sentMessage.delete(3000);
  930. message.delete(1);
  931. })
  932. .catch();
  933. }
  934. if (
  935. message.content.toLowerCase().startsWith(prefix + "iamnot " + "ivory") ||
  936. message.content.toLowerCase().startsWith(prefix + "iamnot " + "31")
  937. ) {
  938. message.member.removeRole("608086842428096532");
  939. message.channel
  940. .send("<@&608086842428096532> color role successfully removed!")
  941. .then(sentMessage => {
  942. sentMessage.delete(3000);
  943. message.delete(1);
  944. })
  945. .catch();
  946. }
  947. // White
  948. if (
  949. message.content.toLowerCase().startsWith(prefix + "iam " + "white") ||
  950. message.content.toLowerCase().startsWith(prefix + "iam " + "32")
  951. ) {
  952. message.member.addRole("519034029907902484");
  953. message.channel
  954. .send(message.author.username + " enjoy your <@&519034029907902484> color role!")
  955. .then(sentMessage => {
  956. sentMessage.delete(3000);
  957. message.delete(1);
  958. })
  959. .catch();
  960. }
  961. if (
  962. message.content.toLowerCase().startsWith(prefix + "iamnot " + "white") ||
  963. message.content.toLowerCase().startsWith(prefix + "iamnot " + "32")
  964. ) {
  965. message.member.removeRole("519034029907902484");
  966. message.channel
  967. .send("<@&519034029907902484> color role successfully removed!")
  968. .then(sentMessage => {
  969. sentMessage.delete(3000);
  970. message.delete(1);
  971. })
  972. .catch();
  973. }
  974. // Light Gray
  975. if (
  976. message.content.toLowerCase().startsWith(prefix + "iam " + "light gray") ||
  977. message.content.toLowerCase().startsWith(prefix + "iam " + "32")
  978. ) {
  979. message.member.addRole("519036592254615562");
  980. message.channel
  981. .send(message.author.username + " enjoy your <@&519036592254615562> color role!")
  982. .then(sentMessage => {
  983. sentMessage.delete(3000);
  984. message.delete(1);
  985. })
  986. .catch();
  987. }
  988. if (
  989. message.content.toLowerCase().startsWith(prefix + "iamnot " + "light gray") ||
  990. message.content.toLowerCase().startsWith(prefix + "iamnot " + "32")
  991. ) {
  992. message.member.removeRole("519036592254615562");
  993. message.channel
  994. .send("<@&519036592254615562> color role successfully removed!")
  995. .then(sentMessage => {
  996. sentMessage.delete(3000);
  997. message.delete(1);
  998. })
  999. .catch();
  1000. }
  1001. // Blue Gray
  1002. if (
  1003. message.content.toLowerCase().startsWith(prefix + "iam " + "blue gray") ||
  1004. message.content.toLowerCase().startsWith(prefix + "iam " + "33")
  1005. ) {
  1006. message.member.addRole("519055342290862080");
  1007. message.channel
  1008. .send(message.author.username + " enjoy your <@&519055342290862080> color role!")
  1009. .then(sentMessage => {
  1010. sentMessage.delete(3000);
  1011. message.delete(1);
  1012. })
  1013. .catch();
  1014. }
  1015. if (
  1016. message.content.toLowerCase().startsWith(prefix + "iamnot " + "blue gray") ||
  1017. message.content.toLowerCase().startsWith(prefix + "iamnot " + "33")
  1018. ) {
  1019. message.member.removeRole("519055342290862080");
  1020. message.channel
  1021. .send("<@&519055342290862080> color role successfully removed!")
  1022. .then(sentMessage => {
  1023. sentMessage.delete(3000);
  1024. message.delete(1);
  1025. })
  1026. .catch();
  1027. }
  1028. // Gray
  1029. if (
  1030. message.content.toLowerCase().startsWith(prefix + "iam " + "gray") ||
  1031. message.content.toLowerCase().startsWith(prefix + "iam " + "34")
  1032. ) {
  1033. message.member.addRole("519036758416031745");
  1034. message.channel
  1035. .send(message.author.username + " enjoy your <@&519036758416031745> color role!")
  1036. .then(sentMessage => {
  1037. sentMessage.delete(3000);
  1038. message.delete(1);
  1039. })
  1040. .catch();
  1041. }
  1042. if (
  1043. message.content.toLowerCase().startsWith(prefix + "iamnot " + "gray") ||
  1044. message.content.toLowerCase().startsWith(prefix + "iamnot " + "34")
  1045. ) {
  1046. message.member.removeRole("519036758416031745");
  1047. message.channel
  1048. .send("<@&519036758416031745> color role successfully removed!")
  1049. .then(sentMessage => {
  1050. sentMessage.delete(3000);
  1051. message.delete(1);
  1052. })
  1053. .catch();
  1054. }
  1055. // Black
  1056. if (
  1057. message.content.toLowerCase().startsWith(prefix + "iam " + "black") ||
  1058. message.content.toLowerCase().startsWith(prefix + "iam " + "35")
  1059. ) {
  1060. message.member.addRole("519034171058946048");
  1061. message.channel
  1062. .send(message.author.username + " enjoy your <@&519034171058946048> color role!")
  1063. .then(sentMessage => {
  1064. sentMessage.delete(3000);
  1065. message.delete(1);
  1066. })
  1067. .catch();
  1068. }
  1069. if (
  1070. message.content.toLowerCase().startsWith(prefix + "iamnot " + "black") ||
  1071. message.content.toLowerCase().startsWith(prefix + "iamnot " + "35")
  1072. ) {
  1073. message.member.removeRole("519034171058946048");
  1074. message.channel
  1075. .send("<@&519034171058946048> color role successfully removed!")
  1076. .then(sentMessage => {
  1077. sentMessage.delete(3000);
  1078. message.delete(1);
  1079. })
  1080. .catch();
  1081. }
  1082. // Invisible
  1083. if (
  1084. message.content.toLowerCase().startsWith(prefix + "iam " + "invisible") ||
  1085. message.content.toLowerCase().startsWith(prefix + "iam " + "36")
  1086. ) {
  1087. message.member.addRole("608080962043117588");
  1088. message.channel
  1089. .send(message.author.username + " enjoy your <@&608080962043117588> color role!")
  1090. .then(sentMessage => {
  1091. sentMessage.delete(3000);
  1092. message.delete(1);
  1093. })
  1094. .catch();
  1095. }
  1096. if (
  1097. message.content.toLowerCase().startsWith(prefix + "iamnot " + "invisible") ||
  1098. message.content.toLowerCase().startsWith(prefix + "iamnot " + "36")
  1099. ) {
  1100. message.member.removeRole("608080962043117588");
  1101. message.channel
  1102. .send("<@&608080962043117588> color role successfully removed!")
  1103. .then(sentMessage => {
  1104. sentMessage.delete(3000);
  1105. message.delete(1);
  1106. })
  1107. .catch();
  1108. }
  1109. //PRONOUNS ROLES
  1110. // He / Him
  1111. if (
  1112. message.content.toLowerCase().startsWith(prefix + "iam " + "man") ||
  1113. message.content.toLowerCase().startsWith(prefix + "iam " + "boy") ||
  1114. message.content.toLowerCase().startsWith(prefix + "iam " + "he") ||
  1115. message.content.toLowerCase().startsWith(prefix + "iam " + "him")
  1116. ) {
  1117. message.member.addRole("624365203399770150");
  1118. message.channel
  1119. .send(message.author.username + " enjoy your <@&624365203399770150> pronoun role!")
  1120. .then(sentMessage => {
  1121. sentMessage.delete(3000);
  1122. message.delete(1);
  1123. })
  1124. .catch();
  1125. }
  1126. if (
  1127. message.content.toLowerCase().startsWith(prefix + "iamnot " + "man") ||
  1128. message.content.toLowerCase().startsWith(prefix + "iamnot " + "boy") ||
  1129. message.content.toLowerCase().startsWith(prefix + "iamnot " + "he") ||
  1130. message.content.toLowerCase().startsWith(prefix + "iamnot " + "him")
  1131. ) {
  1132. message.member.removeRole("624365203399770150");
  1133. message.channel
  1134. .send("<@&624365203399770150> pronoun role successfully removed!")
  1135. .then(sentMessage => {
  1136. sentMessage.delete(3000);
  1137. message.delete(1);
  1138. })
  1139. .catch();
  1140. }
  1141. // She / Her
  1142. if (
  1143. message.content.toLowerCase().startsWith(prefix + "iam " + "woman") ||
  1144. message.content.toLowerCase().startsWith(prefix + "iam " + "girl") ||
  1145. message.content.toLowerCase().startsWith(prefix + "iam " + "she") ||
  1146. message.content.toLowerCase().startsWith(prefix + "iam " + "her")
  1147. ) {
  1148. message.member.addRole("624365743219408915");
  1149. message.channel
  1150. .send(message.author.username + " enjoy your <@&624365743219408915> pronoun role!")
  1151. .then(sentMessage => {
  1152. sentMessage.delete(3000);
  1153. message.delete(1);
  1154. })
  1155. .catch();
  1156. }
  1157. if (
  1158. message.content.toLowerCase().startsWith(prefix + "iamnot " + "woman") ||
  1159. message.content.toLowerCase().startsWith(prefix + "iamnot " + "girl") ||
  1160. message.content.toLowerCase().startsWith(prefix + "iamnot " + "she") ||
  1161. message.content.toLowerCase().startsWith(prefix + "iamnot " + "her")
  1162. ) {
  1163. message.member.removeRole("624365743219408915");
  1164. message.channel
  1165. .send("<@&624365743219408915> pronoun role successfully removed!")
  1166. .then(sentMessage => {
  1167. sentMessage.delete(3000);
  1168. message.delete(1);
  1169. })
  1170. .catch();
  1171. }
  1172. // They / Their
  1173. if (
  1174. message.content.toLowerCase().startsWith(prefix + "iam " + "neutral") ||
  1175. message.content.toLowerCase().startsWith(prefix + "iam " + "genderless") ||
  1176. message.content.toLowerCase().startsWith(prefix + "iam " + "they") ||
  1177. message.content.toLowerCase().startsWith(prefix + "iam " + "their")
  1178. ) {
  1179. message.member.addRole("624365748965343244");
  1180. message.channel
  1181. .send(message.author.username + " enjoy your <@&624365748965343244> pronoun role!")
  1182. .then(sentMessage => {
  1183. sentMessage.delete(3000);
  1184. message.delete(1);
  1185. })
  1186. .catch();
  1187. }
  1188. if (
  1189. message.content.toLowerCase().startsWith(prefix + "iamnot " + "neutral") ||
  1190. message.content.toLowerCase().startsWith(prefix + "iamnot " + "genderless") ||
  1191. message.content.toLowerCase().startsWith(prefix + "iamnot " + "they") ||
  1192. message.content.toLowerCase().startsWith(prefix + "iamnot " + "their")
  1193. ) {
  1194. message.member.removeRole("624365748965343244");
  1195. message.channel
  1196. .send("<@&624365748965343244> pronoun role successfully removed!")
  1197. .then(sentMessage => {
  1198. sentMessage.delete(3000);
  1199. message.delete(1);
  1200. })
  1201. .catch();
  1202. }
  1203. // GROUPS ROLES
  1204. // Midnight Cult Flicks (Cult Movie Night)
  1205. if (message.content.toLowerCase().startsWith(prefix + "iam " + "cult"))
  1206. {
  1207. message.member.addRole("622168721498177587");
  1208. message.channel
  1209. .send(message.author.username + " enjoy your <@&622168721498177587> role!")
  1210. .then(sentMessage => {
  1211. sentMessage.delete(3000);
  1212. message.delete(1);
  1213. })
  1214. .catch();
  1215. }
  1216. if (message.content.toLowerCase().startsWith(prefix + "iamnot " + "cult"))
  1217. {
  1218. message.member.removeRole("622168721498177587");
  1219. message.channel
  1220. .send("<@&622168721498177587> role successfully removed!")
  1221. .then(sentMessage => {
  1222. sentMessage.delete(3000);
  1223. message.delete(1);
  1224. })
  1225. .catch();
  1226. }
  1227. // Neocities People
  1228. if (
  1229. message.content.toLowerCase().startsWith(prefix + "iam " + "nc") ||
  1230. message.content.toLowerCase().startsWith(prefix + "iam " + "neocities")
  1231. ) {
  1232. message.member.addRole("625785658899693608");
  1233. message.channel
  1234. .send(message.author.username + " enjoy your <@&625785658899693608> role!")
  1235. .then(sentMessage => {
  1236. sentMessage.delete(3000);
  1237. message.delete(1);
  1238. })
  1239. .catch();
  1240. }
  1241. if (
  1242. message.content.toLowerCase().startsWith(prefix + "iamnot " + "nc") ||
  1243. message.content.toLowerCase().startsWith(prefix + "iamnot " + "neocities")
  1244. ) {
  1245. message.member.removeRole("625785658899693608");
  1246. message.channel
  1247. .send("<@&625785658899693608> role successfully removed!")
  1248. .then(sentMessage => {
  1249. sentMessage.delete(3000);
  1250. message.delete(1);
  1251. })
  1252. .catch();
  1253. }
  1254. // News Subscriber (Announcements ping role)
  1255. if (
  1256. message.content.toLowerCase().startsWith(prefix + "iam " + "news") ||
  1257. message.content.toLowerCase().startsWith(prefix + "iam " + "newsletter")
  1258. ) {
  1259. message.member.addRole("628767206989103134");
  1260. message.channel
  1261. .send(message.author.username + " enjoy your <@&628767206989103134> role!")
  1262. .then(sentMessage => {
  1263. sentMessage.delete(3000);
  1264. message.delete(1);
  1265. })
  1266. .catch();
  1267. }
  1268. if (
  1269. message.content.toLowerCase().startsWith(prefix + "iamnot " + "news") ||
  1270. message.content.toLowerCase().startsWith(prefix + "iamnot " + "newsletter")
  1271. ) {
  1272. message.member.removeRole("628767206989103134");
  1273. message.channel
  1274. .send("<@&628767206989103134> role successfully removed!")
  1275. .then(sentMessage => {
  1276. sentMessage.delete(3000);
  1277. message.delete(1);
  1278. })
  1279. .catch();
  1280. }
  1281. });
  1282. // Music Commands
  1283. bot.on('message', async message => {
  1284. if (message.author.bot) return;
  1285. if (!message.content.startsWith(prefix)) return;
  1286. const serverQueue = queue.get(message.guild.id);
  1287. if (
  1288. message.content.toLowerCase().startsWith(prefix + "play") ||
  1289. message.content.includes(prefix + "p")
  1290. ) {
  1291. execute(message, serverQueue);
  1292. return;
  1293. } else if (
  1294. message.content.toLowerCase().startsWith(prefix + "skip") ||
  1295. message.content.includes(prefix + "k")
  1296. ) {
  1297. skip(message, serverQueue);
  1298. return;
  1299. } else if (
  1300. message.content.toLowerCase().startsWith(prefix + "stop") ||
  1301. message.content.includes(prefix + "s")
  1302. ) {
  1303. stop(message, serverQueue);
  1304. return;
  1305. } else { }
  1306. });
  1307. async function execute(message, serverQueue) {
  1308. const args = message.content.split(' ');
  1309. const voiceChannel = message.member.voiceChannel;
  1310. if (!voiceChannel) return message.channel.send('You need to be in a voice channel to play music!');
  1311. const permissions = voiceChannel.permissionsFor(message.client.user);
  1312. if (!permissions.has('CONNECT') || !permissions.has('SPEAK')) {
  1313. return message.channel.send('I need the permissions to join and speak in your voice channel!');
  1314. }
  1315. const songInfo = await ytdl.getInfo(args[1]);
  1316. const song = {
  1317. title: songInfo.title,
  1318. url: songInfo.video_url,
  1319. };
  1320. if (!serverQueue) {
  1321. const queueContruct = {
  1322. textChannel: message.channel,
  1323. voiceChannel: voiceChannel,
  1324. connection: null,
  1325. songs: [],
  1326. volume: 5,
  1327. playing: true,
  1328. };
  1329. queue.set(message.guild.id, queueContruct);
  1330. queueContruct.songs.push(song);
  1331. try {
  1332. var connection = await voiceChannel.join();
  1333. queueContruct.connection = connection;
  1334. play(message.guild, queueContruct.songs[0]);
  1335. } catch (err) {
  1336. console.log(err);
  1337. queue.delete(message.guild.id);
  1338. return message.channel.send(err);
  1339. }
  1340. } else {
  1341. serverQueue.songs.push(song);
  1342. console.log(serverQueue.songs);
  1343. return message.channel.send(`${song.title} has been added to the queue!`);
  1344. }
  1345. }
  1346. function skip(message, serverQueue) {
  1347. if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
  1348. if (!serverQueue) return message.channel.send('There is no song that I could skip!');
  1349. serverQueue.connection.dispatcher.end();
  1350. }
  1351. function stop(message, serverQueue) {
  1352. if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
  1353. serverQueue.songs = [];
  1354. serverQueue.connection.dispatcher.end();
  1355. }
  1356. function play(guild, song) {
  1357. const serverQueue = queue.get(guild.id);
  1358. if (!song) {
  1359. serverQueue.voiceChannel.leave();
  1360. queue.delete(guild.id);
  1361. return;
  1362. }
  1363. const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
  1364. .on('end', () => {
  1365. console.log('Music ended!');
  1366. serverQueue.songs.shift();
  1367. play(guild, serverQueue.songs[0]);
  1368. })
  1369. .on('error', error => {
  1370. console.error(error);
  1371. });
  1372. dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
  1373. }