Compare commits

..

No commits in common. "8f2ae75dc8658e1d14e14b40d5c6a082f789a0ac" and "1438e5fbab309e9feebce2314085ed54345e5398" have entirely different histories.

2 changed files with 3 additions and 24 deletions

View File

@ -17,7 +17,6 @@ import credentials
import discord
import discord.message
import discord.channel
import discord.abc
from cooldowns import Cooldown_Module
@ -34,7 +33,6 @@ class Discord_Module(discord.Client):
self.commands = command_loader.load_commands_new(AbstractCommand.CommandType.DISCORD)
self.tts_enabled: bool = False
self.selected_ttsChannels:list = []
async def startup(self):
await self.start(self.discordCredential.token)
@ -50,34 +48,17 @@ class Discord_Module(discord.Client):
async def on_message(self, message: discord.Message):
print("{" + message.guild.name + "}[ " + str(message.channel) + " ](" + message.author.display_name + ")> ")
print(message.content)
#print(message.channel.id)
#Message ID
#print(str(message.id))
#print(str(message.id))
#Channel ID
#print(str(message.channel.id))
if message.content == "//testing":
if message.content == "//test":
await message.channel.send('test response')
#test = self.get_channel(431129571308339210)
#await test.send("testerino")
if not await self.isSenderBot(message):
# This will check for the praxis_bot-tts channel and will TTS stuff from there.
await self.eval_triggeredEvents(message)
if self.cooldownModule.isCooldownActive("discordRateLimit") == False:
await self.eval_commands(message)
#await self.tts_message(message)
async def eval_triggeredEvents(self, message: discord.Message):
# This will check for the selected channels and will TTS stuff from there.
for channel in self.selected_ttsChannels:
if channel == message.channel.id:
await self.tts_message(message)
async def eval_automaticEvents(self, message: discord.Message):
pass
async def eval_commands(self, message: discord.Message):

View File

@ -32,8 +32,6 @@ def discord_module_init(dbCert, discordCert):
discord_connection.dbCredential = dbCert
discord_connection.discordCredential = discordCert
discord_connection.selected_ttsChannels.append(431129571308339210)
discord_connection.main()