Added custom message if user tries to hug bot

This commit is contained in:
Deukhoofd 2018-10-15 18:39:14 +02:00
parent 4357b43a6d
commit 895229e872
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 6 additions and 0 deletions

View File

@ -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!";