Fix code style issues with Black
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
import discord
|
||||
import asyncio
|
||||
|
||||
|
||||
class MyClient(discord.Client):
|
||||
async def on_ready(self):
|
||||
print(f'Logged in as {self.user} (ID: {self.user.id})')
|
||||
print('------')
|
||||
print(f"Logged in as {self.user} (ID: {self.user.id})")
|
||||
print("------")
|
||||
|
||||
async def on_message(self, message):
|
||||
if message.content.startswith('!editme'):
|
||||
msg = await message.channel.send('10')
|
||||
if message.content.startswith("!editme"):
|
||||
msg = await message.channel.send("10")
|
||||
await asyncio.sleep(3.0)
|
||||
await msg.edit(content='40')
|
||||
await msg.edit(content="40")
|
||||
|
||||
async def on_message_edit(self, before, after):
|
||||
msg = f'**{before.author}** edited their message:\n{before.content} -> {after.content}'
|
||||
msg = f"**{before.author}** edited their message:\n{before.content} -> {after.content}"
|
||||
await before.channel.send(msg)
|
||||
|
||||
|
||||
client = MyClient(intents=discord.Intents(guilds=True, messages=True))
|
||||
client.run('token')
|
||||
client.run("token")
|
||||
|
Reference in New Issue
Block a user