clean up: consistency and ease of use

This commit is contained in:
Baipyrus 2024-04-04 20:22:28 +02:00
parent 30f3a97cc3
commit 57cc53ba99

View File

@ -196,7 +196,7 @@ export async function execute(interaction) {
if (createNew) { if (createNew) {
try { try {
// Create guild if not exists // Create guild if not exists
const guildData = { id: interaction.guild.id }; const guildData = { id: interaction.guildId };
await Guilds.findOrCreate({ await Guilds.findOrCreate({
where: guildData, where: guildData,
defaults: guildData defaults: guildData
@ -205,7 +205,7 @@ export async function execute(interaction) {
// Create database entry // Create database entry
await Messages.create({ await Messages.create({
id, id,
guild: interaction.guild.id guild: interaction.guildId
}); });
} catch (error) { } catch (error) {
console.error(error); console.error(error);