diff --git a/README.md b/README.md index c9bcb5a..12e0728 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,6 @@ vinci bot - socials notification system - chatbot using IBM's AI (thanks @gosevil for the idea) - joke command -- recording voice channels +- recording voice channels (wip) -2 forks! tysm! \ No newline at end of file +3 stars! tysm! \ No newline at end of file diff --git a/commands/misc/giveaway.ts b/commands/forEvents/giveaway.ts similarity index 100% rename from commands/misc/giveaway.ts rename to commands/forEvents/giveaway.ts diff --git a/commands/misc/ping.ts b/commands/forEvents/ping.ts similarity index 100% rename from commands/misc/ping.ts rename to commands/forEvents/ping.ts diff --git a/commands/misc/mcform.ts b/commands/minecraft/mcform.ts similarity index 100% rename from commands/misc/mcform.ts rename to commands/minecraft/mcform.ts diff --git a/commands/misc/mcform_modal.ts b/commands/minecraft/mcform_modal.ts similarity index 100% rename from commands/misc/mcform_modal.ts rename to commands/minecraft/mcform_modal.ts diff --git a/commands/moderation/ban.ts b/commands/moderation/ban.ts new file mode 100644 index 0000000..82b23f8 --- /dev/null +++ b/commands/moderation/ban.ts @@ -0,0 +1,32 @@ +const { commandModule, CommandType } = require('@sern/handler'); +import { publish } from "../../src/plugins/publish"; +import { ownerOnly } from "../../src/plugins/ownerOnly"; +import { ApplicationCommandOptionType, EmbedBuilder } from 'discord.js' + +export default commandModule({ + name: 'ban', + type: CommandType.Both, + plugins: [publish(['1000400148289036298', '928018226330337280']), ownerOnly()], + description: 'ADMIN: Banea usuarios.', + options: [{ + name: 'usuario', + description: 'Escribe un usuario.', + type: ApplicationCommandOptionType.User, + required: true + }, + { + name: 'razon', + description: 'Escribe la razón.', + type: ApplicationCommandOptionType.String, + required: true + }], + //alias : [], + execute: async (ctx, options, message) => { + const userToBan = options[1].getMember('usuario', true); + const reason = options[1].get('razon', true).value; + const sendToMods = ctx.client.guilds.cache.get('928018226330337280')!.channels.cache.get('1004118323258208257') + await sendToMods.send({content: `Se ha baneado a ${userToBan}.\nBan efectuado por ${ctx.user} con razón "${reason}."`}) + userToBan.ban(reason) + await ctx.reply({content: 'Baneado correctamente!', ephemeral: true}) + }, +}); \ No newline at end of file