discord-starboard-plus
Version:
Discord Starboard Plus: A clean, maintainable starboard system for Discord.js bots. Features per-guild configuration, TypeScript support. Highlight your community's favorite messages with customizable starboards.
149 lines (113 loc) โข 4.97 kB
Markdown
# โญ Discord Starboard Plus
[](https://www.npmjs.com/package/discord-starboard-plus)
[](https://www.npmjs.com/package/discord-starboard-plus)
[](https://github.com/GlamgarOnDiscord/discord-starboard-plus/blob/master/LICENSE)
> A modern, TypeScript-first starboard system for Discord.js v14.25+. Highlight your community's favorite messages with customizable starboards, per-guild configuration, and Components V2 support.
> UPDATED ON 20/12/2025
## ๐ช Table of Contents
- [Features](#-features)
- [Installation](#-installation)
- [Usage](#-usage)
- [Options](#-options)
- [Per-Guild Configuration](#-per-guild-configuration)
- [Components V2](#-components-v2)
- [TypeScript](#-typescript)
- [Contributing](#-contributing)
- [License](#-license)
## ๐ Features
- **TypeScript Support** - Full type definitions included
- **Per-Guild Configuration** - Different settings for each server
- **Components V2** - Modern Discord UI with containers and media galleries
- **Smart Search** - Paginated search (500+ messages) with ID-based matching
- **GIF & Video Support** - Properly handles all media types
- **Memory Safe** - Proper event listener cleanup with `destroy()` method
- **Custom Emojis** - Use any emoji for starring messages
## โฌ๏ธ Installation
```sh
npm install discord-starboard-plus
```
**Requirements:** Node.js 18+ and discord.js 14.25+
## ๐ Usage
```js
const { Client, GatewayIntentBits, Partials } = require('discord.js');
const { Starboard } = require('discord-starboard-plus');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.MessageContent,
],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});
client.once('ready', () => {
const starboard = new Starboard(client, {
starboardChannelID: 'YOUR_CHANNEL_ID',
requiredReactions: 3,
starEmoji: 'โญ',
useComponentsV2: true,
});
});
client.login('YOUR_BOT_TOKEN');
```
## โ๏ธ Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `starboardChannelID` | `string` | *required* | Channel ID for starboard posts |
| `requiredReactions` | `number` | `1` | Minimum reactions to post |
| `starEmoji` | `string` | `'โญ'` | Emoji to watch for |
| `ignoreBots` | `boolean` | `true` | Ignore bot reactions |
| `ignoreSelf` | `boolean` | `false` | Ignore author self-reactions |
| `ignoredChannels` | `string[]` | `[]` | Channel IDs to ignore |
| `ignoreGuilds` | `string[]` | `[]` | Guild IDs to ignore |
| `updateOnReaction` | `boolean` | `true` | Update count on reaction change |
| `logActions` | `boolean` | `true` | Log to console |
| `embedColor` | `number` | `0xFFAC33` | Embed color (hex) |
| `maxAttachments` | `number` | `4` | Max attachments to show |
| `allowNSFW` | `boolean` | `false` | Allow NSFW channel messages |
| `jumpToMessage` | `boolean` | `true` | Add jump link |
| `showMessageDate` | `boolean` | `true` | Show message date |
| `maxSearchDepth` | `number` | `500` | Max messages to search |
| `useComponentsV2` | `boolean` | `false` | Use Discord Components V2 |
## ๐ Per-Guild Configuration
```js
const starboard = new Starboard(client, defaultOptions);
// Set custom config for a specific guild
starboard.setGuildConfig('GUILD_ID', {
starboardChannelID: 'DIFFERENT_CHANNEL_ID',
requiredReactions: 5,
starEmoji: '๐',
});
// Get guild config
const config = starboard.getGuildConfig('GUILD_ID');
// Remove custom config (falls back to defaults)
starboard.removeGuildConfig('GUILD_ID');
```
## ๐จ Components V2
Enable modern Discord UI with containers, sections, and media galleries (discord.js 14.19+):
```js
new Starboard(client, {
starboardChannelID: 'YOUR_CHANNEL_ID',
useComponentsV2: true,
});
```
## ๐ TypeScript
```ts
import { Starboard, StarboardOptions } from 'discord-starboard-plus';
const options: StarboardOptions = {
starboardChannelID: '123456789',
requiredReactions: 3,
};
const starboard = new Starboard(client, options);
```
## ๐งน Cleanup
```js
// Remove event listeners on shutdown
starboard.destroy();
```
## ๐ค Contributing
Contributions are welcome! Open an issue or submit a pull request on [GitHub](https://github.com/GlamgarOnDiscord/discord-starboard-plus).
## ๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
## ๐ Credits
> Created by [glamgar](https://github.com/GlamgarOnDiscord)