Skip to content

Conversation

Dougley
Copy link

@Dougley Dougley commented Jan 16, 2023

This PR will add the following:

useDMPermission()

Similar to useDefaultPermission(), but prevents usage in Direct Messages if false.

Command and command option localization

export function start(): CommandHandler<Env> {
  useDescription("Start a giveaway");
  useLocalizations({
    name: {
      nl: "begin",
    },
    description: {
      nl: "Start een giveaway",
    },
  });
  // or...
  useNameLocalizations({
    nl: "begin",
  })
  useDescriptionLocalizations({
    nl: "Start een giveaway",
  })
  const channel = useChannel("channel", "Channel to hold the giveaway in", {
    types: [ChannelType.GUILD_TEXT],
    required: true,
    localizations: {
      name: {
        nl: "kanaal",
      },
      description: {
        nl: "Kanaal waar de giveaway in wordt gehouden",
      },
    },
  });
// [...]
}

afbeelding

max_length and min_length options to useString()

export function start(): CommandHandler<Env> {
  const prize = useString("prize", "Prize for the giveaway", {
    required: true,
    maxLength: 256,
    minLength: 1,
  });
  // [...]
}

afbeelding

@mrbbot
Copy link
Owner

mrbbot commented Jan 17, 2023

Hey! 👋 Thanks for the PR! Will try get this reviewed soon. 😃

also fix a few state related issues
@JadeMin
Copy link

JadeMin commented Feb 18, 2023

+1 could you make the NSFW command options too?

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.

3 participants