Merge branch 'main' into main

This commit is contained in:
Daniel Bulant 2021-08-27 13:28:54 +02:00 committed by GitHub
commit d4db3c7330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View file

@ -1,8 +1,7 @@
'use strict';
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 {
constructor(client) {
@ -13,12 +12,8 @@ module.exports = class chat extends commando.Command {
description: "Lets chat!"
});
}
async run(msg, args) {
if (!args) {
return trySend(msg.client, msg, "Ask me somethin?");
}
msg.channel.startTyping();
return trySend(this.client, msg, await chatAnswer(
msg.cleanContent.slice((msg.guild.commandPrefix + msg.alias).length + 1).trim()));
async run(msg) {
return "Chat is currently unavailable.";
// chatAnswer(this.client, msg);
}
};

View file

@ -15,4 +15,7 @@ dbClient.connect(e => {
const database = dbClient.db("Shasha");
module.exports = { dbClient, database }
/**
* @type {dbClient: MongoClient, database: Db}
*/
module.exports = { dbClient, database }