SammyTM
SammyTM

Reputation: 11

Reply to message without pinging

How do I make my bot reply to a message without pinging the author? I know how to make it reply but I don't know how to make it avoid pinging the author. This is what I tried, but it didn't work:

ctx.reply, mention (ctx.author)= False

Upvotes: 1

Views: 3860

Answers (3)

OffableGamer870
OffableGamer870

Reputation: 25

Make a , after the message/string and add mention_author=False.

This is an example :

ctx.reply("Message") # To reply (But it ping the author)

ctx.reply("Message", mention_author=False) # To reply (But it doesn't ping the author)

Upvotes: 2

schlöpp
schlöpp

Reputation: 191

discord.Message.reply() is a shortcut method to discord.abc.Messageable.send() to reply to the Message. This function has an argument called mention_author (default None). Setting this to False makes sure the author of the message you're responding to doesn't get mentioned/pinged

await ctx.reply(mention_author=False)

reference

Upvotes: 0

user16386272
user16386272

Reputation:

Fantastic question! Okay, so every discord.abc.Messageable now has a reply attribute. To reply, simply use:

await ctx.reply('Message')

You also have the option to not mention the author in the reply with, mention_author=False. Example below:

await ctx.reply(mention_author=False)

Hope this helps. For more information visit the discord.py documents

Upvotes: 1

Related Questions