diff --git a/src/events/school_time/discord_bot.py b/src/events/school_time/discord_bot.py index afb29e0..893b4b3 100644 --- a/src/events/school_time/discord_bot.py +++ b/src/events/school_time/discord_bot.py @@ -11,9 +11,7 @@ load_dotenv() # Load .env file DISCORD_TOKEN = os.getenv('DISCORD_TOKEN') # Discord token PASSWORD_MONGODB = os.getenv('PASSWORD_MONGODB') # Password for MongoDB URL_MONGODB = os.getenv('URL_MONGODB') # URL for MongoDB -mongo_url = "mongodb+srv://elci:" + \ - urllib.parse.quote_plus(PASSWORD_MONGODB) + \ - URL_MONGODB # URL for MongoDB (with password) +mongo_url = "mongodb+srv://elci:" + urllib.parse.quote_plus(PASSWORD_MONGODB) + URL_MONGODB # URL for MongoDB (with password) client = pymongo.MongoClient(mongo_url) # Connect to MongoDB database = client["website-class"] # Database name # Collection school time table current @@ -36,7 +34,7 @@ async def orario(ctx): # Send a message on channel #general with the subject found and the index of the subject channel = bot.get_channel(1063753802638954519).send("bot is online") await ctx.send(f"Subject found: {subject['Subject']} at index: {i}") - + print(f"Subject: {subject['Subject'], Teacher: {subject['Teacher'], Room: {subject['Room']") @bot.command() async def testpy(ctx):