If you want to check if that the person using a command is an owner or developer of the bot, first you will need to set their ID as owner_id
when you instance the bot:
bot = commands.Bot(command_prefix = '!', owner_id = 123345219197488900, intents = intents)
In case you are a group of developers and want to set more than one as owner_ids
:
owners = [123345219197488900, 173545269197488974, 253345719197888931]
bot = commands.Bot(command_prefix = '!', owner_ids = set(owners), intents = intents)
Then you can use a command check to ensure that the user using this command is an owner.
@commands.command(pass_context=True)
@commands.is_owner()
async def shutdown(self, ctx):
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…