Add a did you mean function for people who still use !

This commit is contained in:
Luke Robles 2023-01-10 12:58:47 -08:00
parent 4a6cc3470e
commit fbf85ebd84

View File

@ -65,6 +65,19 @@ async def he_just_like_me(ctx):
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")
async def convert_heic_to_jpg(ctx):
from cmagick import cmagick