#Check Permissions
1 messages · Page 1 of 1 (latest)
These are the permission helpers you'd need, iirc it's not in dd yet
This part is added by me though so you may want to change that depending on if you want to keep the same behaviour or not
Oh thank you
was this ever added to ddeno?
not as far as i know
🥀
for which version was this code made ?
Likely v19 and above
It’s meant to be used with dd cache proxy. If you dont use that then you might have to slightly change the types and/or code
which ddprops and cache props ill need to enable for this code to work properly
Whichever it errors there without
You use TS so it’ll error if you’re missing a prop in desired prop
well, there is no error but the bot's commands that requires perms dont work 
turns out i was being stupid
guild not found
const guild = await bot.cache.guilds.get(interaction.guildId);
if (!guild) return console.log('guild not found');```
@toxic socket how do i manually populate the cache? (i thought it would be automatic for some reason lolz)
it’s automatic unless you override the customizers
To populate you send it to transformer / customizer
i dont think im overriding the customizers
so y is it not populating by itself
check if you’re receiving guild create payloads
bot.events.guildCreate = async (guild) => {
console.log(guild)
};``` is that enough
yes
well, it is logging the guild stuff, and now the guild thing is working
but its not finding the client
😭
client not found every re-start has a diff error, thats crazy
what
basically, now the guilds r getting cached properly, but now its not finding the client in the cache
for some reason
const client = await bot.cache.members.get(interaction.guildId, bot.id);
if (!client) return console.log('client not found');```
const getProxyCacheBot = (bot: Bot<BotDesiredProperties, DesiredPropertiesBehavior.RemoveKey>) =>
createProxyCache(bot, {
desiredProps: {
guild: ['channels', 'id', 'roles', 'ownerId', "members"],
member: ['roles', 'id', 'guildId'],
role: ['permissions', 'id', 'position', 'guildId'],
channel: ['id', 'type', 'guildId', 'parentId', 'permissions', 'internalOverwrites'],
},
});``` thats how my proxy cache is
k
yes
only I am using that bot
its a test bot
have you checked interaction guild id tho