Remove internal ID from pm command help (ref #882)
This commit is contained in:
@@ -134,15 +134,16 @@ async def search(evt: CommandEvent) -> EventID:
|
|||||||
|
|
||||||
@command_handler(
|
@command_handler(
|
||||||
help_section=SECTION_CREATING_PORTALS,
|
help_section=SECTION_CREATING_PORTALS,
|
||||||
help_args="<_identifier_>",
|
help_args="<_username_>",
|
||||||
help_text="Open a private chat with the given Telegram user. The identifier is "
|
help_text=(
|
||||||
"either the internal user ID, the username or the phone number. "
|
"Open a private chat with the given Telegram user. You can also use a "
|
||||||
"**N.B.** The phone numbers you start chats with must already be in "
|
"phone number instead of username, but you must have the number in "
|
||||||
"your contacts.",
|
"your Telegram contacts for that to work."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
async def pm(evt: CommandEvent) -> EventID:
|
async def pm(evt: CommandEvent) -> EventID:
|
||||||
if len(evt.args) == 0:
|
if len(evt.args) == 0:
|
||||||
return await evt.reply("**Usage:** `$cmdprefix+sp pm <user identifier>`")
|
return await evt.reply("**Usage:** `$cmdprefix+sp pm <username>`")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
id = "".join(evt.args).translate({ord(c): None for c in "+()- "})
|
id = "".join(evt.args).translate({ord(c): None for c in "+()- "})
|
||||||
|
|||||||
Reference in New Issue
Block a user