From ce68afeeafa09fb65ab3211ff586fa087999d3e7 Mon Sep 17 00:00:00 2001 From: Evo <85353424+EvolutionX-10@users.noreply.github.com> Date: Wed, 17 Aug 2022 22:35:50 +0530 Subject: [PATCH] fix: js snippet for ping cmd --- docs/api/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 9650c7734..d3ed3f054 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -58,15 +58,15 @@ client.login(token); #### ` ping.js (CommonJS)` ```js -const { Sern, CommandType } = require('@sern/handler'); +const { Sern, CommandType, commandModule } = require('@sern/handler'); -exports.default = { +exports.default = commandModule({ description: 'A ping pong command', type: CommandType.Slash, execute(ctx) { ctx.reply('pong!'); } - }; + }); ``` See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more @@ -88,4 +88,4 @@ It is **highly encouraged** to use the [command line interface](https://github.c ## Roadmap -You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future. \ No newline at end of file +You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future.