mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-11 19:03:29 +08:00
reformatting
This commit is contained in:
parent
cec0e557cd
commit
234b5754e7
@ -69,7 +69,6 @@ def get_users(msg):
|
|||||||
|
|
||||||
# Create mention string from user
|
# Create mention string from user
|
||||||
def mention(user: Dict[str, str]) -> str:
|
def mention(user: Dict[str, str]) -> str:
|
||||||
|
|
||||||
# Combine name
|
# Combine name
|
||||||
last = user.get('last_name', '')
|
last = user.get('last_name', '')
|
||||||
first = user['first_name']
|
first = user['first_name']
|
||||||
@ -91,6 +90,7 @@ def parse_command(command):
|
|||||||
result = {'predicate': markdownEscape(predicate), 'complement': markdownEscape(parsed[2]), 'swap': parsed[0] != '/'}
|
result = {'predicate': markdownEscape(predicate), 'complement': markdownEscape(parsed[2]), 'swap': parsed[0] != '/'}
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def get_text(mention_from, mention_rpl, command):
|
def get_text(mention_from, mention_rpl, command):
|
||||||
if command['predicate'] == 'me':
|
if command['predicate'] == 'me':
|
||||||
return f"{mention_from}{bool(command['complement']) * ' '}{command['complement']}!"
|
return f"{mention_from}{bool(command['complement']) * ' '}{command['complement']}!"
|
||||||
|
Loading…
Reference in New Issue
Block a user