-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
You have a unique light that brightens the world around you. ✨ | ||
Your smile has the power to uplift others. 😊 | ||
You are worthy of all the good things life has to offer. 🌈 | ||
Your kindness is a gift that makes a difference in the lives of others. 🎁 | ||
You are strong and capable of overcoming any challenge. 💪 | ||
Your creativity knows no bounds; you inspire those around you. 🎨 | ||
You bring joy and positivity into every situation. ☀️ | ||
You have a beautiful heart that cares deeply for others. ❤️ | ||
Your presence makes every place feel more welcoming. 🌍 | ||
You are a source of strength and inspiration to those who know you. 🌟 | ||
Your laughter is contagious and brings happiness to everyone. 😂 | ||
You are talented and have so much to offer the world. 🌟 | ||
Your unique perspective is invaluable and appreciated. 🔮 | ||
You have a wonderful ability to see the best in people. 🌷 | ||
Your determination and hard work will lead you to success. 🏆 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# cogs/generic/ping.py | ||
import discord | ||
from discord.ext import commands | ||
from discord import app_commands | ||
import random | ||
import os | ||
|
||
class Message(commands.Cog): | ||
def __init__(self, bot): | ||
self.bot = bot | ||
|
||
@commands.Cog.listener() | ||
async def on_ready(self): | ||
print('Message cog is ready') | ||
|
||
# YOUR COMMAND(S) HERE | ||
@app_commands.command(name='affirm', description='Get a positive affirmation') | ||
async def affirm(self, interaction: discord.Interaction): | ||
# Load affirmations from the text file | ||
try: | ||
file_path = os.path.join(os.path.dirname(__file__), 'affirmations.txt') | ||
with open(file_path, 'r') as file: | ||
affirmations = file.readlines() | ||
# Strip newline characters + choose random affirmation | ||
random_affirmation = random.choice([affirmation.strip() for affirmation in affirmations]) | ||
await interaction.response.send_message(random_affirmation) | ||
except FileNotFoundError: | ||
# Affirmation file not found :OO | ||
await interaction.response.send_message("Try again later ¯\\_(ツ)_/¯") | ||
|
||
|
||
async def setup(bot): | ||
await bot.add_cog(Message(bot)) |