.iamn now also deletes messages
This commit is contained in:
parent
c7d61c5d10
commit
c0f23e48f0
@ -130,8 +130,8 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
await e.Channel.SendMessage($":anger:`I am unable to add that role to you. I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false);
|
await e.Channel.SendMessage($":anger:`I am unable to add that role to you. I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
var msg = await e.Channel.SendMessage($":ok:You now have {role.Name} role.").ConfigureAwait(false);
|
var msg = await e.Channel.SendMessage($":ok:You now have {role.Name} role.").ConfigureAwait(false);
|
||||||
await Task.Delay(3000);
|
await Task.Delay(3000).ConfigureAwait(false);
|
||||||
await msg.Delete();
|
await msg.Delete().ConfigureAwait(false);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await e.Message.Delete().ConfigureAwait(false);
|
await e.Message.Delete().ConfigureAwait(false);
|
||||||
@ -168,7 +168,14 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await e.User.RemoveRoles(role).ConfigureAwait(false);
|
await e.User.RemoveRoles(role).ConfigureAwait(false);
|
||||||
await e.Channel.SendMessage($":ok:Successfuly removed {role.Name} role from you.").ConfigureAwait(false);
|
var msg = await e.Channel.SendMessage($":ok:Successfuly removed {role.Name} role from you.").ConfigureAwait(false);
|
||||||
|
await Task.Delay(3000).ConfigureAwait(false);
|
||||||
|
await msg.Delete().ConfigureAwait(false);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await e.Message.Delete().ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user