Grr, Await
This commit is contained in:
parent
19b15f3572
commit
1095537b34
2
index.js
2
index.js
|
|
@ -1427,7 +1427,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
let output = "Dev Test Started:\n";
|
let output = "Dev Test Started:\n";
|
||||||
await interaction.reply({ content: output, ephemeral: true });
|
await interaction.reply({ content: output, ephemeral: true });
|
||||||
//1. Add current channel to db with a fake room (discordtest)
|
//1. Add current channel to db with a fake room (discordtest)
|
||||||
db.run(`INSERT INTO channels (channelid, iemchannel) VALUES (?, ?)`, [interaction.channel.id, "discordtest"], (err) => {
|
db.run(`INSERT INTO channels (channelid, iemchannel) VALUES (?, ?)`, [interaction.channel.id, "discordtest"], async (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
await interaction.editReply({ content: output + "Failed to add channel to database.", ephemeral: true });
|
await interaction.editReply({ content: output + "Failed to add channel to database.", ephemeral: true });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue