How to Make My Discord Bot Send a Message When a Specific User Plays a Specific Game

How do i make a bot that responds to one specific user? Discord.py

You could simply just check if the user's id is same from your code. Below is an on_message that checks if the author of the message has the user id of xxx make sure to set it yourself. This would always trigger the event whenever a message has been sent, but only send the message if the user id matches

@client.event
async def on_message(message):

if message.author.id == 000000000000:
await message.channel.send('Hello')

Next time it's best if you show an example of what you have tried, so we can fix or show examples of your code.

DiscortJS bot send a message back on the channel mentioning a specific user

I think mention is an array of users. So you can do:

for (const user of mention) {
message.channel.send('YUB NUB!! YUB NUB!! Grrrrr!! @' + user.username)
}

I want my discord bot to respond if a specific message is coming from a specific user

Make sure to add this at the very end

*await client.process_commands(message)*

Example:

@client.event   
async def on_message(message):

if message.author == client.user:
return
if client.user.mentioned_in(message):
await message.channel.send("hey!")
await client.process_commands(message)

How do i send a message in a specific channel when my bot start

Instead of using client.getchannel which doesn't exist, use Client.get_channel. It returns a channel which can be used to send messages.
Example:

channel = client.get_channel(id)
await channel.send("hi i've started")

how to make a discord bot mention someone in a specific channel (discord.js)

Well first you would need to get the channel somehow, maybe by id:

const endChannel = message.guild.channels.cache.get(id);

After that you can just use the send method alongside msg.author

endChannel.send(`${message.author} here's the ending`, { embed: B3ending });


Related Topics



Leave a reply



Submit