Python Forum
Discord bot not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discord bot not working
#1
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
import discord
from discord.ext import commands

client = commands.Bot(command_prefix= '.')

Token = 'mytoken'

@client.event
async def on_ready():
    print('Bot is ready.')

@client.command()
async def embedt(ctx):

    embed = discord.Embed(
        title='Restocked!',
        description='The Jordan 11 Bred just restocked on JD Sports',
        colour=discord.Colour.purple()
    )

    embed.set_footer(text='Fenix')
    embed.set_image('a picture')
    embed.set_thumbnail('a picture')
    embed.set_author(name='Fenix Restocks', icon_url='a picture')
    embed.add_field(name='Link', value='url')

    await ctx.send(embed=embed)


client.run(Token)
Error:
Ignoring exception in command None: discord.ext.commands.errors.CommandNotFound: Command "embedt" is not found
So when I run this file everything works. But as soon as I send the command '.embedt' trough discord, the bot gives the error that it could'nt find the command. But my command is embedt right? ->
 async def embedt(ctx): 
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020