Merge branch 'master' into 'weather'
# Conflicts: # app/dragon-bot.py # app/help_methods.py
This commit is contained in:
commit
a1f8b9b381
@ -124,6 +124,18 @@ async def on_message(message):
|
||||
weather.get_weather(message.content)
|
||||
)
|
||||
|
||||
if message.content.startswith('!pout'):
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
get_from_reddit.get_image('pouts')
|
||||
)
|
||||
|
||||
if message.content.startswith('!smug'):
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
get_from_reddit.get_image('smuganimegirls')
|
||||
)
|
||||
|
||||
if message.content.startswith('!purge'):
|
||||
num = 20
|
||||
if len(message.content.split()) > 1:
|
||||
|
@ -62,7 +62,14 @@ def get_help_message(method):
|
||||
],
|
||||
'weather': [
|
||||
'Returns the weather for the location you entered.',
|
||||
'\nUsage: !weather Berkeley']
|
||||
'\nUsage: !weather Berkeley'
|
||||
],
|
||||
'pout': [
|
||||
'Returns the URL for an anime girl pouting you filthy weeb'
|
||||
],
|
||||
'smug': [
|
||||
'Returns the URL for smug anime girl'
|
||||
]
|
||||
}
|
||||
|
||||
# Print out every help method
|
||||
@ -77,10 +84,10 @@ def get_help_message(method):
|
||||
# Join key : value of the help method they passed in
|
||||
message = "{} : {}".format(method, ' '.join(supported_methods[method]))
|
||||
|
||||
# Return the message wrapped in css formatting so we get pretty colors
|
||||
return "```css\n{}\n```".format(message)
|
||||
return "\n{}\n".format(message)
|
||||
|
||||
def parse_message(message):
|
||||
method = 'show_all'
|
||||
if len(message.split()) > 1:
|
||||
method = message.split()[1]
|
||||
try:
|
||||
@ -88,5 +95,3 @@ def parse_message(message):
|
||||
except KeyError:
|
||||
return "I can't help you with that"
|
||||
return "```css\n{}\n```".format(explanation)
|
||||
|
||||
return get_help_message('show_all')
|
||||
|
Loading…
x
Reference in New Issue
Block a user