mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
fix: display message when targeting bot
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
124f8223ef
commit
df8141034f
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ public sealed class AccessControlService
|
||||||
string action, IGuild guild, IReadOnlyList<IRole> roles, MemberData targetData, MemberData botData,
|
string action, IGuild guild, IReadOnlyList<IRole> roles, MemberData targetData, MemberData botData,
|
||||||
MemberData interacterData)
|
MemberData interacterData)
|
||||||
{
|
{
|
||||||
|
if (botData.Id == targetData.Id)
|
||||||
|
{
|
||||||
|
return Result<string?>.FromSuccess($"UserCannot{action}Bot".Localized());
|
||||||
|
}
|
||||||
|
|
||||||
if (targetData.Id == guild.OwnerID)
|
if (targetData.Id == guild.OwnerID)
|
||||||
{
|
{
|
||||||
return Result<string?>.FromSuccess($"UserCannot{action}Owner".Localized());
|
return Result<string?>.FromSuccess($"UserCannot{action}Owner".Localized());
|
||||||
|
|
Loading…
Add table
Reference in a new issue