typing starts earlier

This commit is contained in:
NikolajDanger
2020-04-03 16:30:17 +02:00
parent 919c064d93
commit 4f78dc9d32

View File

@ -211,11 +211,11 @@ async def on_message(message):
await message.channel.send(desc)
elif message.content.lower().startswith("!wiki "):
funcs.logThis(message.author.name+" ran \""+message.content+"\"")
command = string.capwords(message.content.lower().replace("!wiki ",""))
title, content, thumbnail = funcs.findWikiPage(command)
if title != "":
async with message.channel.typing():
async with message.channel.typing():
funcs.logThis(message.author.name+" ran \""+message.content+"\"")
command = string.capwords(message.content.lower().replace("!wiki ",""))
title, content, thumbnail = funcs.findWikiPage(command)
if title != "":
funcs.logThis("Sending the embedded message")
content += "\n[Læs mere](https://senkulpa.fandom.com/da/wiki/"+title.replace(" ","_")+")"
embed = discord.Embed(title = title, description = content, colour=0xDEADBF)
@ -223,8 +223,8 @@ async def on_message(message):
embed.set_thumbnail(url=thumbnail)
await message.channel.send(embed = embed)
else:
await message.channel.send(content)
else:
await message.channel.send(content)
# Runs the whole shabang