Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const prefix = "gem!";
- const botname = "GembleBOT " + prefix + "help";
- const version = "1.0.0";
- var help = `__GembleBOT Commands__
- • gem!help — Shows this help message.
- • gem!gamble — Play the gemble game.
- __Rules of Gemble:__
- The rules of gemble are simple: you just try your luck with gem!gamble
- If you see a not-so-friendly image, you lose the game.
- However, there is a slight chance you will win!
- Try your luck and see if fortune smiles upon you.
- `;
- var botinfo = "GembleBOT " + version + ". Developed for gamble image rolls.";
- const incrediblerollPics = [
- "https://files.catbox.moe/eb7dpw.png",
- "https://files.catbox.moe/ua1659.jpeg",
- "https://files.catbox.moe/86tuil.jpeg",
- "https://files.catbox.moe/jtnvby.png",
- "https://files.catbox.moe/mtmb1h.png",
- "https://files.catbox.moe/o9no9b.png",
- "https://files.catbox.moe/3mnyrz.png",
- "https://files.catbox.moe/sngqgz.jpeg",
- "https://files.catbox.moe/evnmg6.png"
- ];
- function getRandomPic(picsArray) {
- const randomIndex = Math.floor(Math.random() * picsArray.length);
- return picsArray[randomIndex];
- }
- function sendMsg(msg) {
- setTimeout(() => {
- socket.emit("talk", { text: msg });
- }, 1100);
- }
- setTimeout(() => {
- socket.emit("command", { list: ["name", botname] });
- }, 1000);
- setTimeout(() => {
- sendMsg("GembleBOT is online. Type " + prefix + "help to see available commands.");
- setInterval(() => {
- sendMsg("GembleBOT is online. Type " + prefix + "help to see available commands.");
- }, 60000);
- }, 3200);
- socket.on("talk", function (message) {
- if (message.text === prefix + "help") {
- sendMsg(help);
- } else if (message.text === prefix + "gamble") {
- const randomPic = getRandomPic(incrediblerollPics);
- setTimeout(() => {
- socket.emit("command", { list: ["image", randomPic] });
- }, 1100);
- } else if (message.text === prefix + "version") {
- sendMsg(botinfo);
- }
- });
Add Comment
Please, Sign In to add comment