Message and error logging, various bugfixes

This commit is contained in:
Ske
2018-10-27 23:30:12 +02:00
parent ea62ede21b
commit 58d8927380
7 changed files with 161 additions and 37 deletions

View File

@@ -4,10 +4,13 @@ logger = logging.getLogger("pluralkit.commands")
async def set_log(ctx: CommandContext):
if not ctx.message.author.server_permissions.administrator:
if not ctx.message.author.guild_permissions.administrator:
return CommandError("You must be a server administrator to use this command.")
server = ctx.message.server
server = ctx.message.guild
if not server:
return CommandError("This command can not be run in a DM.")
if not ctx.has_next():
channel_id = None
else: