Describe the bug
The loadSyncedRoles function sets the properties of the syncedRoles variable to null if these properties are not specified in the config or their values are empty, which leads to errors when using the "di add user 76561198202269403@steam 219862538844635136" command.
An error has occurred while receiving data from 127.0.0.1:9000: TypeError: Cannot set properties of null (setting '76561198202269403@steam')
To Reproduce
Steps to reproduce the behavior:
Specify an empty value for the "user_id_to_discord_id" parameter in the "synced-roles.yml" config.
Restart bot.
Enter the command "di add user 76561198202269403@steam 219862538844635136".
Expected behavior
The new value of parameter "user_id_to_discord_id" must be written in config "synced-roles.yml".
Server logs
N/a
EXILED Version ("latest" is not a version):
3.2.1
Results of show plugins command in console:
N/a
Additional context
To solve this problem, you have to replace line syncedRoles = tempSyncedRoles; in file "discordIntegration.js" 273 with syncedRoles = {roleToGroup: tempSyncedRoles["roleToGroup"] ?? {}, userIdToDiscordId: tempSyncedRoles["userIdToDiscordId"] ?? {}};
Describe the bug The loadSyncedRoles function sets the properties of the syncedRoles variable to null if these properties are not specified in the config or their values are empty, which leads to errors when using the "di add user 76561198202269403@steam 219862538844635136" command.
An error has occurred while receiving data from 127.0.0.1:9000: TypeError: Cannot set properties of null (setting '76561198202269403@steam')
To Reproduce Steps to reproduce the behavior:
Expected behavior The new value of parameter "user_id_to_discord_id" must be written in config "synced-roles.yml".
Server logs N/a
EXILED Version ("latest" is not a version): 3.2.1
Results of
show plugins
command in console: N/aAdditional context To solve this problem, you have to replace line
syncedRoles = tempSyncedRoles;
in file "discordIntegration.js" 273 withsyncedRoles = {roleToGroup: tempSyncedRoles["roleToGroup"] ?? {}, userIdToDiscordId: tempSyncedRoles["userIdToDiscordId"] ?? {}};