Easy development
This commit is contained in:
parent
ee24c7c18f
commit
9c13206c30
3 changed files with 12 additions and 9 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/.direnv
|
||||
/.envrc
|
13
main.py
Normal file → Executable file
13
main.py
Normal file → Executable file
|
@ -1,11 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Bitlair HobbyBot
|
||||
#
|
||||
# Requirements:
|
||||
# - pytz
|
||||
# - python3
|
||||
# - discord_webhook
|
||||
# - paho-mqtt
|
||||
# - discord.py
|
||||
|
||||
from time import sleep
|
||||
from string import Template
|
||||
|
@ -16,9 +11,10 @@ import datetime
|
|||
import pytz
|
||||
import paho.mqtt.client as mqtt
|
||||
import paho.mqtt.subscribe as subscribe
|
||||
import os
|
||||
|
||||
# hunter2
|
||||
token = ""
|
||||
token = os.getenv('DISCORD_TOKEN')
|
||||
webhook_url = ""
|
||||
description = 'Bitlair Bot'
|
||||
state_template = Template('$topic is now $state')
|
||||
|
@ -30,6 +26,7 @@ intents.message_content = True
|
|||
intents.members = True
|
||||
HobbyBot = commands.Bot(command_prefix='!', description=description, intents=intents)
|
||||
|
||||
|
||||
# Define bot commands
|
||||
@HobbyBot.event
|
||||
async def on_ready():
|
||||
|
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
discord.py
|
||||
discord_webhook
|
||||
paho-mqtt
|
||||
pytz
|
Loading…
Add table
Add a link
Reference in a new issue