3 Commits

Author SHA1 Message Date
faba475d67 Merge branch 'feature/intern' of gitea.nebulo9.fr:nebulo9/botmafieux into feature/intern 2026-09-21 10:51:30 +02:00
5c8c45518c Merge pull request 'feat: Reimplement the deployment process through Docker' (#5) from feature/deployment into main
Some checks failed
CD / Build and push Docker image (push) Has been cancelled
CD / Deploy to VPS (push) Has been cancelled
CI / Run tests (push) Has been cancelled
Reviewed-on: #5
2026-09-20 08:55:19 +00:00
6692c43102 feat: Add intern feature, assignment to a mentor every week, follows him/her in voice channel when they join/move or disconnect 2026-07-16 13:11:29 +02:00
3 changed files with 30 additions and 7 deletions

4
.gitignore vendored
View File

@@ -164,4 +164,6 @@ data/
*.disabled
config/
config/
tests/

View File

@@ -1,10 +1,13 @@
aiohappyeyeballs==2.6.2
aiohappyeyeballs==2.7.1
aiohttp==3.14.1
aiosignal==1.4.0
asarPy==1.0.1
async-timeout==5.0.1
attrs==26.1.0
audioop-lts==0.2.2
beautifulsoup4==4.15.0
certifi==2026.5.20
cffi==2.1.0
charset-normalizer==3.4.7
frozenlist==1.8.0
h11==0.16.0
@@ -15,6 +18,8 @@ outcome==1.3.0.post0
propcache==0.5.2
psycopg2-binary==2.9.12
py-cord==2.8.0
pycparser==3.0
PyNaCl==1.6.2
PySocks==1.7.1
python-dotenv==1.2.2
requests==2.34.2
@@ -24,8 +29,9 @@ sortedcontainers==2.4.0
soupsieve==2.8.4
trio==0.33.0
trio-websocket==0.12.2
typing_extensions==4.15.0
typing_extensions==4.16.0
urllib3==2.7.0
wavelink==3.5.2
websocket-client==1.9.0
wsproto==1.3.2
yarl==1.24.2

View File

@@ -1,7 +1,5 @@
import discord
from discord.ext import bridge
# from cogs.birthday import BirthdayCog
# from cogs.productivity import ProductivityCog
from discord.ext import commands
from cogs.cs import CSCog
from cogs.insult import InsultsCog
from cogs.roulette import RouletteCog
@@ -15,8 +13,9 @@ bot_intents.members = True
bot_intents.presences = True
bot_intents.guilds = True
bot_intents.reactions = True
bot_intents.voice_states = True
bot = bridge.Bot(command_prefix='$', intents=bot_intents)
bot = commands.Bot(command_prefix='$', intents=bot_intents)
COG_REGISTRY = {
'cs': CSCog,
@@ -29,6 +28,22 @@ COG_REGISTRY = {
from discord import option as discord_option
@bot.slash_command(name="reload", description="Reload a feature (cog) by name, or 'all')")
@discord_option(name="feature", description="Feature to reload (e.g. cs, insult, roles, roulette, all)", input_type=str, required=True)
async def reload(ctx: discord.ApplicationContext, feature: str):
# Only allow administrators
if not ctx.author or not getattr(ctx.author, 'guild_permissions', None) or not ctx.author.guild_permissions.administrator:
await ctx.respond("You must be a server administrator to use this command.", ephemeral=True)
return
await ctx.defer()
reload_feature(feature)
await ctx.followup.send(f"Reload requested for feature: {feature}", ephemeral=True)
# Register a global admin slash command directly on the bot to avoid circular imports.
from discord import option as discord_option
@bot.slash_command(name="reload", description="Reload a feature (cog) by name, or 'all')")
@discord_option(name="feature", description="Feature to reload (e.g. cs, insult, roles, roulette, all)", input_type=str, required=True)
async def reload(ctx: discord.ApplicationContext, feature: str):