fix interaction send not in comm

This commit is contained in:
SowinskiBraeden committed 2022-05-10 11:42:53 -07:00
1 parent 8e80c38255
commit 7ab1b78de1
1 file changed
+1 -1
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = {
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user); 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) return interaction.send(`You are not logged in.`);
if (user.user.activeCommunity==null) return message.channel.send(`You are not in a community.`); if (user.user.activeCommunity==null) return interaction.send(`You are not in a community.`);
let community = await client.dbo.collection("communities").findOne({_id:ObjectId(user.user.activeCommunity)}).then(community => community); let community = await client.dbo.collection("communities").findOne({_id:ObjectId(user.user.activeCommunity)}).then(community => community);
if (!community) return interaction.send(`Community not found.`); if (!community) return interaction.send(`Community not found.`);
return interaction.send(`You are in the community \`${community.community.name}\``); return interaction.send(`You are in the community \`${community.community.name}\``);