So i'm trying to make a /setup (channel1) (channel2) command. But when I run the code ctx.message returns None.
Here's my code:
import random, SendEmail, json, discord
from discord.ext import commands
from pprint import pprint
Intents = discord.Intents.default()
Intents.members = True
Intents.messages = True
client = commands.Bot(intents=Intents)
@client.event
async def on_ready():
print(f'Logged on as {client.user}')
@client.slash_command(name="setup",guild_ids=[my guild id is really here])
async def setup(ctx):
pprint(vars(ctx))
print(ctx.message)
await ctx.respond("Slash commands was executed")
if __name__ == "__main__":
key = json.load(open('botToken.json','r'))['token']
client.run(key)