There are some changes on how parameters are passed on the Events:
Check this for more info: https://github.com/discordeno/discordeno/blob/main/bot.ts#L395
- parent: 'id'
+ parentId: 'id'
- message.guild.channels.create('channelname', {
permissionOverwrites: [
id: message.guild.roles.everyone,
deny: ['VIEW_CHANNEL']
]
})
+ message.guild.channels.create({name: 'channelname',
permissionOverwrites: [
id: message.guild.id,
deny: ['VIEW_CHANNEL']
type: 'role',
]
})
+ client.helpers.createChannel(guildId, {
name: 'channelname',
permissionOverwrites: [
id: BigInt('everyoneRoleId/guildId'),
deny: [1n << 10n] // ['VIEW_CHANNEL']
type: 0,
],
}, reason);
- const embed = new Discord.MessageEmbed()
.setTitle('hello')
.addField('2', '3', true)
.setImage('url')
+ const embed = new Discord.Embed()
.setTitle('hello')
.addField({name: '2', value: '3', inline: true})
.setImage('url')
.toJSON()
+ const raw_embed = {title: 'hello', fields: [{name: '2', value: '3', inline: true}], image: {url: 'url'}}
- const files = [{attachment: new Buffer.from(IMAGE_BUFFER,"base64"), name: "leaderboard.png"}];
- message.channel.send({files})
+ const files = [{attachment: [new Buffer.from(IMAGE_BUFFER,"base64")], name: "leaderboard.png"}];
+ message.channel.send({attachments: files})
+ const {Blob} = require('Buffer')
+ const files = [{attachment: new Blob([new Buffer.from(IMAGE_BUFFER,"base64")]), name: "leaderboard.png"}];
+ client.helpers.sendMessage({file: files})
- const button = new Discord.MessageButton().setLabel(`test`).setStyle(`SUCCESS`).setCustomId(`helptest`).setEmoji('🐱');
+ const button = new Discord.Component({type: 'BUTTON'}).setLabel(`test`).setStyle(`SUCCESS`).setCustomId(`helptest`).setEmoji('🐱').toJSON();
+ const button = {type: 2, style: 3, label: 'test', customId: 'helptest', emoji: {name: '🐱'}, disabled: false}
- const selectmenu = new Discord.MessageSelectMenu()
.setCustomId(`selectItem`)
.setMinValues(1)
.setMaxValues(1)
.setPlaceholder('Select the Item for getting more info')
.addOptions(selectOptions)
+ const selectmenu = new Discord.Component({type: 'SELECT_MENU'})
.setCustomId(`selectItem`)
.setMinValues(1)
.setMaxValues(1)
.setPlaceholder('Select the Item for getting more info')
.addOptions(selectOptions)
.toJSON()
+ const selectmenu = {type: 3, customId: 'selectItem', placeholder: 'Select the Item for getting more info', minValues: 1, maxValues: 1, options: selectOptions} //Do not forget to format the emoji in the SelectOptions as object
- const row1 = new Discord.MessageActionRow().addComponents(button1, button2, button3);
+ const row1 = new Discord.Component({type: 'ACTION_ROW'}).addComponents(button1, button2, button3).toJSON();
+ const row1 = {type: 1, components: [button1, button2, button3]}