Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/embed_test/__init__.py

20 lines
942 B
Python
Raw Normal View History

2021-12-25 14:01:33 +00:00
import datetime
2022-06-28 06:11:03 +00:00
from core.builtins.message import MessageSession
2022-07-31 08:27:58 +00:00
from core.component import on_command
2022-06-28 06:11:03 +00:00
from core.elements import Embed, Image, EmbedField
2021-12-25 14:01:33 +00:00
2021-12-25 14:02:13 +00:00
t = on_command('embed_test', required_superuser=True)
2021-12-25 14:01:33 +00:00
@t.handle()
async def _(session: MessageSession):
await session.sendMessage(Embed(title='Embed Test', description='This is a test embed.',
url='https://minecraft.fandom.com/zh/wiki/Minecraft_Wiki',
color=0x00ff00, timestamp=datetime.datetime.now().timestamp(),
author='oasisakari',
footer='Test',
image=Image('https://avatars.githubusercontent.com/u/68471503?s=200&v=4'),
2021-12-25 14:01:33 +00:00
fields=[EmbedField('oaoa', 'aaaaa', inline=True),
EmbedField('oaoa', 'aaaaa', inline=True)]))