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

19 lines
909 B
Python
Raw Normal View History

2021-12-25 14:01:33 +00:00
import datetime
from core.elements import MessageSession, Embed, Image, EmbedField
from core.component import on_command
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)]))