add multiple channel support

This commit is contained in:
amy 2024-11-26 01:02:14 +03:30
parent 0ad10fdd93
commit c644486876
No known key found for this signature in database
2 changed files with 2 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{ {
"groq-key": "", "groq-key": "",
"discord-key": "", "discord-key": "",
"chat-channelID": "", "chat-channelID": [""],
"should-send-debug": false, "should-send-debug": false,
"debug-channelID": "" "debug-channelID": ""
} }

View file

@ -60,7 +60,7 @@ client.on(Events.MessageCreate, (message: Message) => {
} }
} }
if (message.channel.id !== conf['chat-channelID']) return if (!conf['chat-channelID'].includes(message.channel.id)) return
(async function () { (async function () {
let imageexplain: string | boolean = ""; let imageexplain: string | boolean = "";
@ -78,8 +78,6 @@ client.on(Events.MessageCreate, (message: Message) => {
} }
} }
// Log the result after the asynchronous operations are complete
console.log(imageexplain);
messages.push({ messages.push({
"role": "user", "role": "user",
"name": message.author.username, "name": message.author.username,