|
|
|
@ -144,6 +144,62 @@ class Client(Aobject):
|
|
|
|
|
}
|
|
|
|
|
await self.__send_message(room, msg)
|
|
|
|
|
|
|
|
|
|
async def send_firework_message(
|
|
|
|
|
self,
|
|
|
|
|
room: Union[RoomAlias, RoomId],
|
|
|
|
|
message: str,
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
Send message with the firework effect.
|
|
|
|
|
"""
|
|
|
|
|
msg = {
|
|
|
|
|
"body": message,
|
|
|
|
|
"msgtype": "nic.custom.fireworks"
|
|
|
|
|
}
|
|
|
|
|
await self.__send_message(room, msg)
|
|
|
|
|
|
|
|
|
|
async def send_confetti_message(
|
|
|
|
|
self,
|
|
|
|
|
room: Union[RoomAlias, RoomId],
|
|
|
|
|
message: str,
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
Send message with the confetti effect.
|
|
|
|
|
"""
|
|
|
|
|
msg = {
|
|
|
|
|
"body": message,
|
|
|
|
|
"msgtype": "nic.custom.confetti"
|
|
|
|
|
}
|
|
|
|
|
await self.__send_message(room, msg)
|
|
|
|
|
|
|
|
|
|
async def send_snow_message(
|
|
|
|
|
self,
|
|
|
|
|
room: Union[RoomAlias, RoomId],
|
|
|
|
|
message: str,
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
Send message with the snowfall effect.
|
|
|
|
|
"""
|
|
|
|
|
msg = {
|
|
|
|
|
"body": message,
|
|
|
|
|
"msgtype": "io.element.effect.snowfall"
|
|
|
|
|
}
|
|
|
|
|
await self.__send_message(room, msg)
|
|
|
|
|
|
|
|
|
|
async def send_space_invader_message(
|
|
|
|
|
self,
|
|
|
|
|
room: Union[RoomAlias, RoomId],
|
|
|
|
|
message: str,
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
Send message with the space invader effect.
|
|
|
|
|
"""
|
|
|
|
|
msg = {
|
|
|
|
|
"body": message,
|
|
|
|
|
"msgtype": "io.element.effects.space_invaders"
|
|
|
|
|
}
|
|
|
|
|
await self.__send_message(room, msg)
|
|
|
|
|
|
|
|
|
|
async def __save_sync_tocken(self)->NoReturn:
|
|
|
|
|
"""
|
|
|
|
|
Save the sync token.
|
|
|
|
|