Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yep + fixed blacklist #89

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cogs/Blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def on_ready(self):
self.blacklist: BlacklistHandler = self.bot.blacklist
self.check_blacklist.start()

@commands.slash_command(description="Blacklist base command", hidden=True)
@commands.slash_command(description="Blacklist base command")
async def blacklist(self, inter):
pass

Expand Down Expand Up @@ -219,6 +219,10 @@ async def blacklist_add(
return await errorEmb(inter, "Reason must be under 900 chars")
elif user.id == inter.author.id:
return await errorEmb(inter, "You can't blacklist yourself")
elif user.id == self.bot.user.id:
return await errorEmb(inter, "You can't blacklist me")
elif user.id == "511724576674414600":
return await errorEmb(inter, "You can't blacklist my creator :D")
elif await self.blacklist.blacklisted(user.id):
return await errorEmb(
inter, f"{user.mention} is already in the blacklist"
Expand Down
5 changes: 4 additions & 1 deletion cogs/Levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ async def active(self, inter: ApplicationCommandInteraction, active: bool):
@commands.has_permissions(manage_roles=True)
@xp_boost.sub_command()
async def get(self, inter: ApplicationCommandInteraction):
"""
gets the current xp boost for the bot
"""
async with self.bot.db.execute(
"SELECT * FROM config WHERE guild_id = ?", (inter.guild.id,)
) as cur:
Expand All @@ -540,7 +543,7 @@ async def get(self, inter: ApplicationCommandInteraction):
)
emb = Embed(
title="XP Boost",
description=f"XP Boost is currently {'enabled' if config[4] else 'disabled'}",
description=f"XP Boost is currently {'enabled' if config[3] else 'disabled'}",
color=0x2F3136,
)
emb.add_field(name="Multiplier", value=str(config[1]) + "x")
Expand Down
4 changes: 4 additions & 0 deletions utils/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,7 @@ async def send(self):

def manage_messages_perms(inter):
return inter.channel.permissions_for(inter.author).manage_messages

def manage_role_perms(inter):
return inter.channel.permissions_for(inter.author).manage_roles