
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Create simple, yet powerful discord bots focusing on commands.
Discot is a wrapper around discord.js to simplify the creation of server bots. It permists to focus on the creation of commands instead of spending time working with discord's API.
Discot can be installed using yarn or npm.
npm install discot
# or
yarn add discot
const bot = new Bot({
token: 'discord_token', // default value: process.env.DISCORD_TOKEN
prefix: '!' // default value: '!'
});
bot.addCommand({
name: 'ping',
description: 'Reply pong',
action: message => message.channel.send('pong')
})
.addCommand({
name: 'say',
description: 'Send the text passed as first argument. Usage: "!say hello"',
action: (message, args) => message.channel.send(args[0]),
requiredArgCount: 0
})
.start(() => console.log('Bot started.'));
message
in the action
method for a command is the object from discord.js
const bot = new Bot({
token: 'discord_token', // default value: process.env.DISCORD_TOKEN
prefix: '!' // default value: '!'
});
Set your discord token in the env variable DISCORD_TOKEN (use dotenv).
bot.addCommand({
name: 'ping', // name of the command, the one to type
description: 'Reply pong', // description displayed in the help message
action: message => message.channel.send('pong'), // action to execute when the command is triggered
requiredArgCount: 1 // amount of required parameters for the command for validation
})
message
in the action
method for a command is the object from discord.js
bot.start(() => console.log('Bot started.'))
The callback is triggered when the bot is started.
Pull requests are welcome ! Feel free to contribute.
Coded with ❤️ by Corentin Thomasset.
This project is under the MIT license.
FAQs
Simple discord bot creation framework.
The npm package discot receives a total of 0 weekly downloads. As such, discot popularity was classified as not popular.
We found that discot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.