I'm trying to use bot commands in discord so I can start using the bot prefix. I tried using ctx, but from the code that I have written, when I use .ping, it returns nothing. Anyone got any idea why?
import discord
from discord.ext import commands
client = discord.Client()
bot = commands.Bot(command_prefix= ".")
@client.event
async def on_ready():
print("Logged in") #login message
@bot.command(pass_context = True) #trying to get "test" to return from .ping
async def ping(ctx):
await ctx.channel.send("test")
@client.event
async def on_message(message):
if message.author == client.user: #testing the bot actually responds to something
return
if message.content.startswith("Hello"):
await message.channel.send("Hi")
client.run('#bot token here')

Just use simple
ctx.send, it's common for commands,