mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 06:25:33 +00:00
Fix ban issues
This commit is contained in:
parent
461b7e547c
commit
eebcfea2f5
|
@ -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)
|
||||
|
|
|
@ -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} | "\
|
||||
|
|
|
@ -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…
Reference in a new issue