Reverting recruitment cog
This commit is contained in:
parent
b9e535f739
commit
5f2a44ebb8
@ -3,7 +3,6 @@ import datetime
|
|||||||
import re
|
import re
|
||||||
from typing import List
|
from typing import List
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import configparser
|
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
@ -25,18 +24,9 @@ class Recruitment(commands.Cog):
|
|||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.message: str = ''
|
self.message: str = ''
|
||||||
config = configparser.ConfigParser()
|
self.config = Config.get_conf(self, identifier=101101101101001110101) # Replace with your own unique identifier
|
||||||
config.read('config.ini')
|
default_guild = {"guild_id": 274657393936302080, "application_channel_id": None}
|
||||||
|
|
||||||
identifier_id = int(config['DEFAULT']['identifier_id'])
|
|
||||||
self.config = Config.get_conf(self, identifier=identifier_id)
|
|
||||||
|
|
||||||
self.guild_id = int(config['DEFAULT']['guild_id'])
|
|
||||||
self.trial_role_id = int(config['DEFAULT']['trial_role_id'])
|
|
||||||
|
|
||||||
default_guild = {"guild_id": self.guild_id, "application_channel_id": None}
|
|
||||||
self.config.register_guild(**default_guild)
|
self.config.register_guild(**default_guild)
|
||||||
|
|
||||||
self.antispam = {}
|
self.antispam = {}
|
||||||
|
|
||||||
async def cog_check(self, ctx: commands.Context):
|
async def cog_check(self, ctx: commands.Context):
|
||||||
@ -173,7 +163,7 @@ class Recruitment(commands.Cog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Assign the Trial role to the author
|
# Assign the Trial role to the author
|
||||||
role = guild.get_role(self.trial_role_id)
|
role = guild.get_role(531181363420987423)
|
||||||
try:
|
try:
|
||||||
await member.add_roles(role)
|
await member.add_roles(role)
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
@ -233,4 +223,4 @@ class Recruitment(commands.Cog):
|
|||||||
|
|
||||||
async def get_answers(self, author: discord.Member) -> discord.Message:
|
async def get_answers(self, author: discord.Member) -> discord.Message:
|
||||||
"""Wait for the user to send a message."""
|
"""Wait for the user to send a message."""
|
||||||
return await self.bot.wait_for("message", check=lambda m: m.author == author and isinstance(m.channel, discord.DMChannel))
|
return await self.bot.wait_for("message", check=lambda m: m.author == author and isinstance(m.channel, discord.DMChannel))
|
||||||
Loading…
x
Reference in New Issue
Block a user