#I'm not understanding this error. I've done it this way before?

1 messages · Page 1 of 1 (latest)

fickle sentinel
#

I'm trying to get it to initiate the function based off the option chosen. I believe that I have set it up this way before and it worked fine, but then again I could be wrong on a part or two. Thanks.

molten root
#

Self is implied and should not be passed, it will always be the first positional argument in a class function 🙂

fickle sentinel
#

ok but when I do self.list_all_roles(inter) I get an allocation error

molten root
#

Show it please 🙂

fickle sentinel
#
/home/mekasu/Documents/GitHub/GawtherBot/cogs/developers/roles.py:27: RuntimeWarning: coroutine 'RoleCommands.list_all_roles' was never awaited
  self.list_all_roles(inter)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
#

and if I leave self in the parameters, but remove it from the functions prefix, then I get the function is undefined

molten root
#

You need to await all async functions

#

so await self.list_all_roles(inter)

fickle sentinel
#

I very much appreciate it ❤️ you have solved my problem 😄