mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Oops
This commit is contained in:
@@ -23,6 +23,8 @@ const clevs = new Cleverbot({
|
|||||||
nick: 'XiaoBot'
|
nick: 'XiaoBot'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let mention;
|
||||||
|
|
||||||
client.setProvider(new SequelizeProvider(Database.db));
|
client.setProvider(new SequelizeProvider(Database.db));
|
||||||
|
|
||||||
client.registry
|
client.registry
|
||||||
@@ -45,7 +47,6 @@ client.registry
|
|||||||
.registerDefaultCommands({ help: false })
|
.registerDefaultCommands({ help: false })
|
||||||
.registerCommandsIn(path.join(__dirname, 'commands'));
|
.registerCommandsIn(path.join(__dirname, 'commands'));
|
||||||
|
|
||||||
const mention = new RegExp(`(<!?@${client.user.id}>)`, 'g');
|
|
||||||
client.on('message', async (msg) => {
|
client.on('message', async (msg) => {
|
||||||
if (msg.isMentioned(client.user)) {
|
if (msg.isMentioned(client.user)) {
|
||||||
const message = msg.content.replace(mention, '');
|
const message = msg.content.replace(mention, '');
|
||||||
@@ -141,6 +142,7 @@ client.on('disconnect', (event) => {
|
|||||||
client.on('ready', () => {
|
client.on('ready', () => {
|
||||||
console.log(`[Ready] Shard ${client.shard.id} Logged in!`);
|
console.log(`[Ready] Shard ${client.shard.id} Logged in!`);
|
||||||
client.user.setGame(`x;help | Shard ${client.shard.id}`);
|
client.user.setGame(`x;help | Shard ${client.shard.id}`);
|
||||||
|
mention = new RegExp(`(<!?@${client.user.id}>)`, 'g');
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(TOKEN);
|
client.login(TOKEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user