discord.py "NameError: name 'has_permissions' is not defined"
# Make sure you import 'commands'
from discord.exp import commands
# Also try to put your "@has_permissions" starts with "commands."
@commands.has_permissions(administrator=True)
async def function(ctx, prefix):
pass