fix interaction acknowledged bug

This commit is contained in:
SowinskiBraeden committed 2022-05-22 10:10:19 -07:00
1 parent ec0096cdd3
commit f7b8d06bd1
3 files changed
+10 -10

No files matched your search

+8 -2
View File
@@ -48,7 +48,10 @@ module.exports = {
// If panic is disabled, enable panic
} else {
client.forceUpdateStatus(message.channel, message.author.id, 'Panic');
let user = await client.dbo.collection("users").findOne({"user.discord.id":message.author.id}).then(user => user);
if (!user) return message.channel.send(`You are not logged in.`);
if (user.user.activeCommunity==null) return message.channel.send(`You must join a community to use this command.`);
client.forceUpdateStatus('Panic', user);
let req = {
userID: user._id,
@@ -106,7 +109,10 @@ module.exports = {
return;
// If panic is disabled, enable panic
} else {
client.forceUpdateStatus(interaction, interaction.member.user.id, 'Panic');
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user);
if (!user) return interaction.send(`You are not logged in.`);
if (user.user.activeCommunity==null) return interaction.send(`You must join a community to use this command.`);
client.forceUpdateStatus('Panic', user);
let req = {
userID: user._id,