mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-11-02 22:42:54 +00:00
Fix potential conflicts in snowflake keys
This can happen on really old channels with the same ID as the guild ID and having a command with both a role and a channel.
This commit is contained in:
@@ -50,7 +50,7 @@ import re
|
||||
from .enums import AppCommandOptionType, AppCommandType
|
||||
from ..interactions import Interaction
|
||||
from ..enums import ChannelType, try_enum
|
||||
from .models import Choice
|
||||
from .models import AppCommandChannel, AppCommandThread, Choice
|
||||
from .errors import CommandSignatureMismatch, CommandAlreadyRegistered
|
||||
from ..utils import resolve_annotation, MISSING, is_inside_class
|
||||
from ..user import User
|
||||
@@ -195,6 +195,8 @@ annotation_to_option_type: Dict[Any, AppCommandOptionType] = {
|
||||
User: AppCommandOptionType.user,
|
||||
Member: AppCommandOptionType.user,
|
||||
Role: AppCommandOptionType.role,
|
||||
AppCommandChannel: AppCommandOptionType.channel,
|
||||
AppCommandThread: AppCommandOptionType.channel,
|
||||
# StageChannel: AppCommandOptionType.channel,
|
||||
# StoreChannel: AppCommandOptionType.channel,
|
||||
# VoiceChannel: AppCommandOptionType.channel,
|
||||
|
||||
Reference in New Issue
Block a user