generated from Baipyrus/DiscordJS-Template
clean up: consistency and ease of use
This commit is contained in:
parent
30f3a97cc3
commit
57cc53ba99
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user