Slight nerf

This commit is contained in:
Deukhoofd 2018-06-15 22:08:23 +02:00
parent b0d55bf77e
commit 9fd67f6ec7
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,8 @@ namespace DeukBot4.MessageHandlers
string newName;
var lower = message.Content.ToLowerInvariant();
if (lower[0] != 'i')
return;
if (lower.StartsWith("i'm "))
{
newName = message.Content.Remove(0, 4);
@ -100,6 +102,8 @@ namespace DeukBot4.MessageHandlers
{
return;
}
if (newName.Length > 15)
return;
await message.Channel.SendMessageAsync($"Hi {newName}, i'm Deukbot");
await guildUser.ModifyAsync(user => user.Nickname = newName);