Refactor: Rename roleplay cog to neru_roleplay_cog

Rename the `roleplay_cog` to `neru_roleplay_cog` to align with the naming convention of other cogs and improve clarity. Update the cog loading list in `neru_bot.py` accordingly.
This commit is contained in:
Slipstream 2025-05-20 20:33:23 -06:00
parent b8248ee7a9
commit a71ac0d9ab
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD
2 changed files with 37 additions and 1 deletions

36
cogs/neru_roleplay_cog.py Normal file
View File

@ -0,0 +1,36 @@
import discord
from discord.ext import commands
from discord import app_commands
class RoleplayCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
print("RoleplayCog initialized!")
async def _backshots_logic(self, sender_mention, recipient_mention):
"""Core logic for the backshots command."""
# Format the message with sender and recipient mentions
message = f"*{sender_mention} giving {recipient_mention} BACKSHOTS*\n{recipient_mention}: w-wait.. not in front of people-!\n{sender_mention}: \"shhh, it's okay, let them watch... 𝐥𝐞𝐭 𝐭𝐡𝐞𝐦 𝐤𝐧𝐨𝐰 𝐲𝐨𝐮'𝐫𝐞 𝐦𝐢𝐧𝐞...\""
return message
# --- Prefix Command ---
@commands.command(name="backshots")
async def backshots(self, ctx: commands.Context, recipient: discord.User):
"""Send a roleplay message about giving backshots to a mentioned user."""
sender_mention = ctx.author.mention
response = await self._backshots_logic(sender_mention, recipient.mention)
await ctx.send(response)
# --- Slash Command ---
@app_commands.command(name="backshots", description="Send a roleplay message about giving backshots to a mentioned user")
@app_commands.describe(
recipient="The user receiving backshots"
)
async def backshots_slash(self, interaction: discord.Interaction, recipient: discord.User):
"""Slash command version of backshots."""
sender_mention = interaction.user.mention
response = await self._backshots_logic(sender_mention, recipient.mention)
await interaction.response.send_message(response)
async def setup(bot: commands.Bot):
await bot.add_cog(RoleplayCog(bot))

View File

@ -96,7 +96,7 @@ class NeruBot(commands.Bot):
"cogs.ping_cog",
"cogs.neru_teto_cog",
"cogs.random_strings_cog",
"cogs.roleplay_cog",
"cogs.neru_roleplay_cog",
"cogs.system_check_cog",
"cogs.teto_image_cog",
"cogs.webdrivertorso_cog",