Python Forum
Discord bot not responding to command [New User]
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discord bot not responding to command [New User]
#1
I figured that I would give Python a shot by writing a Discord bot.
The Load command is giving me trouble; it refuses to run, even though I recall it functioning the night I had started scripting, about two days ago.
The console doesn't display any errors, and nothing I've tried has worked.
import discord
import random
from discord import Game
from discord.ext.commands import Bot

BOT_PREFIX = ">"
LOAD_PREFIX = "LOAD"
TOKEN = "[REDACTED]"
GAME = "with Specimen-07"

client = Bot(command_prefix=BOT_PREFIX)

#Display information for PROMETHEUS
@client.event
async def on_ready():
    await client.change_presence(game=Game(name=GAME))
    print("PROMETHEUS unit is now online")

#Help Command
@client.event
async def on_message(message):
    if message.content.upper().startswith(BOT_PREFIX + "HELP"):
        userID = message.author.id
        await client.send_message(message.channel, "<@%s> ```Instructions sent to Personal Communications.```" % (userID))
        await client.send_message(message.author, """```TEST```""")
    
#CURRENTLY UNDER DEVELOPMENT BUT I THINK IM GETTING THE HANG OF THIS
@client.command(name="Load",
                aliases=["load", "LOAD"])
async def Load(category):
    if category():
        await client.say(message.channel, """```TEST```""")
    elif category("SDATA", ):
        await client.say(message.channel, """```TEST```""")
    elif category("ADATA"):
        await client.send_message(message.channel, """```TEST```""")


client.run(TOKEN)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  elif not responding on print EddieG 3 821 Jul-20-2023, 09:44 PM
Last Post: Pedroski55
  Help discord bot Edward 0 2,059 Sep-15-2022, 09:55 PM
Last Post: Edward
  Discord Bot Dark_Sovereign_193 0 32,329 Jun-03-2021, 03:24 PM
Last Post: Dark_Sovereign_193
  Pygame Rect Not Responding SomebodyImportant 1 1,478 May-02-2021, 01:27 PM
Last Post: BashBedlam
  Discord Bot Help Oshadha 0 1,383 Jan-26-2021, 04:23 PM
Last Post: Oshadha
  IDLE stops responding upon saving tompi1 2 1,888 Oct-01-2020, 05:44 PM
Last Post: Larz60+
  Code is not responding abhishek81py 0 1,471 Jul-07-2020, 12:40 PM
Last Post: abhishek81py
  Sublime text not responding Mat 1 1,929 Mar-23-2020, 11:42 AM
Last Post: Fre3k
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 3,515 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy
  IDLE not responding (Mac) Selinal 1 2,922 Aug-05-2019, 10:27 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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