Browse Source

Fix ban issues

main
Ave Ozkal 2 years ago
parent
commit
ac0d3595d3
3 changed files with 9 additions and 4 deletions
  1. +3
    -2
      cogs/admin.py
  2. +2
    -2
      cogs/logs.py
  3. +4
    -0
      cogs/mod.py

+ 3
- 2
cogs/admin.py View File

@ -52,8 +52,9 @@ class AdminCog:
@commands.command(hidden=True)
async def fetchlog(self, ctx):
"""Returns log"""
await ctx.send(file=discord.File(f"{self.bot.script_name}.log"),
content="Here's the current log file:")
await ctx.send("This is currently broken.")
await ctx.send("Here's the current log file:",
file=discord.File(f"{self.bot.script_name}.log"))
@commands.guild_only()
@commands.check(check_if_bot_manager)


+ 2
- 2
cogs/logs.py View File

@ -82,7 +82,7 @@ class Logs:
f"🏷 __User ID__: {member.id}"
await log_channel.send(msg)
async def on_member_ban(self, member):
async def on_member_ban(self, guild, member):
await self.bot.wait_until_ready()
log_channel = self.bot.get_channel(config.log_channel)
msg = f"⛔ **Ban**: {member.mention} | "\
@ -90,7 +90,7 @@ class Logs:
f"🏷 __User ID__: {member.id}"
await log_channel.send(msg)
async def on_member_unban(self, server, user):
async def on_member_unban(self, guild, user):
await self.bot.wait_until_ready()
log_channel = self.bot.get_channel(config.log_channel)
msg = f"⚠️ **Unban**: {user.mention} | "\


+ 4
- 0
cogs/mod.py View File

@ -183,6 +183,10 @@ class ModCog:
", it is recommended to use `.ban <user> [reason]`"\
" as the reason is automatically sent to the user."
log_channel = self.bot.get_channel(config.log_channel)
await log_channel.send(chan_message)
await ctx.send(f"{safe_name} is now b&. 👍")
@commands.guild_only()
@commands.bot_has_permissions(ban_members=True)
@commands.check(check_if_staff)


Loading…
Cancel
Save