Compare commits
29 Commits
backup-ref
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| acc7eaa861 | |||
| 5a31115458 | |||
| b35ecb52b7 | |||
| 7ea6a52a6c | |||
| 65ddb244fe | |||
| 500c7daaae | |||
| 07b436ed8c | |||
| 01a484ddb6 | |||
| acb71337fa | |||
| 0e5afcb999 | |||
| b27a734e3c | |||
| 9ad286b671 | |||
| b186a9c119 | |||
| d3ee48112a | |||
| 48c3793768 | |||
| 141efc4253 | |||
| 61b81068ba | |||
| a0df694243 | |||
| ca7dba5af6 | |||
| d65197e552 | |||
| 0909717fb6 | |||
| 84a2b41a79 | |||
| 82e48c2383 | |||
| 2d199d9247 | |||
| f546eaa633 | |||
| e0330148c2 | |||
| 3955e61a62 | |||
| a3e210a7ce | |||
| 5fd4e08d90 |
4
hiring/__init__.py
Normal file
4
hiring/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from .hiring import Hiring
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Hiring(bot))
|
||||
@@ -33,6 +33,11 @@ class StaffApplicationModal(discord.ui.Modal, title="Staff Application"):
|
||||
await self.ticket_channel.send(embed=embed)
|
||||
await interaction.response.send_message("Your staff application has been submitted.", ephemeral=True)
|
||||
|
||||
await interaction.response.send_message("Your application has been submitted!", ephemeral=True)
|
||||
if isinstance(interaction.channel, discord.TextChannel):
|
||||
await interaction.channel.send(embed=embed)
|
||||
|
||||
|
||||
class PMApplicationModal(discord.ui.Modal, title="PM Application"):
|
||||
ad = discord.ui.TextInput(label="Your Ad", style=discord.TextStyle.paragraph)
|
||||
reqs = discord.ui.TextInput(label="Your Requirements", style=discord.TextStyle.paragraph)
|
||||
|
||||
15
hiring/info.json
Normal file
15
hiring/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"author": [ "unstableCogs" ],
|
||||
"install_msg": "Thank you for installing the Hiring cog! Use `[p]help Hiring` for a list of commands.",
|
||||
"name": "Hiring",
|
||||
"short": "A ticket-based system for staff and PM applications.",
|
||||
"description": "Provides /hire and /work commands to manage the staff and PM hiring process through a ticket system with forms and buttons.",
|
||||
"tags": [
|
||||
"hiring",
|
||||
"tickets",
|
||||
"utility",
|
||||
"modmail"
|
||||
],
|
||||
"requirements": [],
|
||||
"end_user_data_statement": "This cog stores user IDs and the content of their applications for the duration of the hiring process."
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"author" : ["KWUK"],
|
||||
"install_msg" : "Thank you for installing my repo! If you need support, create an issue on Gitea or ping me in KWDS.",
|
||||
"install_msg" : "Thank you for installing my repo! If you need support, create an issue on Gitea or ping me in KWDS. Cogs: hiring, kbump, kofishop, modmail, mors, pp, rpg, iservice, welcomer. ",
|
||||
"name" : "unstable-cogs",
|
||||
"short" : "Cogs for Red-DiscordBot!",
|
||||
"description" : "Cogs for Red-DiscordBot!",
|
||||
|
||||
4
kofishop/__init__.py
Normal file
4
kofishop/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from .kofishop import KofiShop
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(KofiShop(bot))
|
||||
@@ -1,10 +1,13 @@
|
||||
import discord
|
||||
from redbot.core import commands, Config, app_commands
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
import datetime
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from redbot.core.bot import Red
|
||||
|
||||
# --- Modals for the Forms ---
|
||||
|
||||
class OrderModal(discord.ui.Modal, title="Commission Order Form"):
|
||||
commission_type = discord.ui.TextInput(label="What type of commission?")
|
||||
payment_status = discord.ui.TextInput(label="Is this a Free or Paid commission?")
|
||||
@@ -18,19 +21,20 @@ class OrderModal(discord.ui.Modal, title="Commission Order Form"):
|
||||
async def on_submit(self, interaction: discord.Interaction):
|
||||
guild = interaction.guild
|
||||
if not guild:
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
channel_id = await self.cog.config.guild(guild).order_channel()
|
||||
if not channel_id:
|
||||
await interaction.response.send_message("Order channel not set.", ephemeral=True)
|
||||
await interaction.response.send_message("The order channel has not been set by an admin.", ephemeral=True)
|
||||
return
|
||||
|
||||
|
||||
channel = guild.get_channel(channel_id)
|
||||
if not isinstance(channel, discord.TextChannel):
|
||||
await interaction.response.send_message("Invalid order channel.", ephemeral=True)
|
||||
await interaction.response.send_message("The configured order channel is invalid.", ephemeral=True)
|
||||
return
|
||||
|
||||
embed = discord.Embed(title=f"New Order from {interaction.user.name}", color=discord.Color.blurple())
|
||||
embed.set_author(name=interaction.user.name, icon_url=interaction.user.display_avatar.url)
|
||||
embed.add_field(name="Commission Type", value=self.commission_type.value, inline=False)
|
||||
embed.add_field(name="Payment Status", value=self.payment_status.value, inline=False)
|
||||
embed.add_field(name="Description", value=self.description.value, inline=False)
|
||||
@@ -40,6 +44,7 @@ class OrderModal(discord.ui.Modal, title="Commission Order Form"):
|
||||
await channel.send(embed=embed)
|
||||
await interaction.response.send_message("Your order has been submitted!", ephemeral=True)
|
||||
|
||||
|
||||
class ReviewModal(discord.ui.Modal, title="Shop Review"):
|
||||
item_name = discord.ui.TextInput(label="What item/commission are you reviewing?")
|
||||
rating = discord.ui.TextInput(label="Rating (out of 10)", max_length=2)
|
||||
@@ -56,12 +61,12 @@ class ReviewModal(discord.ui.Modal, title="Shop Review"):
|
||||
|
||||
channel_id = await self.cog.config.guild(guild).review_channel()
|
||||
if not channel_id:
|
||||
await interaction.response.send_message("Review channel not set.", ephemeral=True)
|
||||
await interaction.response.send_message("The review channel has not been set by an admin.", ephemeral=True)
|
||||
return
|
||||
|
||||
channel = guild.get_channel(channel_id)
|
||||
if not isinstance(channel, discord.TextChannel):
|
||||
await interaction.response.send_message("Invalid review channel.", ephemeral=True)
|
||||
await interaction.response.send_message("The configured review channel is invalid.", ephemeral=True)
|
||||
return
|
||||
|
||||
embed = discord.Embed(title=f"New Review for {self.item_name.value}", color=discord.Color.gold())
|
||||
@@ -73,17 +78,21 @@ class ReviewModal(discord.ui.Modal, title="Shop Review"):
|
||||
await interaction.response.send_message("Thank you for your review!", ephemeral=True)
|
||||
|
||||
|
||||
# --- Main Cog Class ---
|
||||
|
||||
class KofiShop(commands.Cog):
|
||||
"""
|
||||
An interactive front-end for a Ko-fi store.
|
||||
"""
|
||||
|
||||
def __init__(self, bot: "Red"):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=1234567894, force_registration=True)
|
||||
default_guild = {
|
||||
"order_channel": None,
|
||||
"review_channel": None,
|
||||
"waitlist_channel": None
|
||||
"waitlist_channel": None,
|
||||
"waitlist_entries": {} # For DataManager
|
||||
}
|
||||
self.config.register_guild(**default_guild)
|
||||
|
||||
@@ -93,33 +102,45 @@ class KofiShop(commands.Cog):
|
||||
"""Place an order for a commission."""
|
||||
await interaction.response.send_modal(OrderModal(self))
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.command(name="rev")
|
||||
@app_commands.guild_only()
|
||||
async def review(self, interaction: discord.Interaction):
|
||||
"""Leave a review for a completed commission."""
|
||||
await interaction.response.send_modal(ReviewModal(self))
|
||||
|
||||
@app_commands.command()
|
||||
@commands.hybrid_command() # type: ignore
|
||||
@app_commands.guild_only()
|
||||
async def waitlist(self, interaction: discord.Interaction, *, item: str):
|
||||
"""Add an item to the waitlist."""
|
||||
guild = interaction.guild
|
||||
if not guild:
|
||||
async def waitlist(self, ctx: commands.Context, user: Optional[discord.Member], *, item: str):
|
||||
"""Add a user and their requested item to the waitlist."""
|
||||
if not ctx.guild:
|
||||
return
|
||||
|
||||
target_user = user or ctx.author
|
||||
|
||||
channel_id = await self.config.guild(guild).waitlist_channel()
|
||||
if not channel_id:
|
||||
await interaction.response.send_message("Waitlist channel not set.", ephemeral=True)
|
||||
return
|
||||
waitlist_channel_id = await self.config.guild(ctx.guild).waitlist_channel()
|
||||
if not waitlist_channel_id:
|
||||
return await ctx.send("The waitlist channel has not been set by an admin.", ephemeral=True)
|
||||
|
||||
channel = guild.get_channel(channel_id)
|
||||
if not isinstance(channel, discord.TextChannel):
|
||||
await interaction.response.send_message("Invalid waitlist channel.", ephemeral=True)
|
||||
return
|
||||
waitlist_channel = ctx.guild.get_channel(waitlist_channel_id)
|
||||
if not isinstance(waitlist_channel, discord.TextChannel):
|
||||
return await ctx.send("The configured waitlist channel is invalid.", ephemeral=True)
|
||||
|
||||
embed = discord.Embed(description=f"{item} ིྀ {interaction.user.mention}✧ {interaction.channel.mention if isinstance(interaction.channel, discord.TextChannel) else ''}")
|
||||
await channel.send(embed=embed)
|
||||
await interaction.response.send_message("You have been added to the waitlist!", ephemeral=True)
|
||||
message_to_send = f"**{item}** ིྀ {target_user.mention} ✧ in {ctx.channel.mention if isinstance(ctx.channel, discord.TextChannel) else 'this ticket'}"
|
||||
|
||||
try:
|
||||
sent_message = await waitlist_channel.send(message_to_send)
|
||||
# For DataManager
|
||||
async with self.config.guild(ctx.guild).waitlist_entries() as entries:
|
||||
entries[str(sent_message.id)] = datetime.datetime.now(datetime.timezone.utc).isoformat()
|
||||
|
||||
await ctx.send(f"{target_user.mention} has been added to the waitlist for '{item}'.", ephemeral=True)
|
||||
# Also send confirmation to user's ticket if it's a ticket channel
|
||||
if isinstance(ctx.channel, discord.TextChannel) and "ticket" in ctx.channel.name.lower():
|
||||
await ctx.channel.send(f"You have been added to the waitlist for **{item}**.")
|
||||
|
||||
except discord.Forbidden:
|
||||
await ctx.send("I do not have permission to send messages in the waitlist channel.", ephemeral=True)
|
||||
|
||||
|
||||
@commands.group(aliases=["kset"]) # type: ignore
|
||||
@commands.guild_only()
|
||||
@@ -154,3 +175,4 @@ class KofiShop(commands.Cog):
|
||||
|
||||
async def setup(bot: "Red"):
|
||||
await bot.add_cog(KofiShop(bot))
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
from .modmail import Modmail
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Modmail(bot))
|
||||
@@ -1,4 +1,4 @@
|
||||
import discord
|
||||
import discord
|
||||
import datetime
|
||||
from redbot.core import commands, Config, app_commands
|
||||
from typing import Optional
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"author": ["kitsunic"],
|
||||
"author": [ "kitsunic" ],
|
||||
"name": "PP",
|
||||
"description": "A cog for password protected channels",
|
||||
"end_user_data_statement": "This cog stores user, avatar, and guild data. A simple delete request to bot to remove your data or guild data",
|
||||
"install_msg": "Thanks for installing & testing.",
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
{
|
||||
"author" : ["UnstableKitsune (unstablekitsune)"],
|
||||
"install _msg" : "Oh you installed me! How dare you obtain me! return me right now!",
|
||||
"name" : "RPG",
|
||||
"short" : "Its a TTRPG",
|
||||
"requirements" : [""],
|
||||
"permissions" : [""],
|
||||
"tags" : [""],
|
||||
"min_python_version" : [3, 1, 1],
|
||||
"end_user_data_statement" : ""
|
||||
"author": [
|
||||
"UnstableKitsune (unstablekitsune)"
|
||||
],
|
||||
"install_msg": "Thank you for installing the RPG cog! Get ready for an adventure. Use the help command to see available actions.",
|
||||
"name": "RPG",
|
||||
"short": "A text-based tabletop role-playing game cog.",
|
||||
"description": "A comprehensive TTRPG system allowing users to create characters, manage inventory, go on adventures, and interact with a game world, all within Discord.",
|
||||
"requirements": [],
|
||||
"permissions": [],
|
||||
"tags": [
|
||||
"rpg",
|
||||
"game",
|
||||
"ttrpg",
|
||||
"fun",
|
||||
"adventure"
|
||||
],
|
||||
"min_python_version": [
|
||||
3,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end_user_data_statement": "This cog stores user data persistently. This includes character sheets (stats, inventory, etc.) and game progress tied to your Discord User ID."
|
||||
}
|
||||
4
translator/__init__.py
Normal file
4
translator/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from .translator import Translator
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Translator(bot))
|
||||
17
translator/info.json
Normal file
17
translator/info.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"author": [
|
||||
"unstableCogs"
|
||||
],
|
||||
"install_msg": "Thank you for installing the Translator cog. Use the `/translate` command to get started.",
|
||||
"name": "Translator",
|
||||
"short": "Translates text into various fantasy and fun languages.",
|
||||
"description": "A feature-rich translator cog ported from a web application. Supports numerous languages from Common to Valspiren, Sinary, and more. Includes a command to list all available languages.",
|
||||
"tags": [
|
||||
"translate",
|
||||
"fun",
|
||||
"roleplay",
|
||||
"language"
|
||||
],
|
||||
"requirements": [],
|
||||
"end_user_data_statement": "This cog does not store any end user data."
|
||||
}
|
||||
@@ -1 +1,4 @@
|
||||
from .welcomer import setup
|
||||
from .welcomer import Welcomer
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Welcomer(bot))
|
||||
Reference in New Issue
Block a user