Skip to content

Commit

Permalink
fix: ad bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Selyss committed Jan 6, 2024
1 parent 836e1e2 commit e4094d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions views/ad.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import nextcord
from cogs.utils.colors import SUCCESS
from os import getenv

import nextcord
from dotenv.main import load_dotenv

from cogs.utils.colors import SUCCESS

load_dotenv()

AD_PAID_DESC = getenv("AD_PAID_DESC")
Expand All @@ -22,7 +24,7 @@ async def paid(self, btn: nextcord.ui.Button, inter: nextcord.Interaction) -> No
if isinstance(inter.channel, nextcord.TextChannel):
if inter.permissions.administrator or (
nextcord.utils.get(inter.guild.roles, id=self.advertising_role)
in inter.roles
in inter.user.roles
):
category = nextcord.utils.get(
inter.guild.categories, id=self.paid_category
Expand Down

0 comments on commit e4094d5

Please sign in to comment.