mirror of
https://gitlab.com/octospacc/WinDog.git
synced 2025-06-05 22:09:20 +02:00
More work on Matrix, move commands to new HTML locales, fix Mastodon
This commit is contained in:
14
ModWinDog/Multifun/Multifun.py
Normal file → Executable file
14
ModWinDog/Multifun/Multifun.py
Normal file → Executable file
@ -4,19 +4,19 @@
|
||||
# ==================================== #
|
||||
|
||||
def mMultifun(context:EventContext, data:InputMessageData) -> None:
|
||||
cmdkey = data.Name
|
||||
cmdkey = data.command.name
|
||||
replyToId = None
|
||||
if data.Quoted:
|
||||
replyFromUid = data.Quoted.User.Id
|
||||
if data.quoted:
|
||||
replyFromUid = data.quoted.user.id
|
||||
# TODO work on all platforms for the bot id
|
||||
if replyFromUid.split(':')[1] == TelegramToken.split(':')[0] and 'bot' in Locale.__(cmdkey):
|
||||
Text = choice(Locale.__(f'{cmdkey}.bot'))
|
||||
elif replyFromUid == data.User.Id and 'self' in Locale.__(cmdkey):
|
||||
Text = choice(Locale.__(f'{cmdkey}.self')).format(data.User.Name)
|
||||
elif replyFromUid == data.user.id and 'self' in Locale.__(cmdkey):
|
||||
Text = choice(Locale.__(f'{cmdkey}.self')).format(data.user.name)
|
||||
else:
|
||||
if 'others' in Locale.__(cmdkey):
|
||||
Text = choice(Locale.__(f'{cmdkey}.others')).format(data.User.Name, data.Quoted.User.Name)
|
||||
replyToId = data.Quoted.messageId
|
||||
Text = choice(Locale.__(f'{cmdkey}.others')).format(data.user.name, data.quoted.user.name)
|
||||
replyToId = data.quoted.message_id
|
||||
else:
|
||||
if 'empty' in Locale.__(cmdkey):
|
||||
Text = choice(Locale.__(f'{cmdkey}.empty'))
|
||||
|
Reference in New Issue
Block a user