#๐Ÿ”’ Encountering problems with the name attribute

12 messages ยท Page 1 of 1 (latest)

distant radish
#

Currently, I'm making a discord moderation bot with AI-powered auto-moderation using discord.py version 4.2.1 and google-generativeai version 0.5.4 .Currently, the bot has two commands, /ping and /activateautomod. Whenever I use the /activateautomod command, the bot doesn't respond and the console throws up an exception.
Bot code:
https://paste.pythondiscord.com/FRCQ
Exception message:
https://paste.pythondiscord.com/FH5A

broken ploverBOT
#

@distant radish

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

past cargo
#

you are usually supposed to use Bot.get_channel or Bot.fetch_channel

#

!d discord.ext.commands.Bot.get_channel

broken ploverBOT
past cargo
#

and as of your custom channel model, you can probably just wrap the channel around with it, but I'm not sure:

channel = bot.get_channel(id)
custom_channel = AutomodChannel(channel)```
distant radish
#

hmm, but how'd i do it?

past cargo
distant radish
#

!close

broken ploverBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.