mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
[Core] No DMing the bot (#3478)
* [Core] No DMing the bot * Return early if target user is a bot
This commit is contained in:
parent
e44fc69d14
commit
12e6f44135
@ -1581,12 +1581,12 @@ class Core(commands.Cog, CoreLogic):
|
||||
settings, 'appearance' tab. Then right click a user
|
||||
and copy their id"""
|
||||
destination = discord.utils.get(ctx.bot.get_all_members(), id=user_id)
|
||||
if destination is None:
|
||||
if destination is None or destination.bot:
|
||||
await ctx.send(
|
||||
_(
|
||||
"Invalid ID or user not found. You can only "
|
||||
"send messages to people I share a server "
|
||||
"with."
|
||||
"Invalid ID, user not found, or user is a bot. "
|
||||
"You can only send messages to people I share "
|
||||
"a server with."
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user