fix(shop): Allow owner to add shop role.
This commit is contained in:
@@ -14,6 +14,7 @@ from meta.logger import log_wrap
|
|||||||
from utils import ui
|
from utils import ui
|
||||||
from utils.lib import error_embed
|
from utils.lib import error_embed
|
||||||
from constants import MAX_COINS
|
from constants import MAX_COINS
|
||||||
|
from wards import equippable_role
|
||||||
|
|
||||||
from .. import babel
|
from .. import babel
|
||||||
|
|
||||||
@@ -738,7 +739,7 @@ class ColourShopping(ShopCog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Check that the author has permission to manage this role
|
# Check that the author has permission to manage this role
|
||||||
if not (ctx.author.guild_permissions.manage_roles and ctx.author.top_role > role):
|
if not (ctx.author.guild_permissions.manage_roles):
|
||||||
raise SafeCancellation(
|
raise SafeCancellation(
|
||||||
t(_p(
|
t(_p(
|
||||||
'cmd:editshop_colours_add|error:caller_perms',
|
'cmd:editshop_colours_add|error:caller_perms',
|
||||||
@@ -747,6 +748,9 @@ class ColourShopping(ShopCog):
|
|||||||
)).format(mention=role.mention)
|
)).format(mention=role.mention)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Final catch-all with more general error messages
|
||||||
|
await equippable_role(self.bot, role, ctx.author)
|
||||||
|
|
||||||
if role.permissions.administrator:
|
if role.permissions.administrator:
|
||||||
raise SafeCancellation(
|
raise SafeCancellation(
|
||||||
t(_p(
|
t(_p(
|
||||||
|
|||||||
Reference in New Issue
Block a user