Skip to content

Commit 401270f

Browse files
remove the /remove command (#269)
* remove the `/remove` command * comment unused code * remove /remove from register * fix:lint --------- Co-authored-by: Shubham Raj <[email protected]>
1 parent 7b8c44d commit 401270f

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/controllers/baseHandler.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
NOTIFY_ONBOARDING,
2828
OOO,
2929
USER,
30-
REMOVE,
3130
GROUP_INVITE,
3231
} from "../constants/commands";
3332
import { updateNickName } from "../utils/updateNickname";
@@ -42,7 +41,7 @@ import {
4241
RETRY_COMMAND,
4342
} from "../constants/responses";
4443
import { DevFlag } from "../typeDefinitions/filterUsersByRole";
45-
import { kickEachUser } from "./kickEachUser";
44+
// import { kickEachUser } from "./kickEachUser";
4645
import { groupInvite } from "./groupInvite";
4746

4847
export async function baseHandler(
@@ -79,14 +78,19 @@ export async function baseHandler(
7978
return await mentionEachUser(transformedArgument, env, ctx);
8079
}
8180

82-
case getCommandName(REMOVE): {
83-
const data = message.data?.options as Array<messageRequestDataOptions>;
84-
const transformedArgument = {
85-
roleToBeRemovedObj: data[0],
86-
channelId: message.channel_id,
87-
};
88-
return await kickEachUser(transformedArgument, env, ctx);
89-
}
81+
/**
82+
* HOT FIX to prevent non superusers from running the /remove commmand.
83+
* More info :- https://discord.com/channels/673083527624916993/729399523268624405/1293604361758441605
84+
* ---
85+
*/
86+
// case getCommandName(REMOVE): {
87+
// const data = message.data?.options as Array<messageRequestDataOptions>;
88+
// const transformedArgument = {
89+
// roleToBeRemovedObj: data[0],
90+
// channelId: message.channel_id,
91+
// };
92+
// return await kickEachUser(transformedArgument, env, ctx);
93+
// }
9094

9195
case getCommandName(LISTENING): {
9296
const data = message.data?.options;

src/register.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
NOTIFY_ONBOARDING,
99
OOO,
1010
USER,
11-
REMOVE,
1211
GROUP_INVITE,
1312
} from "./constants/commands";
1413
import { config } from "dotenv";
@@ -39,7 +38,6 @@ async function registerGuildCommands(
3938
USER,
4039
NOTIFY_OVERDUE,
4140
NOTIFY_ONBOARDING,
42-
REMOVE,
4341
GROUP_INVITE,
4442
];
4543

0 commit comments

Comments
 (0)