Added Docker Stuff + Rearranged Files and Folders
This commit is contained in:
34
code/wingl.py
Normal file
34
code/wingl.py
Normal 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()
|
||||
Reference in New Issue
Block a user