The command is executed, although the terminal says the command doesn't exist. Not sure what's up as this is my first discord bot, I know a little bit of python, so I am sorry for taking up your guys's time, really.
Thank you for the help though!
import discord from discord.ext import commands bot = commands.Bot(command_prefix= ':') game = discord.Game("with the API") #list of banned words filtered_words = ['Nigger', 'Whore', 'faggot'] @bot.event async def on_ready(): print("Hello I am online and ready!") bot.run('token') #Group message clearing @bot.command(aliases=['c']) @commands.has_permissions(manage_messages = True) async def clear(ctx, amount=1): await ctx.channel.purge(Limit = amount) await ctx.reply(f'Deleted {clear} messages') #auto mod @bot.event async def on_message(msg): for word in filtered_words: if word in msg.context: await msg.delete() await bot.process_commands(msg) @bot.event async def on_disconnect(): print("I seem to be getting disconnected, one minute!") @bot.event async def on_member_join(memeber): print(f'Weclome {memeber} to the server, please enjoy your stay!') @bot.event async def on_message_delete(msg): msg.send(" <:raysQ:835686467844964395> ") https://stackoverflow.com/questions/67249171/doesnt-seem-like-my-command-is-working-in-discord-py April 25, 2021 at 10:20AM
没有评论:
发表评论