Minor bugfixes

This commit is contained in:
Zeva Rose 2022-12-06 16:14:00 +00:00
parent 1016ce317c
commit 2f9cfcf15d
3 changed files with 4 additions and 3 deletions

View file

@ -83,7 +83,8 @@ class MessageEventMixin:
"VtgZntXcnZ", "VtgZntXcnZ",
"gPfYGbvTCE", "gPfYGbvTCE",
] ]
if (m := match.group(1)) not in allowed and setting.value: is_mod = message.author.has_permission(Permissions.MANAGE_GUILD) or message.author.has_permission(Permissions.ADMINISTRATOR)
if (m := match.group(1)) not in allowed and setting.value and not is_mod:
self.logger.debug(f"Removing non-allowed invite `{m}` from {message.guild.id}") self.logger.debug(f"Removing non-allowed invite `{m}` from {message.guild.id}")
try: try:
await message.delete() await message.delete()

View file

@ -145,7 +145,7 @@ class DbrandCog(Extension):
title="Contact Support", title="Contact Support",
description="", description="",
fields=fields, fields=fields,
url="https://dbrand.com/support", url="https://dbrand.com/contact",
color=color, color=color,
) )

View file

@ -223,7 +223,7 @@ class UtilCog(Extension):
) )
@cooldown(bucket=Buckets.USER, rate=1, interval=5) @cooldown(bucket=Buckets.USER, rate=1, interval=5)
async def _avatar_slash(self, ctx: InteractionContext, user: User = None) -> None: async def _avatar_slash(self, ctx: InteractionContext, user: User = None) -> None:
await self._userinfo(ctx, user) await self._avatar(ctx, user)
@context_menu(name="Avatar", context_type=CommandTypes.USER) @context_menu(name="Avatar", context_type=CommandTypes.USER)
async def _avatar_menu(self, ctx: InteractionContext) -> None: async def _avatar_menu(self, ctx: InteractionContext) -> None: