Correctly name timeout command

This commit is contained in:
floppydiskette 2024-11-19 01:20:12 +00:00
parent 02fdfdd532
commit 28ca47394b
Signed by: fwoppydwisk
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE

View file

@ -23,9 +23,9 @@ public class Timeout extends ApplicationCommand {
subcommand = "set", subcommand = "set",
description = "Times out a member" description = "Times out a member"
) )
public void mute(GuildSlashEvent event, public void timeout(GuildSlashEvent event,
@AppOption(name = "member") Member member, @AppOption(name = "member") Member member,
@AppOption(name = "duration", description = "ex: 2h5m, must be between 1h and 7d") String duration) { @AppOption(name = "duration", description = "ex: 2h5m, must be between 1m and 7d") String duration) {
Duration timeoutDuration = DurationUtils.parseDuration(duration); Duration timeoutDuration = DurationUtils.parseDuration(duration);
member.timeoutFor(timeoutDuration).queue(); member.timeoutFor(timeoutDuration).queue();
event.replyFormat("Timed out %s for %s", member.getAsMention(), duration).queue(); event.replyFormat("Timed out %s for %s", member.getAsMention(), duration).queue();