mirror of
https://github.com/SrIzan10/templates.git
synced 2026-05-01 11:05:17 +00:00
feat: add changes to sync with latest changes (#9)
Latest changes come from -> https://github.com/sern-handler/handler/pull/64
This commit is contained in:
@@ -9,14 +9,12 @@
|
||||
"keywords": [
|
||||
"javacsript",
|
||||
"sern",
|
||||
"discord.js",
|
||||
"cli"
|
||||
"discord.js"
|
||||
],
|
||||
"author": "EvolutionX",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@sern/handler": "^1.0.1-beta",
|
||||
"discord.js": "^14.0.0-dev.1650672498-3617093"
|
||||
"@sern/handler": "^1.1.0-beta",
|
||||
"discord.js": "^14.0.0-dev.1654776344-94bdcac"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.25"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
const { CommandType, sernModule } = require('@sern/handler');
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
|
||||
exports.default = sernModule([], {
|
||||
exports.default = commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [],
|
||||
description: 'A ping command',
|
||||
//alias : [],
|
||||
execute: (ctx, args) => {
|
||||
ctx.reply({ content: 'Pong 🏓' });
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply('Pong 🏓');
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,11 +9,12 @@ const client = new Client({
|
||||
GatewayIntentBits.MessageContent, // Make sure this is enabled for text commands!
|
||||
],
|
||||
});
|
||||
|
||||
//View docs for all options
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'src/commands',
|
||||
events: '', // join discord server to learn how to load events!
|
||||
});
|
||||
|
||||
client.login();
|
||||
|
||||
@@ -9,14 +9,12 @@
|
||||
"keywords": [
|
||||
"typescript",
|
||||
"sern",
|
||||
"discord.js",
|
||||
"cli"
|
||||
"discord.js"
|
||||
],
|
||||
"author": "EvolutionX",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@sern/handler": "^1.0.1-beta",
|
||||
"discord.js": "^14.0.0-dev.1650672498-3617093"
|
||||
"@sern/handler": "^1.1.0-beta",
|
||||
"discord.js": "^14.0.0-dev.1654776344-94bdcac"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.25",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Args, CommandType, Context, sernModule } from '@sern/handler';
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
|
||||
export default sernModule([], {
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [],
|
||||
description: 'A ping command',
|
||||
//alias : [],
|
||||
execute: (ctx: Context, args: Args) => {
|
||||
ctx.reply({ content: 'Pong 🏓' });
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply({ content: 'Pong 🏓' });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,11 +9,12 @@ const client = new Client({
|
||||
GatewayIntentBits.MessageContent, //Make sure this is enabled for text commands!
|
||||
],
|
||||
});
|
||||
|
||||
//View docs for all options
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'dist/commands',
|
||||
events: '', // join discord server to learn how to load events!
|
||||
});
|
||||
|
||||
client.login();
|
||||
|
||||
Reference in New Issue
Block a user