AlexzanderFlores / WOKCommands

132 stars 61 forks source link

Don't creating slash commands with russian names #196

Closed SkyWatcher2019 closed 2 years ago

SkyWatcher2019 commented 2 years ago
import {ICommand} from "wokcommands";
import {MessageEmbed} from "discord.js";

export default {
    name: 'статус',
    description: 'Статус бота',
    category: 'dev',
    slash: 'both',
    callback: ({}) => {
        return new MessageEmbed()
            .setDescription('Статус');
    },
} as ICommand;

image image image image

gamer167 commented 2 years ago

I think I know why. Russian characters (letters) are invalid characters probably. Try making it with English letters and try running it again.

SkyWatcher2019 commented 2 years ago

I think I know why. Russian characters (letters) are invalid characters probably. Try making it with English letters and try running it again.

Half-year later, ok. It works fine with English letters. And I've already stopped using that handler.

tippfehlr commented 2 years ago

This is a good decision, this handler isn't the best. Although it can't do anything about that the characters are diallowed it could check them and throw an error.

Directly from Discord documentation:

Command names and command option names must match the following regex ^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$ with the unicode flag set.

SkyWatcher2019 commented 2 years ago

Although it can't do anything about that the characters are diallowed it could check them and throw an error.

изображение изображение "аватар" and "бан" commands

SkyWatcher2019 commented 2 years ago

and directly from disnake изображение изображение

tippfehlr commented 2 years ago

So it seems to work then?

SkyWatcher2019 commented 2 years ago

It worked when i opened this issue, This problem only exists in WOKCommands.