aboutsummaryrefslogtreecommitdiff
path: root/bot/src/plugins
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-20 01:47:19 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-20 01:47:19 -0400
commitc06c0be2e7520ceaf5284472d0d99c7417aceb7a (patch)
tree22cd41cc51c0cdd345bf2133c6ed85772b6d306f /bot/src/plugins
parentbdeef58376711e9a49c3b6f26aaf3fc65fa6200b (diff)
downloadAleeBot-c06c0be2e7520ceaf5284472d0d99c7417aceb7a.tar.gz
AleeBot-c06c0be2e7520ceaf5284472d0d99c7417aceb7a.tar.bz2
AleeBot-c06c0be2e7520ceaf5284472d0d99c7417aceb7a.zip
New command; New logging feature; QOTD (WIP)
Diffstat (limited to 'bot/src/plugins')
-rw-r--r--bot/src/plugins/chatbot.js1
-rw-r--r--bot/src/plugins/eval.js3
-rw-r--r--bot/src/plugins/qotd.js28
3 files changed, 32 insertions, 0 deletions
diff --git a/bot/src/plugins/chatbot.js b/bot/src/plugins/chatbot.js
new file mode 100644
index 0000000..f4095a2
--- /dev/null
+++ b/bot/src/plugins/chatbot.js
@@ -0,0 +1 @@
+// add llm feature here
diff --git a/bot/src/plugins/eval.js b/bot/src/plugins/eval.js
new file mode 100644
index 0000000..47b3988
--- /dev/null
+++ b/bot/src/plugins/eval.js
@@ -0,0 +1,3 @@
+export async function evaluation() {
+
+}
diff --git a/bot/src/plugins/qotd.js b/bot/src/plugins/qotd.js
new file mode 100644
index 0000000..a6ea73e
--- /dev/null
+++ b/bot/src/plugins/qotd.js
@@ -0,0 +1,28 @@
+import { EmbedBuilder } from 'discord.js';
+import { abEmbedColour } from '../storage/consts.js';
+import { quote as quoteDB } from '../models/quote.js';
+
+export async function QuoteOfTheDay(client) {
+ const channels = ['606602551634296968', '341669022179262464'];
+ const quoteList = await quoteDB.findAll({ attributes: ['id'] });
+ const random = crypto.getRandomValues(new Uint32Array(1));
+
+ if (quoteList.length === 0) return console.log('[i] No quotes are currently in the database.');
+
+ let quoteID = quoteList[random[0] % quoteList.length].id;
+
+ const quote = await quoteDB.findOne({ where: { id: quoteID } });
+
+ let userSubmitter = await client.users.fetch(quote.submitter);
+
+ const quoteEmbed = new EmbedBuilder()
+ .setAuthor({ name: quote.author, iconURL: quote.authorImage })
+ .setDescription(quote.quote)
+ .setColor(abEmbedColour)
+ .setFooter({ text: `- ${quote.year}\nSubmitted by ${userSubmitter.username}` });
+
+ for (const channel of channels) {
+ let qotdChannel = client.channels.cache.get(channel);
+ await qotdChannel.send({ embeds: [quoteEmbed] });
+ }
+}