mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-06 17:23:28 +08:00
[O] Remove username from text after identifying reply mention
This commit is contained in:
parent
25ec388df8
commit
4e156ae91e
@ -56,6 +56,9 @@ def get_users(msg):
|
|||||||
username = text[offset : offset + length]
|
username = text[offset : offset + length]
|
||||||
rpl_user = {'first_name': find_name_by_username(username), 'username': username}
|
rpl_user = {'first_name': find_name_by_username(username), 'username': username}
|
||||||
|
|
||||||
|
# Remove mention from message text
|
||||||
|
msg['text'] = text[:offset] + text[offset + length:]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
rpl_user = {'first_name': '自己', 'id': rpl_user['id']}
|
rpl_user = {'first_name': '自己', 'id': rpl_user['id']}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user