fix: kick and ban context menu items showing in wrong order due to use of splicing instead of pushing in createMemberContextMenuItems
This commit is contained in:
parent
8b8c0591a5
commit
dee08dd152
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ export default async (member: GuildMemberResponse, guildId: string, confirmation
|
|||
console.log("[MENUITEM] member is not me");
|
||||
if (hasPermission(me.value, Permission.KickMember)) {
|
||||
console.log("[MENUITEM] has kick member permission");
|
||||
moderationSection.items.splice(Math.min(3, menuSections.length), 0, {
|
||||
moderationSection.items.push({
|
||||
name: "Kick",
|
||||
icon: "lucide:user-x",
|
||||
type: "danger",
|
||||
|
@ -40,7 +40,7 @@ export default async (member: GuildMemberResponse, guildId: string, confirmation
|
|||
|
||||
if (hasPermission(me.value, Permission.BanMember)) {
|
||||
console.log("[MENUITEM] has ban permission");
|
||||
moderationSection.items.splice(Math.min(4, menuSections.length), 0, {
|
||||
moderationSection.items.push({
|
||||
name: "Ban (WIP)",
|
||||
icon: "lucide:ban",
|
||||
type: "danger",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue