adding typing notification to the ffxiv command and corona
This commit is contained in:
parent
519390d2f7
commit
2b597519dd
20
app/bot.py
20
app/bot.py
@ -50,8 +50,8 @@ async def on_ready():
|
|||||||
|
|
||||||
@bot.command(name='invite')
|
@bot.command(name='invite')
|
||||||
async def invite(ctx):
|
async def invite(ctx):
|
||||||
# Default to creating the invite to the #general channel
|
# Default to creating the invite to the channel the message was sent in
|
||||||
# if the user is in a voice channel, try to create the invite there
|
# if the user is in a voice channel, create the invite there
|
||||||
invite_channel = ctx.message.channel
|
invite_channel = ctx.message.channel
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -230,9 +230,10 @@ async def birb(ctx):
|
|||||||
async def corona(ctx):
|
async def corona(ctx):
|
||||||
|
|
||||||
import corona
|
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')
|
@bot.command(name='decide')
|
||||||
async def decide(ctx):
|
async def decide(ctx):
|
||||||
@ -279,11 +280,12 @@ async def eight_ball(ctx):
|
|||||||
@bot.command(name='ffxiv')
|
@bot.command(name='ffxiv')
|
||||||
async def ffxiv(ctx):
|
async def ffxiv(ctx):
|
||||||
import ffxiv
|
import ffxiv
|
||||||
try:
|
async with ctx.message.channel.typing():
|
||||||
ffxiv_embed = ffxiv.parse_message(ctx.message.content)
|
try:
|
||||||
await ctx.send(embed=ffxiv_embed)
|
ffxiv_embed = ffxiv.parse_message(ctx.message.content)
|
||||||
except Exception:
|
await ctx.send(embed=ffxiv_embed)
|
||||||
await ctx.send("I encountered an error while searching for that player.\nPlease check that your player name and server are spelled correctly")
|
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')
|
@bot.command(name='info')
|
||||||
async def info(ctx):
|
async def info(ctx):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user