#Help Needed
1 messages · Page 1 of 1 (latest)
Hey, have you enabled this setting in dev portal?
After that, you also need to send intents when you open a connection to Discord.
intents=true
is added in the code
Are you using some specific library for handling Discord gateway?
Generally purely setting it to true won't do anything, unless some library that you use does some magic behind this setting.
ouh
https://discordpy.readthedocs.io/en/stable/quickstart.html#a-minimal-bot
Heres example how to set intents
Basically for it to receive message_content as example, you do:
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)
ive set that 👍
Instead of "true"?
it is true
Alright, thought you set true in different place.
Generally best would be to post code here, otherwise it's hard to debug.
its a lot of folders
def init(self, *args, **kwargs): # Fix typo: *arg -> *args
intents = discord.Intents.all()
intents.presences = True
intents.members = True
super().init(command_prefix=self.get_prefix,
case_insensitive=True,
intents=intents,
status=discord.Status.do_not_disturb,
strip_after_prefix=True,
owner_ids=OWNER_IDS,
allowed_mentions=discord.AllowedMentions(
everyone=False, replied_user=False, roles=False),
sync_commands_debug=True,
sync_commands=True,
shard_count=2)
self.lavalink: Client = None
here you go
Alright, and how do you handle non slash commands?
Yes, but are you parsing this all in on_message event?
Functionality of normal commands is separate from slash commands.
yea , as i said before , slash commands are working , but the bot isnt responding when using prefix commands , mentioning the bot
async def on_message(self, message):
if message.author.bot:
return
ctx = await self.get_context(message, cls=Context)
await self.invoke(ctx)
this is my on message block
And you are handling these commands this way as example?
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
Hm
Hmm, I see. I guess without more code, I personally cannot correctly guess what could be the cause as I don't know how your bot is structured.
its on github
where is it on github?
https://github.com/darknight156/CypherMain
i fixed the databse file acccess issue locally, rest the code is same
Alright, just to check, can you make get_prefix function simply return some hardcoded prefix without checking database and all, and see if it works?
k i can do that
You can even make it simply init(command_prefix=".")
Without touching the function itself
okk
hi I can help u
thanks , the project is on github , idk where the error is , it would be helpful , if u find that for me
hi
hello my name is siddhant i am from india and i want to prepare for gsoc 2026 and currently i know only basic python that also not properly and i want to pursue deep learning what should be my furthur steps
