Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Nov 6, 2024
1 parent a463831 commit b7ac833
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/commands/SetPowerLevelCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ export async function execSetPowerLevelCommand(roomId: string, event: any, mjoln

for (const targetRoomId of targetRooms) {
try {
const currentLevels = await mjolnir.client.getRoomStateEvent(
targetRoomId,
"m.room.power_levels",
"",
);
const currentLevels = await mjolnir.client.getRoomStateEvent(targetRoomId, "m.room.power_levels", "");
const currentLevel = currentLevels["users"][mjolnirId];
if (!force) {
if (mjolnir.moderators.checkMembership(target)) {
Expand All @@ -58,10 +54,10 @@ export async function execSetPowerLevelCommand(roomId: string, event: any, mjoln
}
if (target === mjolnirId && level < currentLevel) {
await mjolnir.managementRoomOutput.logMessage(
LogLevel.INFO,
"PowerLevelCommand",
`You are attempting to lower the bot power level: current level ${currentLevel}, requested level ${level}, aborting.`,
);
LogLevel.INFO,
"PowerLevelCommand",
`You are attempting to lower the bot power level: current level ${currentLevel}, requested level ${level}, aborting.`,
);
return;
}
await mjolnir.client.setUserPowerLevel(target, targetRoomId, level);
Expand Down

0 comments on commit b7ac833

Please sign in to comment.