This commit is contained in:
Aaron Riedel 2021-12-08 19:13:22 +01:00
parent 0a7680188f
commit 9445141ea2

44
bot.py
View file

@ -122,24 +122,6 @@ async def on_message(message):
await message.channel.send(embed=em) await message.channel.send(embed=em)
await message.delete() await message.delete()
if message.content.startswith("!ttt") and permission(message):
if message.content == ("!ttt"):
error_message = await message.channel.send( "Syntax: !ttt <url> | <title> | <description>")
await asyncio.sleep(10)
await message.delete()
await error_message.delete()
else:
ttt_raw = right(message.content, len(message.content)-5)
content = ttt_raw.split("|")
ttt_url = content[0]
ttt_title = content[1]
ttt_description = content[2]
em = discord.Embed(description=ttt_description,title=ttt_title,url=ttt_url,colour=0x00E0FF)
ask_msg = await message.channel.send( embed=em)
for x in ["", ""]:
await ask_msg.add_reaction(x)
await message.delete()
#move Bot #move Bot
if message.content.startswith("!start") and permission(message): if message.content.startswith("!start") and permission(message):
if message.content == ("!start"): if message.content == ("!start"):
@ -332,23 +314,6 @@ 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)
if message.content.startswith("!rr") and permission(message):
if message.content == "!rr":
await message.delete()
await message.channel.send(content="Nutzung: !rr Titel | @Vortragender", delete_after=10.0)
else:
rrdata = right(message.content, len(message.content)-4).split(" | ")
rrdate = datetime.date.today()
while rrdate.weekday() != 3:
rrdate += datetime.timedelta(1)
rrdesc = "Thema: **" + rrdata[0] + "**\nVortragender: " + rrdata[1] + "\nDatum: " + datetime.date.strftime(rrdate, "%d.%m.%Y") + " 21 Uhr\n\n*Raffinierte Referate ist ein Projekt von SecondHemd, bei dem ein Freiwilliger etwa 15 Minuten zu einem Thema seiner Wahl einen Vortrag hält. Anschließend findet eine Frage- und Diskussionsrunde statt. Jeder ist herzlich eingeladen zuzuhören.*\n*JEDEN DONNERSTAG AUF DIESEM DISCORD!*"
em = discord.Embed(title="Raffinierte Referate", description=rrdesc, colour=0xffa500)
await message.guild.get_channel(837747488651608080).send(content="📣 " + message.guild.get_role(261603747711418371).mention + " " + message.guild.get_role(518420868221763584).mention, embed=em)
await message.delete()
if message.content.startswith("!remind") and permission(message):
await message.guild.get_channel(837747488651608080).send(content="📣 Heute 21 Uhr findet ein Referat statt! Jeder kann zuhören! " + message.guild.get_role(261603747711418371).mention + " " + message.guild.get_role(518420868221763584).mention)
#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:
@ -358,13 +323,4 @@ async def on_message(message):
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()
'''
if message.content == "!shiba":
await message.delete()
async for x in client.get_channel(549177598916296723).history(limit=1000, oldest_first=True):
if not x.is_system() and len(x.attachments) > 0:
for a in x.attachments:
await message.channel.send(content=a.url)
'''
client.run(token) client.run(token)