Skip to content

Commit

Permalink
loader改善
Browse files Browse the repository at this point in the history
  • Loading branch information
mohemohe committed Apr 13, 2019
1 parent 4ca14f6 commit 3f4b89f
Show file tree
Hide file tree
Showing 25 changed files with 44 additions and 44 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Prefix = require('../../helpers/prefix');
const Prefix = require('../helpers/prefix');

module.exports = (robot) => {
robot.hear(Prefix.regex('/command (.*)/mi'), (msg) => {
Expand Down
6 changes: 3 additions & 3 deletions scripts/kokoro.io/dice.js → scripts/kokoro.io/hubot/dice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../helpers/prefix');
const random = require('../../helpers/random');
const allowCommand = require('../../helpers/allowcommand');
const Prefix = require('../helpers/prefix');
const random = require('../helpers/random');
const allowCommand = require('../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/dice(.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const runInDocker = require('../../../helpers/runindocker');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const runInDocker = require('../../helpers/runindocker');

module.exports = (robot) => {
robot.hear(Prefix.regex('/bash (.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const runInDocker = require('../../../helpers/runindocker');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const runInDocker = require('../../helpers/runindocker');

module.exports = (robot) => {
robot.hear(Prefix.regex('/node (.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const runInDocker = require('../../../helpers/runindocker');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const runInDocker = require('../../helpers/runindocker');

module.exports = (robot) => {
robot.hear(Prefix.regex('/php (.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const runInDocker = require('../../../helpers/runindocker');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const runInDocker = require('../../helpers/runindocker');

module.exports = (robot) => {
robot.hear(Prefix.regex('/python (.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const runInDocker = require('../../../helpers/runindocker');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const runInDocker = require('../../helpers/runindocker');

module.exports = (robot) => {
robot.hear(Prefix.regex('/ruby (.*)/mi'), (msg) => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/kokoro.io/help.js → scripts/kokoro.io/hubot/help.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const Prefix = require('../helpers/prefix');
const allowCommand = require('../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/help$/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Haiku = require('@mohemohe/haiku.js').default;
const Prefix = require('../../helpers/prefix');
const Prefix = require('../helpers/prefix');

module.exports = (robot) => {
robot.hear(Prefix.regex('/ikku(.*)$/mi'), (msg) => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/kokoro.io/kill.js → scripts/kokoro.io/hubot/kill.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const Prefix = require('../helpers/prefix');
const allowCommand = require('../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/kill$/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Mastodon = require('mastodon-api');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const Prefix = require('../helpers/prefix');
const allowCommand = require('../helpers/allowcommand');

const Mode = {
ALL: 'all',
Expand Down
4 changes: 2 additions & 2 deletions scripts/kokoro.io/ping.js → scripts/kokoro.io/hubot/ping.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const Prefix = require('../helpers/prefix');
const allowCommand = require('../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/ping$/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const util = require('util');
const Bing = require('node-bing-api');
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const random = require('../../../helpers/random');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');
const random = require('../../helpers/random');

function checkBing(msg) {
if (process.env.BING_API_KEY) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Prefix = require('../../../helpers/prefix');
const Prefix = require('../../helpers/prefix');
const GoogleImages = require('google-images');
const allowCommand = require('../../../helpers/allowcommand');
const random = require('../../../helpers/random');
const allowCommand = require('../../helpers/allowcommand');
const random = require('../../helpers/random');

function checkGoogle(msg) {
if (process.env.GOOGLE_CSE_ID && process.env.GOOGLE_API_KEY) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const irasutoya = require('@fand/irasutoya');
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/irasutoya (.*)/mi'), (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const axios = require('axios');
const Prefix = require('../../../helpers/prefix');
const allowCommand = require('../../../helpers/allowcommand');
const Prefix = require('../../helpers/prefix');
const allowCommand = require('../../helpers/allowcommand');

module.exports = (robot) => {
robot.hear(Prefix.regex('/lgtm/'), async (msg) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fns = require('date-fns');
const random = require('../../helpers/random');
const Prefix = require('../../helpers/prefix');
const user = require('../../helpers/user');
const random = require('../helpers/random');
const Prefix = require('../helpers/prefix');
const user = require('../helpers/user');

const maxHp = 100;
const dailyHeal = 10;
Expand Down
6 changes: 3 additions & 3 deletions scripts/loader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const glob = require('glob');

module.exports = (robot) => {
const dirs = glob.sync(`${__dirname}/**/*/`);
dirs.forEach((dir) => robot.load(dir));
}
const dirs = glob.sync(`${__dirname}/*/hubot/**/`);
dirs.forEach((dir) => robot.load(dir));
}

0 comments on commit 3f4b89f

Please sign in to comment.