1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-18 16:03:36 +03:00

fix: display message when targeting bot

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2024-05-23 18:19:49 +05:00
parent 124f8223ef
commit df8141034f
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF

View file

@ -113,6 +113,11 @@ public sealed class AccessControlService
string action, IGuild guild, IReadOnlyList<IRole> roles, MemberData targetData, MemberData botData,
MemberData interacterData)
{
if (botData.Id == targetData.Id)
{
return Result<string?>.FromSuccess($"UserCannot{action}Bot".Localized());
}
if (targetData.Id == guild.OwnerID)
{
return Result<string?>.FromSuccess($"UserCannot{action}Owner".Localized());