aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
342 stars 134 forks source link

Bug: $newMember[addedRoles], $oldMember[removedRoles] return the same data. #646

Closed MrShidoKageno closed 2 months ago

MrShidoKageno commented 2 months ago

Bug Type

Function

Bugged Behavior

module.exports = [{
  name: "onMemberUpdate",
  type: "memberUpdate",
  channel: "$getGuildVar[logs;$guildID]",
  $if: "old",
  code: `
$if[$and[$oldMember[removedRoles]!=;$newMember[addedRoles]==]==true]
$description[Роли участника **$username** (<@$authorID>) были изменены]
$addField[Кто изменил;$getAuditLogs[$guildID;;1;25;**{executor.username}** ({executor.mention})];true]
$addField[Удалены роли;**$oldMember[removedRoles]**;true]
$footer[Id участника#COLON# $authorID;$authorAvatar]
$color[#01e5d6]
$addTimestamp
$elseif[$and[$newMember[addedRoles]!=;$oldMember[removedRoles]==]==true]
$description[Роли участника **$username** (<@$authorID>) были изменены]
$addField[Кто изменил;$getAuditLogs[$guildID;;1;25;**{executor.username}** ({executor.mention})];true]
$addField[Добавлены роли;**$newMember[addedRoles]**;true]
$footer[Id участника#COLON# $authorID;$authorAvatar]
$color[#01e5d6]
$addTimestamp
$endelseif
$elseif[$and[$oldMember[removedRoles]!=;$newMember[addedRoles]!=]==true]
$description[Роли участника **$username** (<@$authorID>) были изменены]
$addField[Кто изменил;$getAuditLogs[$guildID;;1;25;**{executor.username}** ({executor.mention})];true]
$addField[Удалены роли;**$oldMember[removedRoles]**;true]
$addField[Добавлены роли;**$newMember[addedRoles]**;true]
$footer[Id участника#COLON# $authorID;$authorAvatar]
$color[#01e5d6]
$addTimestamp
$endelseif

Version of aoi.js

v6.8.x

Version of Node.js

v22.5.1 (Current)

Excepted Output

$newMember, $oldMember return the same data.

Relevant log output

No console log.

Code of Conduct

Faf4a commented 2 months ago

Duplicate