Command
1import { commandModule, CommandType } from '@sern/handler';2import { ApplicationCommandOptionType } from 'discord.js';3
4export default commandModule({5 type: CommandType.Slash,6 plugins: [],7 description: 'Look stuff up on Google',8 options: [9 {10 name: 'query',11 description: 'The query to search for',12 type: ApplicationCommandOptionType.String,13 required: true,14 }15 ],16 execute: async (ctx) => {17 const query = ctx.options.getString('query', true);18 const url = `https://google.com/search?q=${encodeURIComponent(query)}`;19 await ctx.reply({20 content: `<${url}>`,21 });22 },23});