#my slash command is not showing up yet there is no problem in the code.....

1 messages · Page 1 of 1 (latest)

daring idol
#
choose = random.choice([one, two, three])

embed = discord.Embed()
embed.set_image(url="attachment://"+random.choice(["1.png","2.png","3.png"]))

bot.slash_command(name = "aww", description = "sends a cute picture.... Which one tho??? (most likely a dog picture)")
async def aww(ctx, guild: discord.guild):
    await guild.channel.send(file = choose, embed=embed)




daring idol
#

oh

#

well thats the problem

mossy ore
fiery surge
#

lol

daring idol
#

i got this error:

issubclass() arg 1 must be a class
  File "C:\Users\Nico Spina\Downloads\32oz (discord bot)\bot.py", line 172, in <module> (Current frame)
    @bot.slash_command(name = "aww", description = "sends a cute picture.... Which one tho??? (most likely a dog picture)")
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class```
#

it is a class i think

fiery surge
#

wait

#

what is your file name of the main file?

daring idol
#

of the program or the files for the pictures

fiery surge
#

The file name

daring idol
#

which one

fiery surge
#

the current one

daring idol
#

the program file name is bot.py

fiery surge
daring idol
#

to what

fiery surge
daring idol
#

its the only file

fiery surge
#

thats why

#

change the name to something else

daring idol
#

and it gave the error

mossy ore
#

girl just name it main

#

why 32oz

daring idol
#

ok ok

#

i did and the error:

Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: <module>)
issubclass() arg 1 must be a class
File "C:\Users\Nico Spina\Downloads\32oz (discord bot)\main.py", line 172, in <module> (Current frame)
@bot.slash_command(name = "aww", description = "sends a cute picture.... Which one tho??? (most likely a dog picture)")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class

fiery surge
#

can you show the pip list pls?

daring idol
#

nothing is making it bad

#

do you have any idea how i could fix it?

fiery surge
#

try it with uninstalling and reinstalling py-cord

daring idol
#

other commands work

fiery surge
#

that is weird then

daring idol
#

well did

#

before this error came along

fiery surge
#

Can you show the command which one is not working?

daring idol
#

i cant becuase it gives the error when i pless play

#

actually it happened after i updated the python extension and some other python isort thing

daring idol
#

idk why it says subclass need to be class when it is

#

i fixed it

#

its because discord.guild not discord.Guild