application stuff
This commit is contained in:
1 parent
0463e4154e
commit
dcdf88a14a
5 files changed
+299
No files matched your search
@@ -66,6 +66,21 @@ class Settings(commands.Cog):
|
||||
await self.bot.db.set_setting(key, role.id)
|
||||
await interaction.response.send_message(
|
||||
f"{label} role set to {role.mention}.", ephemeral=True)
|
||||
|
||||
@group.command(name="applications", description="Set the channel for website join applications")
|
||||
@app_commands.describe(channel="Private channel where applications are posted")
|
||||
@app_commands.checks.has_permissions(manage_guild=True)
|
||||
async def applications(self, interaction: discord.Interaction,
|
||||
channel: discord.TextChannel):
|
||||
perms = channel.permissions_for(interaction.guild.me)
|
||||
if not (perms.view_channel and perms.send_messages and perms.embed_links):
|
||||
await interaction.response.send_message(
|
||||
f"I need View Channel, Send Messages and Embed Links in {channel.mention}.",
|
||||
ephemeral=True)
|
||||
return
|
||||
await self.bot.db.set_setting(guildconf.JOIN_CHANNEL, channel.id)
|
||||
await interaction.response.send_message(
|
||||
f"Applications will be posted in {channel.mention}.", ephemeral=True)
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
|
||||
Reference in new issue
Block a user