FunkyBot/cogs/coder.py
Funky Waddle 9d56d9ccc5 initial
2025-06-16 03:06:06 -05:00

50 lines
2 KiB
Python

import discord
from discord import app_commands
from discord.ext import commands
from libs.Cog import Cog
from libs.Role import Role
class Coder(Cog):
def __init__(self, bot):
super().__init__(bot)
self.messages_deletable = True
self.role = Role()
@app_commands.command(
name="coder",
description="removes the Matrix-Refuser Penguins role if you have it, and adds the Matrix Penguins role"
)
async def coder(self, interaction: discord.Interaction):
await self.role.add_role(interaction, "Matrix Penguins")
await self.role.remove_role(interaction, "Matrix-Refuser Penguins")
await interaction.response.send_message("You are now a Matrix Penguin", ephemeral=True)
@app_commands.command(
name="nocoder",
description="removes the Matrix Penguins role from your status"
)
async def nocoder(self, interaction: discord.Interaction):
await self.role.remove_role(interaction, "Matrix Penguins")
await interaction.response.send_message("You are no longer a Matrix Penguin", ephemeral=True)
@app_commands.command(
name="refuse",
description="removes the Matrix Penguins role if you have it, and adds the Matrix-Refuser Penguins role"
)
async def refuse(self, interaction: discord.Interaction):
await self.role.add_role(interaction, "Matrix-Refuser Penguins")
await self.role.remove_role(interaction, "Matrix Penguins")
await interaction.response.send_message("You are now a Matrix-Refuser Penguin", ephemeral=True)
@app_commands.command(
name="norefuse",
description="removes the Matrix-Refuser Penguins role from your status"
)
async def norefuse(self, interaction: discord.Interaction):
await self.role.remove_role(interaction, "Matrix-Refuser Penguins")
await interaction.response.send_message("You are no longer a Matrix-Refuser Penguin", ephemeral=True)
async def setup(bot):
await bot.add_cog(Coder(bot), guilds=[discord.Object(id=bot.guild_id)])