#Cannot use slash commands if i dont have administrator permissions.

1 messages · Page 1 of 1 (latest)

warm rampart
#
import nextcord
from nextcord.ext import commands
import apikeys
import aiohttp
import os

intents = nextcord.Intents.default()
intents.message_content = True
intents.members = True
bot = commands.Bot(command_prefix='!', intents=intents)

@bot.event
async def on_ready():
    await bot.change_presence(status=nextcord.Status.do_not_disturb)

    print(f"Logged in as {bot.user}")
    print("The bot is now ready for use!")
    print("-----------------------------")

@bot.slash_command(name="shutdown", description="Shuts down the bot.")
async def shutdown(interaction: nextcord.Interaction):
    await interaction.send("Shutting down bot...")
    await bot.close()
    await aiohttp.ClientSession().close()

initial_extension = []

for filename in os.listdir('./cogs'):
    if filename.endswith('.py'):
        initial_extension.append("cogs."+ filename[:-3])
        
if __name__ == "__main__":
    for extension in initial_extension:
        bot.load_extension(extension)

bot.run(apikeys.bot_token)```
random hedge
#

elaborate on normal perms

#

and more context

warm rampart
#

people who dont have administrator

#

@random hedge

leaden dock
#

If you are trying to lock it add a check for perms in user that sent interaction.

If you are wondering why it doesn't work with "normal perms" check if @everyon has the following perms enabled in that channel/guild/role

#

It needs to be one to run bot commands

#

If it's off they can run the /comand

warm rampart
#

But members still cannot see them

random hedge
random hedge
warm rampart
#

members cannot see any slash command

random hedge
#

as alternative for testing, add bot to a different new server and see if commands are visible there

warm rampart
#

like an override

leaden dock
random hedge
leaden dock
leaden dock
warm rampart
leaden dock
#

Temperley yes