28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
from telethon import events
|
|
from telethon.utils import get_display_name
|
|
from telethon.events import StopPropagation
|
|
from telethon.tl.custom import Button
|
|
import logging
|
|
|
|
log = logging.getLogger('welcome')
|
|
|
|
@events.register(events.NewMessage(pattern='^/help', incoming=True))
|
|
async def help(ev):
|
|
await ev.respond(f"""Full list of commands:\n
|
|
/help - get this message
|
|
/new - create a new prompt
|
|
/edit - edit your current prompt
|
|
/copy - copy your last prompt
|
|
/start - get the welcome message
|
|
/info - get info about the current status of the bot
|
|
/register - register your Horde key
|
|
/kudos - details about your kudos
|
|
/models - get the list of models
|
|
""")
|
|
|
|
@events.register(events.NewMessage(pattern='^/register$', incoming=True))
|
|
async def register(ev):
|
|
await ev.respond("You can register your own Horde api key by writing `/register YOUR_HORDE_KEY_HERE`.\nBy registering your own account, you will stop being a guest and you will be able to send and receive kudos from/to users, unlock higher limits and earn kudos by sharing your GPU.", buttons=[Button.url('Register to the Horde', 'https://stablehorde.net/register')])
|
|
|
|
handler = [help,register]
|