feat: Add misandrist insults and big CS2 events matches fetch from HLTV.org

This commit is contained in:
2026-07-04 22:36:07 +02:00
parent 2cf7cc94bb
commit 80d34e9660
13 changed files with 692 additions and 716 deletions

29
setup/bot.py Normal file
View File

@@ -0,0 +1,29 @@
import discord
from discord.ext import bridge
# from cogs.birthday import BirthdayCog
# from cogs.productivity import ProductivityCog
from cogs.cs import CSCog
from cogs.insult import InsultsCog
from setup.logger import LOGGER
bot_intents = discord.Intents.default()
bot_intents.message_content = True
bot_intents.members = True
bot_intents.presences = True
bot_intents.guilds = True
bot_intents.reactions = True
bot = bridge.Bot(command_prefix='$', intents=bot_intents)
COGS = [CSCog, InsultsCog]
for cog in COGS:
bot.add_cog(cog(bot))
def reload_feature(feature:str):
LOGGER.debug(bot.cogs)
LOGGER.debug(f'Reloading {feature}...')
bot.remove_cog(feature.capitalize()+'Cog')
cog = globals()[feature.capitalize()+'Cog']
bot.add_cog(cog(bot))
LOGGER.debug(f'{feature} reloaded!')

8
setup/logger.py Normal file
View File

@@ -0,0 +1,8 @@
import logging
logging.basicConfig(level=logging.INFO, format='[%(levelname)s] %(asctime)s: %(name)s: %(message)s')
LOGGER = logging.getLogger('botmafieux')
LOGGER.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='botmafieux.log', encoding='utf-8', mode='a')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
LOGGER.addHandler(handler)