Skip to content

Commit

Permalink
remove punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
howardt12345 committed Nov 18, 2023
1 parent 696926a commit 8407987
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/tocfl/tocfl.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import string
import discord
from discord import app_commands

Expand Down Expand Up @@ -69,7 +70,7 @@ def _create_word_embed(
embed.add_field(name="Category", value=part_of_speech, inline=False)
# stroke order
embed.add_field(name="Stroke Order", value="", inline=False)
for character in word:
for character in word.translate(str.maketrans('', '', string.punctuation)):
embed.add_field(
name="",
value=f"[Stroke order for {character}](https://stroke-order.learningweb.moe.edu.tw/charactersQueryResult.do?words={character}&lang=zh_TW&csrfPreventionSalt=null)",
Expand Down

0 comments on commit 8407987

Please sign in to comment.