My bot can run but don't reply anything.
It shows up it is online but if I input !$help
, it doesn't show up anything.
The (token)
here will be replaced by the real token.
This is my code:
import discord
#import io
import random
#import textwrap
#import urllib
#import aiohttp
#import datetime
#import os
from discord.ext import commands
from itertools import cycle
from webserver import keep_alive
client = commands.Bot(command_prefix = "!$", case_insensitive=True, help_command = None)
token = "(token)"
keep_alive()
@client.event
async def on_ready():
print('Ready, Set, Gooooooo')
await client.change_presence(activity=discord.Game(name="Your Server"))
@client.command()
async def help(ctx=None):
embed = discord.Embed(
title="Help Index",
description="Got lost? These might help you",
color=discord.Color.purple()
)
embed.add_field(name="Official Website", value="https://miracle-dev.netlify.app/", inline=True)
embed.add_field(name="List of commands", value="https://miracle-dev.netlify.app/commands.html", inline=True)
embed.add_field(name="Support Server", value="https://discord.com/invite/Ct7fsP627U", inline=True)
await ctx.send(embed=embed)
client.run(token)
status = cycle(['Miracle', 'CreateByVio'])
It doesn't have any error code
CodePudding user response:
Try replacing the ctx=None
argument with just ctx
.
@client.command()
async def help(ctx):
embed = discord.Embed(
title="Help Index",
description="Got lost? These might help you",
color=discord.Color.purple()
)
embed.add_field(name="Official Website", value="https://miracle-dev.netlify.app/", inline=True)
embed.add_field(name="List of commands", value="https://miracle-dev.netlify.app/commands.html", inline=True)
embed.add_field(name="Support Server", value="https://discord.com/invite/Ct7fsP627U", inline=True)
await ctx.send(embed=embed)