Answer the question
In order to leave comments, you need to log in
Discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'id'?
Discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'id'?
The code:
import discord
from discord.ext import commands
from discord_slash import SlashCommand
from discord_slash.utils.manage_commands import create_option
client = commands.Bot(command_prefix = '.', intents = discord.Intents.all())
slash = SlashCommand(client, sync_commands = True)
@slash.slash(name = 'mko', description = 'добавить в мко', options = [{"name": "member", "description": "пользователь", "type": 6, "requied": True}], guild_ids = [907669402181316638])
@client.command(aliase = ['mko'])
async def mko(ctx, member: discord.Member, pass_context=True):
await member.add_roles("907678577758203915")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question