コード例 #1
0
async def on_channel_delete(channel):

    event = Map({})
    event.channel = channel
    event.server = channel.server

    await loader.execute(command=None,
                         cmdtype="ChannelRemove",
                         event=event,
                         client=client)
コード例 #2
0
async def on_typing(channel, user, when):
    event = Map({})
    event.channel = channel
    event.user = user
    event.when = when
    event.arrow = arrow.get(str(when), "YYYY-MM-DD HH:mm:ss")
    event.timestamp = event.arrow.timestamp

    await loader.execute(command=None,
                         cmdtype="Typing",
                         event=event,
                         client=client)