Beautify code and test signing
This commit is contained in:
parent
df20d1c8b4
commit
67365f6873
1 changed files with 9 additions and 0 deletions
9
bot.py
9
bot.py
|
@ -38,6 +38,7 @@ async def on_message(message):
|
||||||
if message.content.startswith("!yesno"):
|
if message.content.startswith("!yesno"):
|
||||||
await message.delete()
|
await message.delete()
|
||||||
await message.channel.send(content="Sorry das geht so nicht. Der Befehl hat sich geändert in !vote... für mehr Informationen schreib bitte !help oder frage deinen Admin oder Apotheker. Liebste Grüße, SecondBot <3", delete_after=20.0)
|
await message.channel.send(content="Sorry das geht so nicht. Der Befehl hat sich geändert in !vote... für mehr Informationen schreib bitte !help oder frage deinen Admin oder Apotheker. Liebste Grüße, SecondBot <3", delete_after=20.0)
|
||||||
|
|
||||||
if message.content == "!help":
|
if message.content == "!help":
|
||||||
if message.channel == message.author.dm_channel:
|
if message.channel == message.author.dm_channel:
|
||||||
await message.author.dm_channel.send("Sorry das geht so nicht. Bitte schreibe diese Nachricht in einen Channel auf dem SecondHemd Discord, sonst kann ich nicht sehen was du für Berechtigungen hast. Vielen Dank.")
|
await message.author.dm_channel.send("Sorry das geht so nicht. Bitte schreibe diese Nachricht in einen Channel auf dem SecondHemd Discord, sonst kann ich nicht sehen was du für Berechtigungen hast. Vielen Dank.")
|
||||||
|
@ -56,6 +57,7 @@ async def on_message(message):
|
||||||
if message.author.dm_channel == None:
|
if message.author.dm_channel == None:
|
||||||
await message.author.create_dm()
|
await message.author.create_dm()
|
||||||
await message.author.dm_channel.send("Sorry, du hast leider nicht die nötigen Berechtigungen. :(")
|
await message.author.dm_channel.send("Sorry, du hast leider nicht die nötigen Berechtigungen. :(")
|
||||||
|
|
||||||
if message.content.startswith("!survey ") and member(message):
|
if message.content.startswith("!survey ") and member(message):
|
||||||
if message.content == "!survey":
|
if message.content == "!survey":
|
||||||
error_message = await message.channel.send("Nutzung: !survey <Frage> | <Antwort1> | <Antwort2> ...")
|
error_message = await message.channel.send("Nutzung: !survey <Frage> | <Antwort1> | <Antwort2> ...")
|
||||||
|
@ -81,6 +83,7 @@ async def on_message(message):
|
||||||
await ask_msg.add_reaction(x)
|
await ask_msg.add_reaction(x)
|
||||||
a = a + 1
|
a = a + 1
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
|
||||||
if message.content.startswith("!surveyedit") and member(message):
|
if message.content.startswith("!surveyedit") and member(message):
|
||||||
if message.content == "!surveyedit":
|
if message.content == "!surveyedit":
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
@ -195,6 +198,7 @@ async def on_message(message):
|
||||||
await message.delete()
|
await message.delete()
|
||||||
await asyncio.sleep(15)
|
await asyncio.sleep(15)
|
||||||
await error_message.delete()
|
await error_message.delete()
|
||||||
|
|
||||||
if message.content.startswith("!purge") and permission(message):
|
if message.content.startswith("!purge") and permission(message):
|
||||||
await message.delete()
|
await message.delete()
|
||||||
if message.content == "!purge":
|
if message.content == "!purge":
|
||||||
|
@ -258,12 +262,14 @@ async def on_message(message):
|
||||||
await question.delete()
|
await question.delete()
|
||||||
deleted = await message.channel.purge(limit=limit)
|
deleted = await message.channel.purge(limit=limit)
|
||||||
await message.channel.send(content='Ich habe {} Nachrichten gelöscht.'.format(len(deleted)), delete_after=5.0)
|
await message.channel.send(content='Ich habe {} Nachrichten gelöscht.'.format(len(deleted)), delete_after=5.0)
|
||||||
|
|
||||||
if message.content.startswith("!love") and member(message):
|
if message.content.startswith("!love") and member(message):
|
||||||
await message.delete()
|
await message.delete()
|
||||||
for user in message.mentions:
|
for user in message.mentions:
|
||||||
if user.dm_channel == None:
|
if user.dm_channel == None:
|
||||||
await user.create_dm()
|
await user.create_dm()
|
||||||
await user.dm_channel.send("❤️")
|
await user.dm_channel.send("❤️")
|
||||||
|
|
||||||
if message.content.endswith("!?") and member(message):
|
if message.content.endswith("!?") and member(message):
|
||||||
for x in ["✅", "❌"]:
|
for x in ["✅", "❌"]:
|
||||||
await message.add_reaction(x)
|
await message.add_reaction(x)
|
||||||
|
@ -283,6 +289,7 @@ async def on_message(message):
|
||||||
await question.delete()
|
await question.delete()
|
||||||
deleted = await message.guild.prune_members(days=30)
|
deleted = await message.guild.prune_members(days=30)
|
||||||
await message.channel.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0)
|
await message.channel.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0)
|
||||||
|
|
||||||
if message.content.startswith("!roll") and member(message):
|
if message.content.startswith("!roll") and member(message):
|
||||||
if message.content == "!roll":
|
if message.content == "!roll":
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
@ -314,11 +321,13 @@ async def on_message(message):
|
||||||
rolle = ""
|
rolle = ""
|
||||||
em = discord.Embed(title=rolle, description=rolltotal, colour=0x009933)
|
em = discord.Embed(title=rolle, description=rolltotal, colour=0x009933)
|
||||||
await message.channel.send(embed=em)
|
await message.channel.send(embed=em)
|
||||||
|
|
||||||
#Shiba Bilder vom Shiba Discord auf den SH Discord hauen
|
#Shiba Bilder vom Shiba Discord auf den SH Discord hauen
|
||||||
if message.channel.id == 549177598916296723:
|
if message.channel.id == 549177598916296723:
|
||||||
if not message.is_system() and len(message.attachments) > 0:
|
if not message.is_system() and len(message.attachments) > 0:
|
||||||
for a in message.attachments:
|
for a in message.attachments:
|
||||||
await client.get_channel(775390209793064980).send(content=a.url)
|
await client.get_channel(775390209793064980).send(content=a.url)
|
||||||
|
|
||||||
if message.content.startswith("!print") and permission(message):
|
if message.content.startswith("!print") and permission(message):
|
||||||
print(message.content)
|
print(message.content)
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
|
Loading…
Reference in a new issue