Typing while getting wiki

This commit is contained in:
NikolajDanger
2020-04-03 16:25:49 +02:00
parent 4129c9b0b4
commit 919c064d93

View File

@ -215,13 +215,14 @@ async def on_message(message):
command = string.capwords(message.content.lower().replace("!wiki ","")) command = string.capwords(message.content.lower().replace("!wiki ",""))
title, content, thumbnail = funcs.findWikiPage(command) title, content, thumbnail = funcs.findWikiPage(command)
if title != "": if title != "":
funcs.logThis("Sending the embedded message") async with message.channel.typing():
content += "\n[Læs mere](https://senkulpa.fandom.com/da/wiki/"+title.replace(" ","_")+")" funcs.logThis("Sending the embedded message")
embed = discord.Embed(title = title, description = content, colour=0xDEADBF) content += "\n[Læs mere](https://senkulpa.fandom.com/da/wiki/"+title.replace(" ","_")+")"
if thumbnail != "": embed = discord.Embed(title = title, description = content, colour=0xDEADBF)
embed.set_thumbnail(url=thumbnail) if thumbnail != "":
embed.set_thumbnail(url=thumbnail)
await message.channel.send(embed = embed) await message.channel.send(embed = embed)
else: else:
await message.channel.send(content) await message.channel.send(content)