#I can't update my commands!

4 messages · Page 1 of 1 (latest)

unkempt talon
#

Please help me.

#

`import disnake
from disnake.ext import commands
import sqlite3
import random

intents = disnake.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix="/", intents=intents)

Global slash command definitions

global_commands = [
disnake.SlashCommand(name="points", description="View your own points."),
disnake.SlashCommand(name="addpoints", description="Add points to a user."),
disnake.SlashCommand(name="removepoints", description="Remove points from a user."),
disnake.SlashCommand(name="change_status", description="Change the bot's status."),
disnake.SlashCommand(name="say", description="Make the bot say something in the current channel."),
disnake.SlashCommand(name="best", description="Shows one of 30 reasons why serg is the best deputy director."),
#more
]

Function to register global slash commands

async def register_global_commands():
await bot.wait_until_ready() # Make sure bot is ready before registering commands
await bot.bulk_upsert_global_commands(global_commands)

@bot.event
async def on_ready():
print("Bot is ready.")
await register_global_commands()

`

#

That's the start of my code

#

And I get this error: