hide non allowed channel warning messages
This commit is contained in:
14 files changed
+14
-14
No files matched your search
+1
-1
@@ -53,7 +53,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const missing = !GuildDB.dispatchChannel && !GuildDB.dispatcherRole
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const missing = !GuildDB.dispatchChannel && !GuildDB.dispatcherRole
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
let banking = await client.dbo.collection("banks").findOne({"banking.userID": interaction.member.user.id}).then(banking => banking);
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
if (GuildDB.allowedChannels.length == 0) {
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
if (!GuildDB.officerRole) {
|
||||
|
||||
@@ -143,7 +143,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
let inventory = await client.dbo.collection("inventories").findOne({"inventory.userID": interaction.member.user.id}).then(inventory => inventory);
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus && !GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
if (args[0].name == 'list') {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const actionEmbed = new EmbedBuilder()
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
if (GuildDB.onlyOfficersSearch && !client.exists(GuildDB.officerRole)) {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const userID = interaction.member.user.id;
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
let inventory = await client.dbo.collection("inventories").findOne({"inventory.userID": interaction.member.user.id}).then(inventory => inventory);
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
if (GuildDB.incomeRoleStatus) {
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.`, flags: (1 << 6) });
|
||||
}
|
||||
|
||||
const hasWorkRole = GuildDB.incomeRoles.some(data => {
|
||||
|
||||
Reference in new issue
Block a user