Arfath Yahiya
Arfath Yahiya

Reputation: 179

Discord bot throws the error saying You are not the owner

So i have this code running and for some reason it raises the error
Code:

@command(name="sendupdate", aliases=["su"], hidden=True)
@is_owner()
async def send_bot_update(self, ctx, *, msg):
    pass

Error:

raise NotOwner('You do not own this bot.')
discord.ext.commands.errors.NotOwner: You do not own this bot.

When checked by running the following code which returns the it's info:

info = await self.bot.application_info()

The owner is me and i'm using the commad from same acc where i created the bot

Upvotes: 0

Views: 617

Answers (1)

Supreme1707
Supreme1707

Reputation: 178

You might have specified a different owner id in the bot constructor. If not, try specifying it explicitly.

bot = commands.Bot(command_prefix="your_prefix", owner_id=your_id_here)

This should work.

Upvotes: 1

Related Questions