Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Discord = require("discord.js");
- var client = new Discord.Client();
- function Magic8Ball() {
- var answers = ['Maybe.', 'Certainly not.', 'I hope so.', 'Bink.',
- 'There is a good chance.', 'Quite likely.', 'I think so.', 'I hope not.',
- 'I hope so.', 'Never!', 'Youre not funny.', ':joy:', 'Pfft.', 'Hell, yes.', 'Hell to the no.', 'The future is bleak.',
- 'The future is uncertain.', 'I would rather not say.', 'Who cares?',
- 'Possibly.', 'Never, ever, ever.', 'There is a small chance.', 'Yes!'];
- return answers[Math.floor(Math.random()*answers.length)];
- }
- client.on("message", msg => {
- if (msg.content.startsWith("!8ball")) {
- msg.channel.sendMessage('Your anwser is: ' + Magic8Ball());
- }
- });
- client.on('ready', () => {
- console.log('I am ready!');
- });
- client.login("botlogincodehere");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement