bug resolutions
This commit is contained in:
parent
414a9734c9
commit
cb16fa9239
13 changed files with 78 additions and 81 deletions
|
@ -1,6 +1,6 @@
|
|||
import { Events, Interaction } from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
name: Events.InteractionCreate,
|
||||
async execute(interaction: Interaction) {
|
||||
if (interaction.isChatInputCommand()) {
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
import { Events, Message } from "discord.js";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue } from "../libs/mistralai";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql";
|
||||
import { getMessages } from "../libs/discord";
|
||||
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue } from "../libs/mistralai.js";
|
||||
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql.js";
|
||||
import { getMessages } from "../libs/discord.js";
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
name: Events.MessageCreate,
|
||||
async execute(message: Message) {
|
||||
if (!message.guildId && message.author.id != process.env.BOT_ID) {
|
||||
const prompt: string = message.content;
|
||||
|
||||
if (message.author.id != '372437660167438337') {
|
||||
return message.reply("you are not allowed to use this command");
|
||||
}
|
||||
|
||||
const connection = await connectToDb();
|
||||
|
||||
var user: User[] = await getUser(connection, message.author.id);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Events, Client } from "discord.js";
|
||||
import { checkReset } from "../libs/quotaReset";
|
||||
import { checkReset } from "../libs/quotaReset.js";
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
name: Events.ClientReady,
|
||||
once: true,
|
||||
execute(client: Client) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue