prepare member_roles with template
This commit is contained in:
parent
e0c581dcfd
commit
4aee497fba
34
commands/admin/member_roles/slash.js
Normal file
34
commands/admin/member_roles/slash.js
Normal file
@ -0,0 +1,34 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from 'discord.js';
|
||||
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName('member_roles')
|
||||
.setDMPermission(false)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles)
|
||||
.setDescription('Assigns roles to new members.')
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName('add')
|
||||
.setDescription('Registers a role to be assigned to new members.')
|
||||
.addRoleOption((option) =>
|
||||
option
|
||||
.setName('role')
|
||||
.setDescription('The role to assign to new members.')
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName('remove')
|
||||
.setDescription('Unregisters a role from new member assignment.')
|
||||
.addRoleOption((option) =>
|
||||
option
|
||||
.setName('role')
|
||||
.setDescription('The role to unregister from assignmment.')
|
||||
.setRequired(true)
|
||||
)
|
||||
);
|
||||
|
||||
/** @param {ChatInputCommandInteraction} interaction */
|
||||
export async function execute(interaction) {
|
||||
const { options } = interaction;
|
||||
}
|
7
events/members/guildMemberAdd.js
Normal file
7
events/members/guildMemberAdd.js
Normal file
@ -0,0 +1,7 @@
|
||||
import { Events, GuildMember } from 'discord.js';
|
||||
|
||||
export const name = Events.GuildMemberAdd;
|
||||
/** @param {GuildMember} member */
|
||||
export function execute(member) {
|
||||
console.log(member);
|
||||
}
|
Loading…
Reference in New Issue
Block a user