mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
d4db3c7330
2 changed files with 8 additions and 10 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const commando = require("@iceprod/discord.js-commando");
|
const commando = require("@iceprod/discord.js-commando");
|
||||||
const { trySend } = require("../../resources/functions");
|
// const { chatAnswer } = require("../../resources/shaChat");
|
||||||
const { chatAnswer } = require("../../resources/shaChat");
|
|
||||||
|
|
||||||
module.exports = class chat extends commando.Command {
|
module.exports = class chat extends commando.Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
|
@ -13,12 +12,8 @@ module.exports = class chat extends commando.Command {
|
||||||
description: "Lets chat!"
|
description: "Lets chat!"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async run(msg, args) {
|
async run(msg) {
|
||||||
if (!args) {
|
return "Chat is currently unavailable.";
|
||||||
return trySend(msg.client, msg, "Ask me somethin?");
|
// chatAnswer(this.client, msg);
|
||||||
}
|
|
||||||
msg.channel.startTyping();
|
|
||||||
return trySend(this.client, msg, await chatAnswer(
|
|
||||||
msg.cleanContent.slice((msg.guild.commandPrefix + msg.alias).length + 1).trim()));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -15,4 +15,7 @@ dbClient.connect(e => {
|
||||||
|
|
||||||
const database = dbClient.db("Shasha");
|
const database = dbClient.db("Shasha");
|
||||||
|
|
||||||
module.exports = { dbClient, database }
|
/**
|
||||||
|
* @type {dbClient: MongoClient, database: Db}
|
||||||
|
*/
|
||||||
|
module.exports = { dbClient, database }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue