Compare commits
No commits in common. "8f2ae75dc8658e1d14e14b40d5c6a082f789a0ac" and "1438e5fbab309e9feebce2314085ed54345e5398" have entirely different histories.
8f2ae75dc8
...
1438e5fbab
@ -17,7 +17,6 @@ import credentials
|
|||||||
import discord
|
import discord
|
||||||
import discord.message
|
import discord.message
|
||||||
import discord.channel
|
import discord.channel
|
||||||
import discord.abc
|
|
||||||
|
|
||||||
from cooldowns import Cooldown_Module
|
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.commands = command_loader.load_commands_new(AbstractCommand.CommandType.DISCORD)
|
||||||
|
|
||||||
self.tts_enabled: bool = False
|
self.tts_enabled: bool = False
|
||||||
self.selected_ttsChannels:list = []
|
|
||||||
|
|
||||||
async def startup(self):
|
async def startup(self):
|
||||||
await self.start(self.discordCredential.token)
|
await self.start(self.discordCredential.token)
|
||||||
@ -50,34 +48,17 @@ class Discord_Module(discord.Client):
|
|||||||
async def on_message(self, message: discord.Message):
|
async def on_message(self, message: discord.Message):
|
||||||
print("{" + message.guild.name + "}[ " + str(message.channel) + " ](" + message.author.display_name + ")> ")
|
print("{" + message.guild.name + "}[ " + str(message.channel) + " ](" + message.author.display_name + ")> ")
|
||||||
print(message.content)
|
print(message.content)
|
||||||
#print(message.channel.id)
|
|
||||||
#Message ID
|
#Message ID
|
||||||
#print(str(message.id))
|
#print(str(message.id))
|
||||||
|
#Channel ID
|
||||||
#print(str(message.channel.id))
|
#print(str(message.channel.id))
|
||||||
if message.content == "//testing":
|
if message.content == "//test":
|
||||||
await message.channel.send('test response')
|
await message.channel.send('test response')
|
||||||
#test = self.get_channel(431129571308339210)
|
|
||||||
#await test.send("testerino")
|
|
||||||
|
|
||||||
if not await self.isSenderBot(message):
|
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:
|
if self.cooldownModule.isCooldownActive("discordRateLimit") == False:
|
||||||
await self.eval_commands(message)
|
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)
|
await self.tts_message(message)
|
||||||
|
|
||||||
|
|
||||||
async def eval_automaticEvents(self, message: discord.Message):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
async def eval_commands(self, message: discord.Message):
|
async def eval_commands(self, message: discord.Message):
|
||||||
|
|||||||
2
main.py
2
main.py
@ -32,8 +32,6 @@ def discord_module_init(dbCert, discordCert):
|
|||||||
discord_connection.dbCredential = dbCert
|
discord_connection.dbCredential = dbCert
|
||||||
discord_connection.discordCredential = discordCert
|
discord_connection.discordCredential = discordCert
|
||||||
|
|
||||||
discord_connection.selected_ttsChannels.append(431129571308339210)
|
|
||||||
|
|
||||||
discord_connection.main()
|
discord_connection.main()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user