From f4d6be681fd208763d8d6b1541e5c87e78d63cf0 Mon Sep 17 00:00:00 2001 From: Tristan Gosselin-Hane Date: Sat, 21 Sep 2019 23:56:13 -0400 Subject: [PATCH] Formatting fixes --- .../minecraft_discord_bridge.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/minecraft-discord-bridge/minecraft_discord_bridge.py b/minecraft-discord-bridge/minecraft_discord_bridge.py index d2cfad3..66fca38 100755 --- a/minecraft-discord-bridge/minecraft_discord_bridge.py +++ b/minecraft-discord-bridge/minecraft_discord_bridge.py @@ -289,7 +289,7 @@ def main(): if ACCEPT_JOIN_EVENTS: webhook_payload = { 'username': username, - 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), + 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), 'content': '', 'embeds': [{'color': 65280, 'title': '**Joined the game**'}] } @@ -321,7 +321,7 @@ def main(): player_uuid = action.uuid webhook_payload = { 'username': username, - 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), + 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), 'content': '', 'embeds': [{'color': 16711680, 'title': '**Left the game**'}] } @@ -369,7 +369,7 @@ def main(): message = escape_markdown(remove_emoji(original_message.strip().replace("@", "@\N{zero width space}"))) webhook_payload = { 'username': username, - 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), + 'avatar_url': "https://visage.surgeplay.com/face/160/{}".format(player_uuid), 'content': '{}'.format(message) } for webhook in WEBHOOKS: @@ -667,7 +667,8 @@ def main(): PREVIOUS_MESSAGE = message_to_send NEXT_MESSAGE_TIME = datetime.now(timezone.utc) + timedelta(seconds=config.message_delay) - log.info("Outgoing message from discord: Username: {} Message: {}".format(minecraft_username, message_to_send)) + log.info("Outgoing message from discord: Username: {} Message: {}".format( + minecraft_username, message_to_send)) for channel in channels: webhooks = await discord_bot.get_channel(channel.channel_id).webhooks() @@ -689,8 +690,8 @@ def main(): if not dm_channel: await message.author.create_dm() send_channel = message.author.dm_channel - msg = "Unable to send chat message: there is no Minecraft account linked to this discord account," \ - "please run `mc!register`." + msg = "Unable to send chat message: there is no Minecraft account linked to this discord " \ + "account, please run `mc!register`." await send_channel.send(msg) except discord.errors.Forbidden: if isinstance(message.author, discord.abc.User):