Roles being removed directly after being assigned

Hey all, I'm not sure if this is a Discord.js, Sapphire or me thing so I figured I'd just post here: This is logging output:
DEBUG: Message Command - Unspecified Reason
DEBUG: Break Command - Start
DEBUG: Break Command - 417825368062558219
DEBUG: Break Command - 223510183299514369
DEBUG: Break Command - User {
id: '223510183299514369',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 256 },
username: 'elidinis',
globalName: 'Elidinis',
discriminator: '0',
avatar: 'e456669281dcc57c8ada7c9ebc49e9ce',
banner: null,
accentColor: null,
avatarDecoration: null
}
DEBUG: User on break - true
DEBUG: Restoring User Roles
DEBUG: Roles to Assign: [
'417825625076793346',
'969627375866368140',
'626917188904812554',
'981618765722701954'
]
DEBUG: Hiatus role to remove: [
'1258109142191575142',
'831708196762419210',
'1240004071742771371',
'1240004071742771371'
]
DEBUG: Break Command - Finish
DEBUG: Message Command - Finish
DEBUG: Message Command - Unspecified Reason
DEBUG: Break Command - Start
DEBUG: Break Command - 417825368062558219
DEBUG: Break Command - 223510183299514369
DEBUG: Break Command - User {
id: '223510183299514369',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 256 },
username: 'elidinis',
globalName: 'Elidinis',
discriminator: '0',
avatar: 'e456669281dcc57c8ada7c9ebc49e9ce',
banner: null,
accentColor: null,
avatarDecoration: null
}
DEBUG: User on break - true
DEBUG: Restoring User Roles
DEBUG: Roles to Assign: [
'417825625076793346',
'969627375866368140',
'626917188904812554',
'981618765722701954'
]
DEBUG: Hiatus role to remove: [
'1258109142191575142',
'831708196762419210',
'1240004071742771371',
'1240004071742771371'
]
DEBUG: Break Command - Finish
DEBUG: Message Command - Finish
Then this is the code: https://gist.github.com/Baylem/ddb3846dd2e7ed5fe1b8b5c6846899c5 But for some reason, intermittently, it will assign back their roles then immediately remove them all (both Roles to Assign and the Hiatus Role) (I have not been able to reproduce this, see logging above as it provides accurate information, this was logs from an execution when it happened, the bottom Lines 225 -> 238 were not in play on the above execution as I just created that as hopefully a stopgap)
Gist
Break Command
Break Command. GitHub Gist: instantly share code, notes, and snippets.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?