This commit is contained in:
parent
4d18a90049
commit
5e861e3c8e
4
index.js
4
index.js
|
@ -837,7 +837,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
interaction.reply({ content: "Failed to subscribe to room", ephemeral: true });
|
interaction.reply({ content: "Failed to subscribe to room", ephemeral: true });
|
||||||
} else if (row) {
|
} else if (row) {
|
||||||
return interaction.reply({ content: `Already subscribed to \`${getWFOByRoom(room).location}\`\nIf you want to update a subscribtion, please unsubscribe and resubscribe. This will be made a command eventually.`, ephemeral: true });
|
return interaction.reply({ content: `Already subscribed to \`${getWFOByRoom(room).location}\`\nIf you want to update a subscription, please unsubscribe and resubscribe. This will be made a command eventually.`, ephemeral: true });
|
||||||
}
|
}
|
||||||
db.run(`INSERT INTO channels (channelid, iemchannel, custommessage, filter, filterEvt, minPriority) VALUES (?, ?, ?, ? ,? ,?)`, [interaction.channel.id, room, message, filter, filterEvt, minPriority], (err) => {
|
db.run(`INSERT INTO channels (channelid, iemchannel, custommessage, filter, filterEvt, minPriority) VALUES (?, ?, ?, ? ,? ,?)`, [interaction.channel.id, room, message, filter, filterEvt, minPriority], (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -857,7 +857,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
interaction.reply({ content: "Failed to subscribe to room", ephemeral: true });
|
interaction.reply({ content: "Failed to subscribe to room", ephemeral: true });
|
||||||
} else if (row) {
|
} else if (row) {
|
||||||
return interaction.reply({ content: `Already subscribed to \`${getWFOByRoom(room).location}\`\nIf you want to update a subscribtion, please unsubscribe and resubscribe. This will be made a command eventually.`, ephemeral: true });
|
return interaction.reply({ content: `Already subscribed to \`${getWFOByRoom(room).location}\`\nIf you want to update a subscription, please unsubscribe and resubscribe. This will be made a command eventually.`, ephemeral: true });
|
||||||
}
|
}
|
||||||
db.run(`INSERT INTO userAlerts (userid, iemchannel, custommessage, filter, filterEvt, minPriority) VALUES (?, ?, ?, ? ,?, ?)`, [interaction.user.id, room, message, filter, filterEvt, minPriority], (err) => {
|
db.run(`INSERT INTO userAlerts (userid, iemchannel, custommessage, filter, filterEvt, minPriority) VALUES (?, ?, ?, ? ,?, ?)`, [interaction.user.id, room, message, filter, filterEvt, minPriority], (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Loading…
Reference in a new issue