Skip to content

Commit

Permalink
Change some returns from embeds to plaintext
Browse files Browse the repository at this point in the history
specifically, those of the Chinese transliteration-related ones: pinyin, yale, jyutping, simplified, and traditional
  • Loading branch information
kaesekaiser committed Oct 15, 2019
1 parent 1bfe09e commit 4299469
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions bot/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ async def resend_if_dm(self, mess: discord.Message, s: str = None, **kwargs):
err = Emol(":no_entry:", hexcol("880000")) # error
succ = Emol(":white_check_mark:", hexcol("22bb00")) # success
chooseEmol = Emol(":8ball:", hexcol("e1e8ed"))
zhong = Emol(":flag_cn:", hexcol("df0000"))
kong = Emol(":flag_hk:", hexcol("df0000"))
wiki = Emol(":globe_with_meridians:", hexcol("4100b5"))
phone = Emol(":telephone:", hexcol("DD2E44"))
plane = Emol(":airplane:", hexcol("3a99f7"))
Expand Down
12 changes: 6 additions & 6 deletions bot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,14 @@ def get_yale(s: str):


@zeph.command(
name="pinyin", usage="z!pinyin <Mandarin text...>",
name="pinyin", usage="z!pinyin <Mandarin text...>", aliases=["py"],
description="Romanizes Chinese text using Hanyu Pinyin.",
help="Romanizes Chinese text according to the Hanyu Pinyin romanization scheme - that is, it turns the "
"Chinese characters into Latin syllables that sound like their Mandarin pronunciations.\n\n"
"``z!pinyin 你好`` → ``nǐhǎo``"
)
async def pinyin_command(ctx: commands.Context, *, chinese: str):
return await zhong.send(ctx, get_pinyin(chinese))
return await ctx.send(get_pinyin(chinese))


@zeph.command(
Expand All @@ -548,7 +548,7 @@ async def pinyin_command(ctx: commands.Context, *, chinese: str):
"``z!jyutping 你好`` → ``nei5hou2``"
)
async def jyutping_command(ctx: commands.Context, *, cantonese: str):
return await kong.send(ctx, get_jyutping(cantonese))
return await ctx.send(get_jyutping(cantonese))


@zeph.command(
Expand All @@ -559,23 +559,23 @@ async def jyutping_command(ctx: commands.Context, *, cantonese: str):
"``z!yale 你好`` → ``néihhóu``"
)
async def yale_command(ctx: commands.Context, *, cantonese: str):
return await kong.send(ctx, get_yale(cantonese))
return await ctx.send(get_yale(cantonese))


@zeph.command(
aliases=["simp"], usage="z!simplified <Traditional Chinese text...>",
help="Converts Traditional Chinese characters to Simplified Chinese."
)
async def simplified(ctx: commands.Context, *, trad: str):
return await zhong.send(ctx, hanziconv.HanziConv.toSimplified(trad))
return await ctx.send(hanziconv.HanziConv.toSimplified(trad))


@zeph.command(
aliases=["trad"], usage="z!traditional <Simplified Chinese text...>",
help="Converts Simplified Chinese characters to Traditional Chinese."
)
async def traditional(ctx: commands.Context, *, simp: str):
return await kong.send(ctx, hanziconv.HanziConv.toTraditional(simp))
return await ctx.send(hanziconv.HanziConv.toTraditional(simp))


@zeph.command(
Expand Down

0 comments on commit 4299469

Please sign in to comment.