chore!: remove all deprecated features/props (#10421)

BREAKING CHANGE: Removed `Client#fetchPremiumStickerPacks` method
BREAKING CHANGE: Removed `Client#webhookUpdate` event
BREAKING CHANGE: Removed various error codes
BREAKING CHANGE: Removed `Formatters` namespace
BREAKING CHANGE: Removed `InviteStageInstance` class
BREAKING CHANGE: Removed `Invite#stageInstance` property
BREAKING CHANGE: Removed `StageInstance#discoverable_disabled` property
BREAKING CHANGE: Removed `SelectMenuBuilder` alias
BREAKING CHANGE: Removed `SelectMenuComponent` alias
BREAKING CHANGE: Removed `SelectMenuInteraction` alias
BREAKING CHANGE: Removed `SelectMenuOptionBuilder` alias
BREAKING CHANGE: Removed `BaseInteraction#isSelectMenu` alias
BREAKING CHANGE: Removed `deleteMessageDays` option from `GuildBanManager#create`
BREAKING CHANGE: Removed `ActionRow#from` method
BREAKING CHANGE: Removed `Emoji#url` getter
BREAKING CHANGE: Removed `TeamMember#permissions` property
BREAKING CHANGE: Removed `User#avatarDecoration` property
BREAKING CHANGE: Removed `InteractionResponses#sendPremiumRequired` method
BREAKING CHANGE: Removed `DeletableMessageTypes` constant
This commit is contained in:
Denis Cristea
2024-10-04 14:17:34 +03:00
committed by GitHub
parent c1b849fa5a
commit 12e510671b
35 changed files with 44 additions and 1227 deletions

View File

@@ -1,7 +1,8 @@
'use strict';
const { token, owner } = require('./auth.js');
const { Client, Events, codeBlock, GatewayIntentBits } = require('../src');
const { token, owner, skuId } = require('./auth.js');
const { Client, Events, codeBlock, GatewayIntentBits, ActionRowBuilder, ButtonBuilder } = require('../src');
const { ButtonStyle } = require('discord-api-types/v10');
const client = new Client({ intents: GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages });
@@ -35,7 +36,14 @@ client.on(Events.InteractionCreate, async interaction => {
console.log('interaction.entitlements', interaction.entitlements);
if (interaction.commandName === 'test') {
await interaction.sendPremiumRequired();
await interaction.reply({
content: ':3:3:3',
components: [
new ActionRowBuilder().setComponents(
new ButtonBuilder().setCustomId('test').setLabel('test').setStyle(ButtonStyle.Premium).setSKUId(skuId),
),
],
});
}
});

View File

@@ -3,7 +3,7 @@
const process = require('node:process');
const { GatewayIntentBits } = require('discord-api-types/v10');
const { token, prefix, owner } = require('./auth.js');
const { Client, Options, Formatters } = require('../src');
const { Client, Options, codeBlock } = require('../src');
// eslint-disable-next-line no-console
const log = (...args) => console.log(process.uptime().toFixed(3), ...args);
@@ -44,7 +44,7 @@ const commands = {
console.error(err.stack);
res = err.message;
}
message.channel.send(Formatters.codeBlock(res));
message.channel.send(codeBlock(res));
},
ping: message => message.channel.send('pong'),
};