Added check to see if the user sending ping is itself

- This will be important to figure out who is a bot
This commit is contained in:
Logan Cusano
2022-02-18 20:54:17 -05:00
parent 01bf1d8a91
commit 15cfa5bf94

3
bot.py
View File

@@ -75,7 +75,8 @@ class Bot(commands.Bot):
# Test command to see if the bot is on (help command can also be used)
@self.command(help="Use this to test if the bot is alive", brief="Sends a 'pong' in response")
async def ping(ctx):
await ctx.send('pong')
if ctx.author.id != self.user.id:
await ctx.send('pong')
# Command to join the bot the voice channel the user who called the command is in
@self.command(help="Use this command to join the bot to your channel",