Add a did you mean function for people who still use !
This commit is contained in:
parent
e0fd382bbb
commit
26b9de7f27
13
app/bot.py
13
app/bot.py
@ -65,6 +65,19 @@ async def he_just_like_me(ctx):
|
|||||||
await ctx.reply("https://imgur.com/V3k729v")
|
await ctx.reply("https://imgur.com/V3k729v")
|
||||||
|
|
||||||
|
|
||||||
|
@bot.listen("on_message")
|
||||||
|
async def did_you_mean(ctx):
|
||||||
|
if ctx.message.author.id != core_utils.my_id:
|
||||||
|
message = ctx.content
|
||||||
|
command = ctx.content.split()[0][1:]
|
||||||
|
|
||||||
|
command_map = {"ask": "wolfram"}
|
||||||
|
if message.startswith("!"):
|
||||||
|
if command in command_map.keys():
|
||||||
|
command = command_map[command]
|
||||||
|
await ctx.reply("Did you mean /%s?" % command)
|
||||||
|
|
||||||
|
|
||||||
@bot.listen("on_message")
|
@bot.listen("on_message")
|
||||||
async def convert_heic_to_jpg(ctx):
|
async def convert_heic_to_jpg(ctx):
|
||||||
from cmagick import cmagick
|
from cmagick import cmagick
|
||||||
|
Loading…
x
Reference in New Issue
Block a user