Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AEnterprise committed Jul 2, 2019
1 parent 314a836 commit 05e95ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GearBot/Cogs/Admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ async def blacklist_server(self, ctx, guild: Guild):
Configuration.set_persistent_var("server_blacklist", blocked)
await guild.leave()
await MessageUtils.send_to(ctx, "YES", f"{Utils.escape_markdown(guild.name)} (``{guild.id}``) has been added to the blacklist", translate=False)
await GearbotLogging.bot_log(
f"{Utils.escape_markdown(guild.name)} (``{guild.id}``) has been added to the blacklist by {Utils.clean_user(ctx.author)}")

@commands.command()
async def blacklist_user(self, ctx, user:DiscordUser):
Expand All @@ -160,7 +162,8 @@ async def blacklist_user(self, ctx, user:DiscordUser):
blocked = Configuration.get_persistent_var("user_blacklist", [])
blocked.append(user.id)
Configuration.set_persistent_var("user_blacklist", blocked)
await MessageUtils.send_to(ctx, "YES",f"{Utils.clean_user(user)} (``{user.id}``) has been added to the blacklist", translate=False)
await MessageUtils.send_to(ctx, "YES", f"{Utils.clean_user(user)} (``{user.id}``) has been added to the blacklist", translate=False)
await GearbotLogging.bot_log(f"{Utils.clean_user(user)} (``{user.id}``) has been added to the blacklist by {Utils.clean_user(ctx.author)}")

@commands.command()
async def pendingchanges(self, ctx):
Expand Down

0 comments on commit 05e95ae

Please sign in to comment.