chillihero
chillihero
Explore posts from servers
SIASapphire - Imagine a framework
Created by chillihero on 1/9/2024 in #sapphire-support
How to use "and" & "or" with preconditions?
ah wait as a guild owner / with administator permission you automatically have the manage server permission so the multiple preconditions are not necessary. would still intrest me tho
14 replies
SIASapphire - Imagine a framework
Created by chillihero on 1/9/2024 in #sapphire-support
How to use "and" & "or" with preconditions?
what would the result of this logic be? <Manager AND RoleHigher> OR GuildOwner OR GuildAdmin
14 replies
SIASapphire - Imagine a framework
Created by chillihero on 1/9/2024 in #sapphire-support
How to use "and" & "or" with preconditions?
easier syntax would be awesome
14 replies
SIASapphire - Imagine a framework
Created by Disuqi on 8/30/2023 in #sapphire-support
Sync Slash Commands with one Guild
nvm it was not
8 replies
SIASapphire - Imagine a framework
Created by Disuqi on 8/30/2023 in #sapphire-support
Sync Slash Commands with one Guild
public override registerApplicationCommands(
registry: ApplicationCommandRegistry
) {
const commandGuilds = process.env.NODE_ENV !== 'production' ?["ID_HERE"] : []; registry.registerChatInputCommand(
(command) => {
command.setName(this.name).setDescription(this.description);
},
{
idHints: [],
guildIds: commandGuilds,
}
);
}
public override registerApplicationCommands(
registry: ApplicationCommandRegistry
) {
const commandGuilds = process.env.NODE_ENV !== 'production' ?["ID_HERE"] : []; registry.registerChatInputCommand(
(command) => {
command.setName(this.name).setDescription(this.description);
},
{
idHints: [],
guildIds: commandGuilds,
}
);
}
Would solve the problem of changing guildCommands for prod & dev environment. (if you use two different ones) (not sure if i read that requirement from your message correctly)
8 replies
SIASapphire - Imagine a framework
Created by Oreo ™ on 8/2/2023 in #sapphire-support
editable commands
ah plugin, my bad
56 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/10/2023 in #discordjs-support
"Failed to find guild, or unknown type for channel" even when not using channel.add()
No description
10 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/10/2023 in #discordjs-support
"Failed to find guild, or unknown type for channel" even when not using channel.add()
always latest, using renovate
10 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #sapphire-support
How to check if a number (the permission integer) has the manage server permission?
Solution
const p: bigint = BigInt(guild.permissions);
const PermissionsBitField = new BitField(enumToObject(PermissionFlagsBits));
const hasManageGuild =
PermissionsBitField.has(p, PermissionFlagsBits.Administrator) || PermissionsBitField.has(p, PermissionFlagsBits.ManageGuild);
const p: bigint = BigInt(guild.permissions);
const PermissionsBitField = new BitField(enumToObject(PermissionFlagsBits));
const hasManageGuild =
PermissionsBitField.has(p, PermissionFlagsBits.Administrator) || PermissionsBitField.has(p, PermissionFlagsBits.ManageGuild);
8 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #sapphire-support
How to check if a number (the permission integer) has the manage server permission?
from this "permissions": "2147484672",
8 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
think imma take a break, this cant be that complicated
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
my brain is not functional rn, im sorry haha
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
i don't follow
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
on it
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
its expecting a Record
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
can I create a bitfield from a number there?
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
ah
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
and as far as I understood it imports discord.js ws
53 replies
SIASapphire - Imagine a framework
Created by chillihero on 7/15/2023 in #discordjs-support
Cant resolve zlib-sync
theonly issue now, is that i want to import discord.js in another place to use the permission bitfield
53 replies