v0.12.0
Pre-release
Pre-release
This is breaking release
Interactions is finished!
Now you can fully operate with interactions, including Modal, Autocomplete & UI Commands.
Client changes
The Client class no longer exists. There are three DiscordApplications:
- with gateway, cache and rest: DiscordApplication;
- without gateway: DiscordRestApplication;
- and without gateway and rest: DiscordCacheApplication.
All client properties have been renamed to app.
Startup changes
The createApp function no longer exists. The replacement is DiscordFactory:
import { DiscordFactory, IntentsUtil } from 'discordoo'
const app = DiscordFactory.create('discord-bot-token', { // ApplicationOptions
gateway: { // passing GatewayOptions
intents: IntentsUtil.ALL // passing intents to work with all events
}
})
app.on('messageCreate', context => { // MessageCreateEventContext
const { message: msg } = context
if (msg.content === '!ping') { // some kind of command
// the latency is updated once every 40 seconds as soon as the heartbeat occurs
msg.reply(`🏓 pong! ${app.gateway.ping}ms`)
}
})
app.start()Docs
We switched to Angular documentation, now it's easier to use and it looks nicer. Check it out: https://docs.ddoo.dev/
NodeJS Update
v0.12.0 requires NodeJS v16.13 or newer. Discordoo now compiles to ES2020 target.
Full changelog
See: v0.11.5...v0.12.0