Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from dis_snek.client import Snake
- from dis_snek.models import Activity, slash_command, Embed, InteractionContext
- from dis_snek.models.enums import Intents, ActivityType
- from dis_snek.models.listener import listen
- import configparser
- config = configparser.ConfigParser()
- config.read("config.ini", encoding='utf-8')
- bot = Snake(intents=Intents.DEFAULT)
- @listen()
- async def on_ready():
- print(f"Авторизован под: {bot.user}")
- await bot.change_presence(activity=Activity(type=ActivityType.WATCHING, name="//info"))
- @slash_command(
- name="info",
- description="Информация о боте"
- )
- async def info(ctx: InteractionContext):
- embed = Embed(
- title="World Of Tanks Status",
- description="Бот создан для отображения статуса серверов WOT. Имеет всего две команды: `//info` и `//status`.\nАвтор: [Shandy](https://github.com/Shandeika)\nИсточник данных: https://wgstatus.com")
- await ctx.send(embeds=embed)
- bot.start(config["Config"]["token"])
Advertisement
Add Comment
Please, Sign In to add comment