Initial commit
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
23
tests/test_message_channel_discussion.py
Normal file
23
tests/test_message_channel_discussion.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add the root directory of your project to the Python path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
print(sys.path)
|
||||
|
||||
from business_objects.bot_minecraft_bois import Bot_Minecraft_Bois
|
||||
from datastores.datastore_minecraft_bois_discussion import DataStore_Minecraft_Bois_Discussion
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import asyncio
|
||||
|
||||
async def main():
|
||||
TOKEN = os.getenv('ID_TOKEN_BOT')
|
||||
MESSAGE = 'Test message from the Discord bot!'
|
||||
|
||||
bot = DataStore_Minecraft_Bois_Discussion(TOKEN)
|
||||
await bot.post_message_to_channel_discussion(MESSAGE)
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
22
tests/test_message_server_start.py
Normal file
22
tests/test_message_server_start.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add the root directory of your project to the Python path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
from business_objects.bot_minecraft_bois import Bot_Minecraft_Bois
|
||||
from datastores.datastore_minecraft_bois_discussion import DataStore_Minecraft_Bois_Discussion
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import asyncio
|
||||
|
||||
async def main():
|
||||
TOKEN = os.getenv('ID_TOKEN_BOT')
|
||||
MESSAGE = 'Starting the DeceasedCraft server!'
|
||||
|
||||
bot = DataStore_Minecraft_Bois_Discussion(TOKEN)
|
||||
await bot.post_message_to_channel_discussion(MESSAGE)
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
22
tests/test_message_server_stop.py
Normal file
22
tests/test_message_server_stop.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add the root directory of your project to the Python path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
from business_objects.bot_minecraft_bois import Bot_Minecraft_Bois
|
||||
from datastores.datastore_minecraft_bois_discussion import DataStore_Minecraft_Bois_Discussion
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import asyncio
|
||||
|
||||
async def main():
|
||||
TOKEN = os.getenv('ID_TOKEN_BOT')
|
||||
MESSAGE = 'Stopping the DeceasedCraft server!'
|
||||
|
||||
bot = DataStore_Minecraft_Bois_Discussion(TOKEN)
|
||||
await bot.post_message_to_channel_discussion(MESSAGE)
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user