Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theturkeydev/discord-minimal
https://github.com/theturkeydev/discord-minimal
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/theturkeydev/discord-minimal
- Owner: TheTurkeyDev
- Created: 2021-10-19T02:54:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T21:50:25.000Z (10 months ago)
- Last Synced: 2024-05-02T01:13:01.738Z (8 months ago)
- Language: TypeScript
- Size: 319 KB
- Stars: 7
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Logo](/logo.png)
Logo by JCOnline
___
This project was started as a replacement for DiscordJS because I simply didn't need a majority of the more "advanced" features that were offered and instead just needed a really simple light weight Wrapper for the Discord API.Here's an example of a basic bot you can make with this library:
```js
const { DiscordMinimal, INTENTS } = require('discord-minimal');const client = new DiscordMinimal([ INTENTS.GUILDS, INTENTS.GUILD_MESSAGES, INTENTS.MESSAGE_CONTENT ]);
client.once('ready', () => {
console.log(`Logged in!`);
});client.on('messageCreate', message => {
if (message.content === 'hello') {
message.reply(`Hello ${message.author.username}!`);
}
});// you should store this token securely in a .env or config file
// this file should not be commited to version control or shared with anybody
// the token gives malicious actors access to your bot
client.login('token goes here');
```