Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dict problem
#3
Ok, I will do that once I get back to my pc, thank you.

Here is the code with the error, it says the error is at line 38/37
 @bot.commands(pass_context=True)
async def cr(ctx, msgId, user: discord.Member):
    msg = await bot.get_message(ctx.message.channel, msgId)
    await bot.clear_reactions(msg)
    await bot.say("A message's reactions have been removed by {}".format(user.name)) 

Line 37/38 is Line 1/2 for you guys

And here is the Traceback message in cmd prompt:

"Traceback (most recent call last):
File "C:\Users\Sol\Desktop\Bots on Discord\JayBot\test.py", line 38, in <module>
@bot.commands(pass_context=True)
TypeError: 'dict' object is not callable
Unclosed client session"

FIXED!!!!!! I had but @bot.commands, it is supposed to be @bot.command IT'S NOW FIXED
Reply


Messages In This Thread
dict problem - by Sol - Feb-04-2018, 06:51 PM
RE: dict problem - by j.crater - Feb-04-2018, 06:57 PM
RE: dict problem - by Sol - Feb-04-2018, 06:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sort a dict in dict cherry_cherry 4 100,959 Apr-08-2020, 12:25 PM
Last Post: perfringo
  dict problem with if Adem 3 2,362 Sep-22-2019, 06:38 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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