Update events.py

This commit is contained in:
Elmon11 2020-10-31 21:08:36 +01:00 committed by GitHub
parent 04662bf765
commit e20507df69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,16 +10,25 @@ from datetime import datetime
from discord.ext import commands
from checks import *
from functions import *
from unicode import *
telnet_ip = "localhost"
telnet_port = 22
telnet_username = "root"
telnet_password = "root"
class Events(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
config = read_json('config')
telnet_ip = config['TELNET_IP']
telnet_port = config['TELNET_PORT']
telnet_username = config['TELNET_USERNAME']
telnet_password = config['TELNET_PASSWORD']
self.bot.reaction_roles = []
self.bot.telnet_object = telnet(telnet_ip, telnet_port, telnet_username, telnet_password)
self.bot.telnet_object.connect()