1.2.0 • Published 4 months ago
@microfox/discord v1.2.0
Microfox Discord SDK
A lightweight, type-safe SDK for interacting with the Discord API v10
Installation
npm install @microfox/discord
Environment Variables
The following environment variables are used by this SDK:
DISCORD_BOT_TOKEN
: The Discord bot token is required to authenticate with the Discord API. You can obtain this token by creating a bot application on the Discord Developer Portal. (Required)
Additional Information
Use the createDiscordSdk
constructor to create a new Discord client.
The SDK supports Discord API v10 with comprehensive type safety.
Supports both guild-specific and global slash commands.
Includes full moderation, channel, and role management capabilities.
API Reference
For detailed documentation on the constructor and all available functions, see:
- createDiscordSdk
- sendMessage
- editMessage
- deleteMessage
- fetchMessages
- reactToMessage
- createThread
- fetchGuildInfo
- fetchUserInfo
- registerSlashCommand
- registerGlobalSlashCommand
- deleteSlashCommand
- deleteGlobalSlashCommand
- moderateUser
- createChannel
- updateChannel
- deleteChannel
- createRole
- updateRole
- deleteRole
- addRoleToUser
- removeRoleFromUser
- fetchChannels
- fetchRoles
- fetchSlashCommands
- fetchGlobalSlashCommands
- registerCommand
- registerGlobalCommand
- handleInteraction
- respondToInteraction
- deferInteraction
- followUpInteraction