Merge branch 'dev' into 'main'

Updating env and waiting list

See merge request illegitimate/illegitimate-bot!15
This commit is contained in:
2023-08-29 10:20:53 +00:00
4 changed files with 14 additions and 8 deletions

View File

@@ -1,6 +1,8 @@
PRODTOKEN=
TOKEN= TOKEN=
MONGOURI= MONGOURI=
DEV= DEV=
CLIENTID= CLIENTID=
DEVID=
GUILDID= GUILDID=
HYPIXELAPIKEY= HYPIXELAPIKEY=

View File

@@ -192,9 +192,8 @@ module.exports = {
await channel.send({ await channel.send({
embeds: [{ embeds: [{
title: "Waiting List", title: "Waiting List",
description: "The people below are on the waiting list to join the guild\n" + description: "The people below were accepted into the guild\n" +
"They are placed in order of then being accepted into the guild\n" + "Try to invite them in order.",
"Press the button below to refresh the list",
color: embedColor, color: embedColor,
footer: { footer: {
text: interaction.guild.name + " | Developed by @Taken#0002", text: interaction.guild.name + " | Developed by @Taken#0002",
@@ -210,7 +209,7 @@ module.exports = {
.setCustomId("waitinglistupdate") .setCustomId("waitinglistupdate")
.setLabel("Update") .setLabel("Update")
.setStyle(ButtonStyle.Primary) .setStyle(ButtonStyle.Primary)
.setEmoji({ name: "" })) .setEmoji({ name: "🔄" }))
] ]
}); });
await interaction.reply({ content: "Message sent", ephemeral: true }); await interaction.reply({ content: "Message sent", ephemeral: true });

View File

@@ -1,6 +1,6 @@
const { REST, Routes } = require('discord.js'); const { REST, Routes } = require('discord.js');
const env = require('dotenv').config(); const env = require('dotenv').config();
const token = process.env.TOKEN; const token = process.env.PRODTOKEN;
const clientId = process.env.CLIENTID; const clientId = process.env.CLIENTID;
const guildId = process.env.GUILDID; const guildId = process.env.GUILDID;
const fs = require('node:fs'); const fs = require('node:fs');
@@ -84,4 +84,4 @@ else if (arg === '--dev') {
} }
else if (arg && arg !== '--prod' && arg !== '--dev') { else if (arg && arg !== '--prod' && arg !== '--dev') {
console.log('Invalid argument!'); console.log('Invalid argument!');
} }

View File

@@ -14,6 +14,7 @@ module.exports = {
await interaction.deferReply({ ephemeral: true }); await interaction.deferReply({ ephemeral: true });
const user = interaction.user;
const message = interaction.message; const message = interaction.message;
const embed = message.embeds[0]; const embed = message.embeds[0];
const accepted = await waitinglist.find() const accepted = await waitinglist.find()
@@ -50,12 +51,16 @@ module.exports = {
title: embed.title, title: embed.title,
description: embed.description, description: embed.description,
color: embed.color, color: embed.color,
footer: embed.footer, footer: {
text: "Last updated by " + user.username,
icon_url: user.avatarURL(),
},
thumbnail: embed.thumbnail, thumbnail: embed.thumbnail,
fields: fields, fields: fields,
timestamp: new Date(),
}], }],
}); });
await interaction.editReply({ content: 'Updated the waiting list', ephemeral: true }); await interaction.editReply({ content: 'Updated the waiting list', ephemeral: true });
} }
} }