Skip to content

Conversation

hmd-ali
Copy link
Contributor

@hmd-ali hmd-ali commented Oct 17, 2025

No description provided.

@hmd-ali hmd-ali requested a review from wiktoriavh October 17, 2025 17:38
@hmd-ali hmd-ali changed the title Feat/repel feat: add /repel command to timeout users and delete recent mesages Oct 18, 2025
Comment on lines +33 to +41
const checkCanRepel = ({
commandUser,
repelRole,
}: {
commandUser: GuildMember;
repelRole: Role;
}): {
ok: boolean;
message?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you create a type for this function instead of having it be inline?

example:

type Foo = ({ bar: string; }) => boolean;

const foo: Foo = ({ bar }) => {
  // stuff
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it need to be a type in this case? the type won't be reused anywhere else

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's for readability, it's alright if it's not being reused.

Comment on lines +52 to +62
const checkCanRepelTarget = ({
target,
commandUser,
botMember,
}: {
target: User | GuildMember;
commandUser: GuildMember;
botMember: GuildMember;
}): {
ok: boolean;
message?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here for the function type

wiktoriavh
wiktoriavh previously approved these changes Oct 18, 2025
@hmd-ali hmd-ali merged commit d0a845b into main Oct 19, 2025
1 check passed
@wiktoriavh wiktoriavh deleted the feat/repel branch October 19, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants