Added custom message if user tries to hug bot
This commit is contained in:
parent
4357b43a6d
commit
895229e872
|
@ -294,11 +294,17 @@ namespace DeukBot4.MessageHandlers.CommandHandler
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var user = await request.Parameters[0].AsDiscordGuildUser(guildChannel.Guild);
|
var user = await request.Parameters[0].AsDiscordGuildUser(guildChannel.Guild);
|
||||||
|
if (user == null)
|
||||||
|
return;
|
||||||
string message;
|
string message;
|
||||||
if (request.OriginalMessage.Author.Id == user.Id)
|
if (request.OriginalMessage.Author.Id == user.Id)
|
||||||
{
|
{
|
||||||
message = $"{user.Mention} hugs themselves. That's pretty sad to be honest.";
|
message = $"{user.Mention} hugs themselves. That's pretty sad to be honest.";
|
||||||
}
|
}
|
||||||
|
else if (user.Id == Program.BotId)
|
||||||
|
{
|
||||||
|
message = $"Please don't touch me.";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
message = $"{request.OriginalMessage.Author.Mention} gives {user.Mention} a hug!";
|
message = $"{request.OriginalMessage.Author.Mention} gives {user.Mention} a hug!";
|
||||||
|
|
Loading…
Reference in New Issue