mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
feat: partially backport perms v2 for v13 (#8162)
This commit is contained in:
@@ -143,6 +143,11 @@ client.on('ready', async () => {
|
||||
const guildCommandFromGlobal = await client.application?.commands.fetch(guildCommandId, { guildId: testGuildId });
|
||||
const guildCommandFromGuild = await client.guilds.cache.get(testGuildId)?.commands.fetch(guildCommandId);
|
||||
|
||||
await client.application?.commands.edit(globalCommandId, { defaultMemberPermissions: null });
|
||||
await globalCommand?.edit({ defaultMemberPermissions: null });
|
||||
await globalCommand?.setDefaultMemberPermissions(null);
|
||||
await guildCommandFromGlobal?.edit({ dmPermission: false });
|
||||
|
||||
// @ts-expect-error
|
||||
await client.guilds.cache.get(testGuildId)?.commands.fetch(guildCommandId, { guildId: testGuildId });
|
||||
|
||||
@@ -831,6 +836,14 @@ declare const applicationCommandManager: ApplicationCommandManager;
|
||||
expectType<Promise<Collection<Snowflake, ApplicationCommand>>>(
|
||||
applicationCommandManager.set([applicationCommandData], '0'),
|
||||
);
|
||||
|
||||
applicationCommandManager.create({
|
||||
name: 'yeet',
|
||||
description: 'abc',
|
||||
defaultMemberPermissions: 1n,
|
||||
dmPermission: false,
|
||||
type: 'CHAT_INPUT',
|
||||
});
|
||||
}
|
||||
|
||||
declare const applicationNonChoiceOptionData: ApplicationCommandOptionData & {
|
||||
|
||||
Reference in New Issue
Block a user