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


Messages In This Thread
Discord bot not responding to command [New User] - by Alabaster - May-20-2018, 06:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu BillKochman 13 923 Apr-24-2024, 05:47 AM
Last Post: Bronjer
  elif not responding on print EddieG 3 877 Jul-20-2023, 09:44 PM
Last Post: Pedroski55
  Pygame Rect Not Responding SomebodyImportant 1 1,543 May-02-2021, 01:27 PM
Last Post: BashBedlam
  IDLE stops responding upon saving tompi1 2 1,947 Oct-01-2020, 05:44 PM
Last Post: Larz60+
  Code is not responding abhishek81py 0 1,498 Jul-07-2020, 12:40 PM
Last Post: abhishek81py
  Sublime text not responding Mat 1 1,977 Mar-23-2020, 11:42 AM
Last Post: Fre3k
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 3,565 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy
  IDLE not responding (Mac) Selinal 1 2,973 Aug-05-2019, 10:27 PM
Last Post: Larz60+
  Client Server Game Pygame not responding Damien 2 3,152 Aug-04-2018, 06:19 PM
Last Post: micseydel
  [Discord.py] Bot not responding? Ouindoze 2 10,113 Oct-10-2017, 01:35 AM
Last Post: Ouindoze

Forum Jump:

User Panel Messages

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