0

https://www.reddit.com/r/Discord_selfbots/comments/tczprx/comment/i0ine4d/?utm_source=share&utm_medium=web2x&context=3

I get an error similar to this

my code is as follows

def slashCommandTest(resp,guildID,channelID,botID):
    if resp.event.ready_supplemental:
        bot.gateway.request.searchSlashCommands(guildID,limit= 10,query ="bump")
    if resp.event.guild_application_commands_updated:
        bot.gateway.removeCommand(slashCommandTest)
        slashCmds = resp.parsed.auto()['application_commands'] #get the slash cmds
        s = SlashCommander(slashCmds, application_id=botID) #for easy slash cmd data creation
        data = s.get(['bump'])
        bot.triggerSlashCommand(botID, channelID=channelID, guildID=guildID, data=data, sessionID=bot.gateway.session_id) #and send it off
        bot.gateway.close() #optional. It's better to remove this line actually.

guildID = '740499963967963197'
channelID = '920589459349717053'
botID = "302050872383242240"
bot.gateway.command(
    {
        "function": slashCommandTest,
        "params": {"guildID": guildID, "channelID": channelID, "botID": botID }


    }
)

bot.gateway.run()

the error is as follows

<function slashCommandTest at 0x000002BF7FCCBBE0> not found in _after_message_hooks.

I expected my user with the token put to do the /bump command however it doesnt do that. I have compared my code with the example but i cannot spot my error it gave the same error again.

0 Answers0