Adrien's Dc Bot Snippets (TS & JS)
Fast D.js TypeScript and JavaScript snippets for daily bot development.
Features
26 Snippets for both TypeScript and JavaScript:
- Command skeletons
- Command loaders
- REST API registration
- Button interactions
- Modal interactions
- Message sending
- Role management
- Permissions
- Events (ready, messageCreate, guildMemberAdd)
- Cooldown systems
- Pagination
- Reactions
- Select menus
- Autocomplete
- Context menus
- User management
- Embeds and fields
- Logging & error handling
- And more!
Usage
Quick Insert (Ctrl+Shift+P)
- Press
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)
- Type
Insert Snippet
- Search for the snippet prefix
Tab Autocomplete
Start typing a prefix and press Tab:
JavaScript:
cmdjs - D.js command skeleton
embedjs - Embed builder
buttonjs - Button interaction handler
sendjs - Send message
kickjs - Kick member
- And 21 more...
TypeScript:
cmdts - D.js command skeleton (TS)
embedts - Embed builder (TS)
buttonts - Button interaction handler (TS)
sendts - Send message (TS)
kickts - Kick member (TS)
- And 21 more...
Snippet Prefixes
| Feature |
JavaScript |
TypeScript |
| Command Skeleton |
cmdjs |
cmdts |
| Command Loader |
loaderjs |
loaderts |
| REST API Registration |
restregjs |
restregts |
| Button Interaction |
buttonjs |
buttonts |
| Modal Interaction |
modaljs |
modalts |
| Embed Builder |
embedjs |
embedts |
| Send Message |
sendjs |
sendts |
| Assign Role |
assignrolejs |
assignrolts |
| Remove Role |
removerolejs |
removerolts |
| Check Permission |
permjs |
permts |
| Kick Member |
kickjs |
kickts |
| Ban Member |
banjs |
bants |
| Ready Event |
readyjs |
readyts |
| Message Create Event |
msgjs |
msgts |
| Guild Member Add Event |
memberaddjs |
memberaddts |
| Cooldown System |
cooldownjs |
cooldownts |
| Pagination |
paginationjs |
paginationts |
| Reaction Handler |
reactionjs |
reactionts |
| Select Menu |
selectjs |
selectts |
| Autocomplete |
autocompletejs |
autocompletets |
| Context Menu Command |
contextjs |
contextts |
| Slash Command with Options |
cmdoptionjs |
cmdoptionts |
| Fetch User |
fetchuserjs |
fetchuserts |
| Get Guild Member |
getmemberjs |
getmembts |
| Logger Setup |
loggerjs |
loggerts |
| Error Handler |
errorjs |
errorts |
| Create Role |
createrolejs |
createrolts |
| Delete Message |
deletemsgjs |
deletemsgts |
| Embed with Fields |
embedfieldjs |
embedfieldts |
Requirements
- VS Code 1.85.0 or higher
- D.js library
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "D.js Snippets"
- Click Install
Or install from the VS Code Marketplace
License
MIT - See LICENSE file
Not Affiliated
This extension is not affiliated with Discord or Discord.js. It's a community-made snippet pack for faster development.
Contributing
Found a bug or want to suggest a new snippet? Feel free to open an issue or submit a pull request!
Changelog
See CHANGELOG.md for version history.
| |