Re-adding even more stuff I shouldn't have deleted

This commit is contained in:
unknown 2023-03-12 17:49:13 +01:00
parent 9563b1fe5c
commit 48fe34b651
2 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,5 @@
from .recruitment import Recruitment from .recruitment import Recruitment
from redbot.core.bot import Red from redbot.core.bot import Red
def setup(bot: Red): async def setup(bot: Red) -> None:
bot.add_cog(Recruitment(bot)) await bot.add_cog(Recruitment(bot))
##async def setup(bot: Red) -> None:
## await bot.add_cog(Recruitment(bot))

View File

@ -3,8 +3,11 @@ from typing import Union, List, Literal
from datetime import timedelta from datetime import timedelta
from copy import copy from copy import copy
import contextlib import contextlib
import gettext
import discord import discord
_ = gettext.gettext
from redbot.core import Config, checks, commands from redbot.core import Config, checks, commands
from redbot.core.utils import AsyncIter from redbot.core.utils import AsyncIter
from redbot.core.utils.chat_formatting import pagify, box from redbot.core.utils.chat_formatting import pagify, box
@ -25,7 +28,7 @@ class Recruitment(commands.Cog):
default_guild_settings = {"output_channel": None, "active": False, "next_application": 1} default_guild_settings = {"output_channel": None, "active": False, "next_application": 1}
default_application = {"apply": {}} default_application = {"application": {}}
# This can be made configurable later if it # This can be made configurable later if it
# becomes an issue. # becomes an issue.
@ -45,6 +48,8 @@ class Recruitment(commands.Cog):
self.bot = bot self.bot = bot
self.config = Config.get_conf(self, 42631423034200142, force_registration=True) self.config = Config.get_conf(self, 42631423034200142, force_registration=True)
self.config.register_guild(**self.default_guild_settings) self.config.register_guild(**self.default_guild_settings)
self.config.init_custom("RECRUITMENT", 2)
self.config.register_custom("RECRUITMENT", **self.default_application)
self.antispam = {} self.antispam = {}
self.user_cache = [] self.user_cache = []
self.tunnel_store = {} self.tunnel_store = {}
@ -193,7 +198,7 @@ class Recruitment(commands.Cog):
return application_number return application_number
@commands.group(name="Application", usage="[text]", invoke_without_command=True) @commands.group(name="application", usage="[text]", invoke_without_command=True)
async def application(self, ctx: commands.Context, *, _application: str = ""): async def application(self, ctx: commands.Context, *, _application: str = ""):
"""Send an application. """Send an application.