Red-discordbot: AttributeError: '<class '__main__.Bot'>' object has no attribute 'bot'

Created on 17 Oct 2018  路  6Comments  路  Source: Cog-Creators/Red-DiscordBot

Hello everyone,

I have the following issue with my bot:

When I try to use the command: !bank than the bot is giving out the following:

!bank
Bank operations
Commands:
  balance  Shows balance of user.
  register Registers an account at the Twentysix bank
  reset    Deletes all server's bank accounts
  set      Sets credits of user's bank account. See help for more operations
  transfer Transfer credits to other users
Type !bank command for more info on a command.
You can also type !bank category for more info on a category.
Error in command 'bank'. Check your console or logs for details.



md5-04c35f411d26e045a954fe1aef010a29



Traceback (most recent call last):
  File "lib/discord/ext/commands/core.py", line 50, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "/root/WhatsMyName/cogs/economy.py", line 305, in _bank
    await send_cmd_help(ctx)
  File "whatsmyname.py", line 132, in send_cmd_help
    await self.bot.say("I've just sent you a PM!"
  File "lib/discord/client.py", line 296, in __getattr__
    raise AttributeError(msg.format(self.__class__, name))
AttributeError: '<class '__main__.Bot'>' object has no attribute 'bot'

I don't know how to fix the issues, who are occurring above.

Most helpful comment

We do not deal with issues caused by modifications of the original code. Open a new issue if you encounter a problem that's reproducible on a default installation.
We would also appreciate if you'd keep the credits of the original authors and do not claim to have made the bot yourself.

All 6 comments

Did you rename a file to whatsmyname.py ?

Did you rename a file to whatsmyname.py ?

I just made a copy of "red.py" and simply edited it 馃檪 I didn't change any of the code, just named everything from "Red" to "WhatsMyName".

EDIT: I only renamed everything who isn't important to start up

This error doesn't occur without the modifications you've made. We cannot help you if you edit the code, please revert your changes if you would like to fix it.

I've just looked through the "whatsmyname.py" and I just changed following:

line 27: description = "WhatsMyName - A Discord bot made with <3 by TivogGaming"

and

line 297: print("WhatsMyName - Discord Bot")

Okay, nvm. Got it self ;)

We do not deal with issues caused by modifications of the original code. Open a new issue if you encounter a problem that's reproducible on a default installation.
We would also appreciate if you'd keep the credits of the original authors and do not claim to have made the bot yourself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonyroda97 picture jonyroda97  路  5Comments

Dav-Git picture Dav-Git  路  4Comments

clovisd picture clovisd  路  3Comments

Fozar picture Fozar  路  4Comments

IdkGoodName picture IdkGoodName  路  3Comments