Set Permissions

This commit is contained in:
Skylar Grant 2023-02-17 08:35:06 -05:00
parent cd0c088c4e
commit 89cfe42b9c
5 changed files with 8 additions and 5 deletions

View File

@ -627,7 +627,6 @@ const functions = {
collector.on('collect', message => {
if (message.embeds.length == 0) return;
guildInfo = client.guildInfos.get(guild.id);
console.log(message.embeds);
if (message.embeds[0].data.description.includes(strings.notifications.water)) {
this.sendWaterReminder(guildInfo, guildInfo.waterMessage, guildInfo.reminderChannelId, guild);
} else if (message.embeds[0].data.description.includes(strings.notifications.fruit)) {

View File

@ -4,7 +4,8 @@ const fn = require('../modules/functions.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('reset')
.setDescription('Reset all message assignments in your server'),
.setDescription('Reset all message assignments in your server')
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
execute(interaction) {
interaction.deferReply({ ephemeral: true }).then(() => {
fn.reset(interaction.guildId).then(res => {

View File

@ -13,7 +13,8 @@ module.exports = {
.addRoleOption(o =>
o.setName('fruitrole')
.setDescription('The role for fruit alert pings')
.setRequired(false)),
.setRequired(false))
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles),
async execute(interaction) {
await interaction.deferReply().catch(err => console.error(err));
if (interaction.client.guildInfos.has(interaction.guildId)) {

View File

@ -14,7 +14,8 @@ module.exports = {
.addChannelOption(o =>
o.setName('leaderboardchannel')
.setDescription('If your leaderboard isn\'t in the same channel, where is it?')
.setRequired(false)),
.setRequired(false))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
async execute(interaction) {
await interaction.deferReply({ ephemeral: true });
/**/

View File

@ -4,7 +4,8 @@ const fn = require('../modules/functions.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('setupinfo')
.setDescription('View information about how the bot is set up in your server'),
.setDescription('View information about how the bot is set up in your server')
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
async execute(interaction) {
await interaction.deferReply({ ephemeral: true }).catch(err => console.error(err));
try {