adding typing notification to the ffxiv command and corona

This commit is contained in:
Luke Robles 2020-09-01 20:50:39 -07:00
parent 18570688a0
commit 92386f096c
No known key found for this signature in database
GPG Key ID: D70F99D67F488AF9

View File

@ -50,8 +50,8 @@ async def on_ready():
@bot.command(name='invite')
async def invite(ctx):
# Default to creating the invite to the #general channel
# if the user is in a voice channel, try to create the invite there
# Default to creating the invite to the channel the message was sent in
# if the user is in a voice channel, create the invite there
invite_channel = ctx.message.channel
try:
@ -230,9 +230,10 @@ async def birb(ctx):
async def corona(ctx):
import corona
result = corona.parse_message(ctx.message.content)
async with ctx.message.channel.typing():
result = corona.parse_message(ctx.message.content)
await ctx.send(embed=result)
await ctx.send(embed=result)
@bot.command(name='decide')
async def decide(ctx):
@ -279,11 +280,12 @@ async def eight_ball(ctx):
@bot.command(name='ffxiv')
async def ffxiv(ctx):
import ffxiv
try:
ffxiv_embed = ffxiv.parse_message(ctx.message.content)
await ctx.send(embed=ffxiv_embed)
except Exception:
await ctx.send("I encountered an error while searching for that player.\nPlease check that your player name and server are spelled correctly")
async with ctx.message.channel.typing():
try:
ffxiv_embed = ffxiv.parse_message(ctx.message.content)
await ctx.send(embed=ffxiv_embed)
except Exception:
await ctx.send("I encountered an error while searching for that player.\nPlease check that your player name and server are spelled correctly")
@bot.command(name='info')
async def info(ctx):