Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hunteroi/discord-server-generator
A framework to generate Discord guild categories, channels and roles, built with DiscordJS
https://github.com/hunteroi/discord-server-generator
discordjs guild-generator server-generator template-discord
Last synced: 3 months ago
JSON representation
A framework to generate Discord guild categories, channels and roles, built with DiscordJS
- Host: GitHub
- URL: https://github.com/hunteroi/discord-server-generator
- Owner: HunteRoi
- License: mit
- Created: 2021-05-08T19:07:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T02:51:45.000Z (7 months ago)
- Last Synced: 2024-10-01T15:29:57.778Z (3 months ago)
- Topics: discordjs, guild-generator, server-generator, template-discord
- Language: TypeScript
- Homepage: https://hunteroi.github.io/discord-server-generator
- Size: 3.8 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Discord Server Generator
Discord Server Generator is a framework which allows you to create your server based on a JSON configuration acting like the server template.
- Supports threads, custom emojis and stickers
- Emits events like `guildGenerate`, `channelCreate`, `roleCreate` and **9 more**!
- And much more!![IMAGE](https://raw.githubusercontent.com/HunteRoi/discord-server-generator/master/assets/example.gif)
See [./examples/index.js](https://github.com/hunteroi/discord-server-generator/tree/master/examples/index.js).
## Prerequisites ⚠️
You must use **NodeJS v16.6.0 or higher** to run a bot with this library.
You must also not forget to include [mandatory intents](#mandatory-intents) as well as give your bot the rights to use application commands. You might add [optional intents](#optional-intents) if you feel like it.
As another logical note, it is mandatory that your bot's role is the highest in the guild in order for it to remove all roles from the guild's roles pool.
### Mandatory intents
- GUILDS: used to access guild content such as channels.
### Optional intents
- GUILD_EMOJIS_AND_STICKERS: use to access and add guild emojis and stickers.
## Installation
```sh
npm install --save @hunteroi/discord-server-generator
```## Events
```ts
manager.on(ServerGeneratorManagerEvents.guildGenerate, (guild: Guild, options: GuildOptions, reason?: string) => {});manager.on(ServerGeneratorManagerEvents.guildGenerated, (guild: Guild, options: GuildOptions, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.roleDelete, (role: Role, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.channelDelete, (channel: GuildChannel, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.emojiDelete, (emoji: GuildEmoji, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.stickerDelete, (sticker: Sticker, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.channelCreate, (channel: GuildChannel, options: CategoryOptions | GuildChannelOptions, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.threadCreate, (thread: ThreadChannel, options: ThreadOptions, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.roleCreate, (role: Role, options: RoleOptions, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.emojiCreate, (emoji: GuildEmoji, options: EmojiOptions, reason?: string) => {});
manager.on(ServerGeneratorManagerEvents.stickerCreate, (sticker: Sticker, options: StickerOptions, reason?: string) => {});
```## Contribution
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
1. Fork the Project
2. Create your Branch: `git checkout -b patch/YourAmazingWork`
3. Commit your Changes: `git commit -m 'Add some amazing work'`
4. Push to the Branch: `git push origin patch/YourAmazingWork`
5. Open a Pull Request