Initial Commit

This commit is contained in:
root
2023-03-07 20:29:28 +00:00
parent d3ce246f7c
commit 2704e92ba9
5 changed files with 92 additions and 0 deletions

34
wingl.py Normal file
View File

@@ -0,0 +1,34 @@
import hikari
import lightbulb
import logging
import configparser
from module.rainer_board import rainerSpruche
config = configparser.ConfigParser()
config.read('config.ini')
spruchDatei = config.get('GENERAL','spruchDatei')
botToken = config.get('BOT','token')
bot = lightbulb.BotApp(
token=botToken
)
@bot.listen(hikari.StartedEvent)
async def onStarted(event):
print('Der Bot wurde gestartet!')
@bot.listen(hikari.StoppedEvent)
async def onStopped(event):
print('Der Bot wurde gestoppt!')
@bot.command
@lightbulb.command('haider', 'Meddld nen krassen Spruch raus etzadla!')
@lightbulb.implements(lightbulb.SlashCommand)
async def haider(ctx):
spruch = rainerSpruche(spruchDatei)
await ctx.respond(spruch.randomSpruch())
bot.run()