1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Trigger typing when looking up twitch/picarto API

This commit is contained in:
Phxntxm 2017-03-09 22:37:43 -06:00
parent 191a48ce9f
commit 00c8f2509f
2 changed files with 8 additions and 0 deletions

View file

@ -119,6 +119,8 @@ class Picarto:
EXAMPLE: !picarto @otherPerson
RESULT: Info about their picarto stream"""
await ctx.message.channel.trigger_typing()
# If member is not given, base information on the author
member = member or ctx.message.author
picarto_entry = await utils.get_content('picarto', str(member.id))
@ -167,6 +169,8 @@ class Picarto:
EXAMPLE: !picarto add MyUsername
RESULT: Your picarto stream is saved, and notifications should go to this guild"""
await ctx.message.channel.trigger_typing()
# This uses a lookbehind to check if picarto.tv exists in the url given
# If it does, it matches picarto.tv/user and sets the url as that
# Then (in the else) add https://www. to that

View file

@ -109,6 +109,8 @@ class Twitch:
EXAMPLE: !twitch @OtherPerson
RESULT: Information about their twitch URL"""
await ctx.message.channel.trigger_typing()
if member is None:
member = ctx.message.author
@ -143,6 +145,8 @@ class Twitch:
EXAMPLE: !twitch add MyTwitchName
RESULT: Saves your twitch URL; notifications will be sent to this server when you go live"""
await ctx.message.channel.trigger_typing()
# This uses a lookbehind to check if twitch.tv exists in the url given
# If it does, it matches twitch.tv/user and sets the url as that
# Then (in the else) add https://www. to that