Compare commits
No commits in common. "c04322ccd7c3b9f2e6b633d5531c126813bfccf9" and "a167a7eba45bec0202b95329d94a5564080062e5" have entirely different histories.
c04322ccd7
...
a167a7eba4
@ -18,5 +18,5 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
bot.tts_enabled = True
|
bot.tts_enabled = True
|
||||||
elif args[1] == "stop":
|
elif args[1] == "stop":
|
||||||
if twitch_message.sender.lower() == twitch_message.channel:
|
if twitch_message.sender.lower() == twitch_message.channel:
|
||||||
bot.send_message("tts deactivated on #%s" % twitch_message.channel)
|
bot.send_message("tts activated on #%s" % twitch_message.channel)
|
||||||
bot.tts_enabled = False
|
bot.tts_enabled = False
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import re
|
|||||||
|
|
||||||
from discord import message
|
from discord import message
|
||||||
from discord.client import Client
|
from discord.client import Client
|
||||||
import asyncio
|
|
||||||
|
|
||||||
import config as config
|
import config as config
|
||||||
import db
|
import db
|
||||||
@ -23,7 +22,6 @@ from cooldowns import Cooldown_Module
|
|||||||
class Discord_Module(discord.Client):
|
class Discord_Module(discord.Client):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.loop = asyncio.get_event_loop()
|
|
||||||
self.dbCredential: credentials.DB_Credential
|
self.dbCredential: credentials.DB_Credential
|
||||||
self.discordCredential: credentials.Discord_Credential
|
self.discordCredential: credentials.Discord_Credential
|
||||||
|
|
||||||
@ -34,13 +32,8 @@ class Discord_Module(discord.Client):
|
|||||||
|
|
||||||
self.tts_enabled: bool = False
|
self.tts_enabled: bool = False
|
||||||
|
|
||||||
async def startup(self):
|
|
||||||
await self.start(self.discordCredential.token)
|
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
print("starting loop")
|
self.run(self.discordCredential.token)
|
||||||
self.loop.create_task(self.startup())
|
|
||||||
self.loop.run_forever()
|
|
||||||
|
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
print('Logged on as', self.user)
|
print('Logged on as', self.user)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user