Updating mineflayer
This commit is contained in:
6
index.js
6
index.js
@@ -156,12 +156,12 @@ connect(mongoURI, {}).then(() => {
|
|||||||
// const filePath = path.join(mfPath, file);
|
// const filePath = path.join(mfPath, file);
|
||||||
// const mf = require (filePath);
|
// const mf = require (filePath);
|
||||||
//
|
//
|
||||||
// if ('name' in mf && 'execute' in mf && mf.type === 'mineflayer') {
|
// if ('name' in mf && 'execute' in mf && 'type' in mf) {
|
||||||
//
|
//
|
||||||
// if (mf.once) {
|
// if (mf.once) {
|
||||||
// bot.once(mf.name, mf.execute);
|
// bot.once(mf.type, mf.execute);
|
||||||
// } else {
|
// } else {
|
||||||
// bot.on(mf.name, mf.execute);
|
// bot.on(mf.type, mf.execute);
|
||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
// console.log(`[WARNING] The mineflayer event at ${filePath} is missing a required "name", "execute" or "type" property.`);
|
// console.log(`[WARNING] The mineflayer event at ${filePath} is missing a required "name", "execute" or "type" property.`);
|
||||||
|
|||||||
12
utils/mineflayer/limbo.js
Normal file
12
utils/mineflayer/limbo.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'limbo',
|
||||||
|
description: 'Sends bot to limbo.',
|
||||||
|
type: 'spawn',
|
||||||
|
|
||||||
|
async execute() {
|
||||||
|
const bot = require ('../../index.js');
|
||||||
|
|
||||||
|
bot.chat('/locraw');
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'message',
|
name: 'Guild chat relay',
|
||||||
description: 'Sends a message to the chat.',
|
description: 'Sends a message to the chat.',
|
||||||
type: 'mineflayer',
|
type: 'message',
|
||||||
|
|
||||||
async execute(jsonMsg) {
|
async execute(jsonMsg) {
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ module.exports = {
|
|||||||
|
|
||||||
if (annoyingMessages.includes(msg)) return;
|
if (annoyingMessages.includes(msg)) return;
|
||||||
|
|
||||||
// console.log(msg);
|
console.log("[Chat message] " + msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'login',
|
name: 'login',
|
||||||
description: 'Logs the bot in.',
|
description: 'Logs the bot in.',
|
||||||
type: 'mineflayer',
|
type: 'login',
|
||||||
|
|
||||||
async execute() {
|
async execute() {
|
||||||
|
|
||||||
const bot = require ('../../index.js');
|
const bot = require ('../../index.js');
|
||||||
|
console.log('Logged in as ' + bot.username + '!')
|
||||||
console.log('Logging in...');
|
|
||||||
bot.chat("/lobby bedwars")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user