Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
elouangrimm authored Oct 29, 2024
1 parent ed49aab commit f174aff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
13 changes: 9 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import random
import datetime
from chatterbot import ChatBot

# Made By Elouan Grimm

Expand All @@ -14,13 +13,13 @@

# BOT VARIABLES:
server_id = 1284250086003708025
chatbot = ChatBot("Tidy Tab Groups")
username = "Tidy Tab Groups"
pfp_path = "pfp.png"
rich_presence = "Tab Organization"
extension_url = "https://chromewebstore.google.com/detail/tidy-tab-groups/fohgbkobjdckaapjimleemkolchkmebf"
ALLOWED_ROLES = ["updates", "socials", "stuff", "support", "ping", "yapper"]
tips_file = "tips.txt"
responses_file = "responses.txt"
tip_time = 9
user_points = {}
ping_responses = [
Expand Down Expand Up @@ -60,6 +59,12 @@ def load_tips():
print("Tip File Loaded")
return tips

def load_responses():
with open(responses_file, "r") as file:
responses = [line for line in file.read().splitlines() if not line.startswith("#")]
print("Responses File Loaded")
return responses


@tasks.loop(minutes=1)
async def send_daily_tip():
Expand All @@ -73,11 +78,11 @@ async def send_daily_tip():

# ☲☲☲☲ COMMANDS ☲☲☲☲

# Response to a Ping with AI
# Response to a Ping
@bot.event
async def on_message(message):
if bot.user.mentioned_in(message):
response = chatbot.get_response(message)
response = random.choice(responses)
await message.reply(response)

await bot.process_commands(message)
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

discord.py
chatterbot.py
discord.py
Empty file added responses.txt
Empty file.

0 comments on commit f174aff

Please sign in to comment.