Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update famiscript.js #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
42 changes: 21 additions & 21 deletions scripts/famiscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ function getUser(msg, bot, userInputUser) {

module.exports = (robot) => {
// badger badger badger
robot.hear(/badger/i, (msg) => {
const rand = Math.round(Math.random() * 600000);
const totalBadgers = robot.brain.get('totalBadgers') + 1;
robot.brain.set('totalBadgers', totalBadgers);
setTimeout(() => {
msg.send(msg.random(badger));
}, rand);
const user = msg.message.user;
robot.logger.info(`${user.name} was heard saying ${msg.message.text} for the ${totalBadgers} time`);
});
// robot.hear(/badger/i, (msg) => {
// const rand = Math.round(Math.random() * 600000);
// const totalBadgers = robot.brain.get('totalBadgers') + 1;
// robot.brain.set('totalBadgers', totalBadgers);
// setTimeout(() => {
// msg.send(msg.random(badger));
// }, rand);
// const user = msg.message.user;
// robot.logger.info(`${user.name} was heard saying ${msg.message.text} for the ${totalBadgers} time`);
// });

robot.hear(/how many badgers\?/i, (msg) => {
const totalBadgers = robot.brain.get('totalBadgers');
Expand All @@ -95,14 +95,14 @@ module.exports = (robot) => {
});

// agree with awesome
robot.hear(/^(.*) (is|are|seems) awesome/i, (msg) => {
const rand = Math.round((Math.random() * 60000) + 60000);
const user = msg.message.user;
setTimeout(() => {
msg.send(`${msg.random(consideration)}I think that ${msg.match[1]} ${msg.match[2]} awesome too`);
}, rand);
robot.logger.info(`${user.name} was heard saying ${msg.message.text}`);
});
// robot.hear(/^(.*) (is|are|seems) awesome/i, (msg) => {
// const rand = Math.round((Math.random() * 60000) + 60000);
// const user = msg.message.user;
// setTimeout(() => {
// msg.send(`${msg.random(consideration)}I think that ${msg.match[1]} ${msg.match[2]} awesome too`);
// }, rand);
// robot.logger.info(`${user.name} was heard saying ${msg.message.text}`);
// });

robot.hear(/^catbomb (\d+)$/i, (msg) => {
const user = msg.message.user;
Expand Down Expand Up @@ -178,9 +178,9 @@ module.exports = (robot) => {
});

// point out topic changes
robot.topic((msg) => {
msg.send(`${msg.message.text}? TOPIC CHANGE! I'm telling!`);
});
// robot.topic((msg) => {
// msg.send(`${msg.message.text}? TOPIC CHANGE! I'm telling!`);
// });

// redis
robot.hear(/^redis server info$/i, (msg) => {
Expand Down