Compare commits
No commits in common. "202b25ec26695d6ed3912ce8fa5a3b34a47e90d2" and "fbd629a459ab08d364afb570f2308fd33ac283d7" have entirely different histories.
202b25ec26
...
fbd629a459
@ -1,8 +1,6 @@
|
||||
import random
|
||||
import re
|
||||
|
||||
from discord import message
|
||||
|
||||
import config as config
|
||||
import db
|
||||
import tts
|
||||
@ -10,8 +8,6 @@ import tts
|
||||
import credentials
|
||||
|
||||
import discord
|
||||
import discord.message
|
||||
import discord.channel
|
||||
|
||||
class Discord_Module(discord.Client):
|
||||
def __init__(self):
|
||||
@ -23,20 +19,10 @@ class Discord_Module(discord.Client):
|
||||
|
||||
def main(self):
|
||||
self.run(self.discordCredential.token)
|
||||
|
||||
|
||||
async def on_ready(self):
|
||||
print('Logged on as', self.user)
|
||||
|
||||
async def on_message(self, message: discord.Message):
|
||||
print("{" + message.guild.name + "}[ " + str(message.channel) + " ](" + message.author.display_name + ")> ")
|
||||
print(message.content)
|
||||
#Message ID
|
||||
#print(str(message.id))
|
||||
#Channel ID
|
||||
#print(str(message.channel.id))
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
@ -47,5 +33,3 @@ if __name__ == "__main__":
|
||||
testModule.dbCredential = credentials_manager.find_DB_Credential("praxis_bot")
|
||||
testModule.discordCredential = credentials_manager.find_Discord_Credential("praxis_bot")
|
||||
testModule.main()
|
||||
|
||||
|
||||
14
main.py
14
main.py
@ -5,7 +5,6 @@ import sys
|
||||
import time
|
||||
|
||||
import twitch_script
|
||||
import discord_script
|
||||
|
||||
import utilities_script as utility
|
||||
|
||||
@ -22,9 +21,7 @@ def main():
|
||||
|
||||
dbCert: credentials.DB_Credential = credentials_manager.find_Credential(credentials.DB_Credential, "praxis_bot")
|
||||
twitchCert: credentials.Twitch_Credential = credentials_manager.find_Twitch_Credential("praxis_bot")
|
||||
discordCert: credentials.Discord_Credential = credentials_manager.find_Discord_Credential("praxis_bot")
|
||||
|
||||
|
||||
|
||||
twitch_chat = twitch_script.Twitch_Module()
|
||||
|
||||
twitch_chat.db_manager.setup_engine(dbCert)
|
||||
@ -32,14 +29,7 @@ def main():
|
||||
|
||||
twitch_chat.join_channel(None, "thecuriousnerd")
|
||||
|
||||
discord_connection = discord_script.Discord_Module()
|
||||
discord_connection.dbCredential = dbCert
|
||||
discord_connection.discordCredential = discordCert
|
||||
|
||||
discord_connection.main()
|
||||
#Doesn't do stuff past this point
|
||||
|
||||
twitch_chat.send_message("activated")
|
||||
# twitch_chat.send_message("activated")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user