Bugfix: discord.js PermissionOverwrites id invalid
This commit is contained in:
@@ -79,7 +79,7 @@ module.exports = () => {
|
|||||||
|
|
||||||
//set @everyone no ticket access
|
//set @everyone no ticket access
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:interaction.guild.roles.everyone,
|
id:interaction.guild.roles.everyone.id,
|
||||||
type:"role",
|
type:"role",
|
||||||
allow:[],
|
allow:[],
|
||||||
deny:[pfb.ViewChannel]
|
deny:[pfb.ViewChannel]
|
||||||
@@ -87,7 +87,7 @@ module.exports = () => {
|
|||||||
|
|
||||||
//add the user that created the ticket
|
//add the user that created the ticket
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:interaction.member.user,
|
id:interaction.member.id,
|
||||||
type:"member",
|
type:"member",
|
||||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
||||||
})
|
})
|
||||||
@@ -99,7 +99,7 @@ module.exports = () => {
|
|||||||
if (!adminrole) return
|
if (!adminrole) return
|
||||||
|
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:adminrole,
|
id:adminrole.id,
|
||||||
type:"role",
|
type:"role",
|
||||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
||||||
})
|
})
|
||||||
@@ -118,7 +118,7 @@ module.exports = () => {
|
|||||||
if (!adminrole) return
|
if (!adminrole) return
|
||||||
|
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:adminrole,
|
id:adminrole.id,
|
||||||
type:"role",
|
type:"role",
|
||||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
|
||||||
})
|
})
|
||||||
@@ -135,7 +135,7 @@ module.exports = () => {
|
|||||||
if (!adminrole) return
|
if (!adminrole) return
|
||||||
|
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:adminrole,
|
id:adminrole.id,
|
||||||
type:"role",
|
type:"role",
|
||||||
allow:[pfb.AddReactions,pfb.ViewChannel,pfb.ReadMessageHistory],
|
allow:[pfb.AddReactions,pfb.ViewChannel,pfb.ReadMessageHistory],
|
||||||
deny:[pfb.SendMessages,pfb.AttachFiles,pfb.EmbedLinks]
|
deny:[pfb.SendMessages,pfb.AttachFiles,pfb.EmbedLinks]
|
||||||
@@ -151,7 +151,7 @@ module.exports = () => {
|
|||||||
const userrole = guild.roles.cache.find(r => r.id == config.system.memberRole)
|
const userrole = guild.roles.cache.find(r => r.id == config.system.memberRole)
|
||||||
if (userrole){
|
if (userrole){
|
||||||
permissionsArray.push({
|
permissionsArray.push({
|
||||||
id:userrole,
|
id:userrole.id,
|
||||||
type:"role",
|
type:"role",
|
||||||
deny:[pfb.ViewChannel]
|
deny:[pfb.ViewChannel]
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user