Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slash_command 无法更新 #31

Open
s-yh-china opened this issue May 31, 2024 · 3 comments
Open

slash_command 无法更新 #31

s-yh-china opened this issue May 31, 2024 · 3 comments
Labels
question Further information is requested

Comments

@s-yh-china
Copy link

我在调试我的机器人时在修改和注册指令,但是discord那边始终无法刷新新的指令,而已经被修改的指令会提示 未知集成
我确定我在配置中设置了 "application_commands": {"*": ["*"]}
以下是可能没用的日志

05-31 12:31:26 [SUCCESS] nonebot | NoneBot is initializing...
05-31 12:31:26 [INFO] nonebot | Current Env: prod
05-31 12:31:27 [SUCCESS] nonebot | Succeeded to load plugin "arkdle" from "plugins.arkdle"
05-31 12:31:27 [SUCCESS] nonebot | Running NoneBot...
05-31 12:31:27 [INFO] nonebot | Discord | Discord Adapter is starting up...
05-31 12:31:27 [INFO] nonebot | Application startup completed.
05-31 12:31:35 [WARNING] nonebot | Discord | Received unexpected HeartbeatAck event when identifying
05-31 12:31:35 [INFO] nonebot | Discord | Bot 1245070577643946044 connected
05-31 12:31:35 [SUCCESS] nonebot | Discord 1245070577643946044 | [ReadyEvent]: {'v': 10, 'user': {'id': 1245070577643946044, 'username': '/dev/game/arkdle', 'discriminator': '8171', 'global_name': None, 'avatar': '2e6ab667d0c408d038196f6e6640dfb0', 'bot': True, 'system': <UNSET>, 'mfa_enabled': True, 'banner': <UNSET>, 'accent_color': <UNSET>, 'locale': <UNSET>, 'verified': True, 'email': None, 'flags': 0, 'premium_type': <UNSET>, 'public_flags': <UNSET>, 'avatar_decoration': <UNSET>}, 'guilds': [{'id': 1245074270820892862, 'unavailable': True}], 'session_id': '31118497c28504bfbac2897fdb6a166e', 'resume_gateway_url': 'wss://gateway-us-east1-b.discord.gg', 'shard': [0, 1], 'application': {'id': '1245070577643946044', 'flags': 27828224}, 'timestamp': datetime.datetime(2024, 5, 31, 12, 31, 35, 966566), 'user_settings': {}, 'session_type': 'normal', 'relationships': [], 'private_channels': [], 'presences': [], 'guild_join_requests': [], 'geo_ordered_rtc_regions': ['hongkong', 'japan', 'singapore', 'india', 'dubai'], 'auth': {}, '_trace': ['["gateway-prd-us-east1-b-vlx7",{"micros":139617,"calls":["id_created",{"micros":771,"calls":[]},"session_lookup_time",{"micros":286,"calls":[]},"session_lookup_finished",{"micros":14,"calls":[]},"discord-sessions-prd-1-196",{"micros":138292,"calls":["start_session",{"micros":69267,"calls":["discord-api-rpc-6d994847bd-wrq9r",{"micros":57136,"calls":["get_user",{"micros":12830},"get_guilds",{"micros":22795},"send_scheduled_deletion_message",{"micros":6},"guild_join_requests",{"micros":0},"authorized_ip_coro",{"micros":6}]}]},"starting_guild_connect",{"micros":73,"calls":[]},"presence_started",{"micros":22566,"calls":[]},"guilds_started",{"micros":75,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":46262,"calls":[]},"connect_finished",{"micros":46267,"calls":[]},"build_ready",{"micros":39,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}]']}
05-31 12:31:36 [SUCCESS] nonebot | Discord 1245070577643946044 | [GuildCreateEvent]: {'id': 1245074270820892862, 'unavailable': False, 'name': 'violetc的神奇测试服务器', 'icon': None, 'icon_hash': <UNSET>, 'splash': None, 'discovery_splash': None, 'owner': <UNSET>, 'owner_id': 684192253295591475, 'permissions': <UNSET>, 'region': 'deprecated', 'afk_channel_id': None, 'afk_timeout': 300, 'widget_enabled': <UNSET>, 'widget_channel_id': <UNSET>, 'verification_level': <VerificationLevel.NONE: 0>, 'default_message_notifications': <DefaultMessageNotificationLevel.ALL_MESSAGES: 0>, 'explicit_content_filter': <ExplicitContentFilterLevel.DISABLED: 0>, 'roles': [{'id': 1245074270820892862, 'name': '@everyone', 'color': 0, 'hoist': False, 'icon': None, 'unicode_emoji': None, 'position': 0, 'permissions': '2248473465835073', 'managed': False, 'mentionable': False, 'tags': {'bot_id': <UNSET>, 'integration_id': <UNSET>, 'premium_subscriber': <UNSET>, 'subscription_listing_id': <UNSET>, 'available_for_purchase': <UNSET>, 'guild_connections': <UNSET>}}, {'id': 1245075501853446255, 'name': '/dev/game/arkdle', 'color': 0, 'hoist': False, 'icon': None, 'unicode_emoji': None, 'position': 1, 'permissions': '51200', 'managed': True, 'mentionable': False, 'tags': {'bot_id': 1245070577643946044, 'integration_id': <UNSET>, 'premium_subscriber': <UNSET>, 'subscription_listing_id': <UNSET>, 'available_for_purchase': <UNSET>, 'guild_connections': <UNSET>}}], 'emojis': [], 'features': [], 'mfa_level': <MFALevel.NONE: 0>, 'application_id': None, 'system_channel_id': 1245074270820892865, 'system_channel_flags': <SystemChannelFlags: 0>, 'rules_channel_id': None, 'max_presences': <UNSET>, 'max_members': 500000, 'vanity_url_code': None, 'description': None, 'banner': None, 'premium_tier': <PremiumTier.NONE: 0>, 'premium_subscription_count': 0, 'preferred_locale': 'en-US', 'public_updates_channel_id': None, 'max_video_channel_users': 25, 'max_stage_video_channel_users': 50, 'approximate_member_count': <UNSET>, 'approximate_presence_count': <UNSET>, 'welcome_screen': <UNSET>, 'nsfw_level': <GuildNSFWLevel.DEFAULT: 0>, 'stickers': [], 'premium_progress_bar_enabled': False, 'joined_at': '2024-05-28T18:05:32.048542+00:00', 'large': False, 'member_count': 2, 'voice_states': [], 'members': [{'user': {'id': 1245070577643946044, 'username': '/dev/game/arkdle', 'discriminator': '8171', 'global_name': None, 'avatar': '2e6ab667d0c408d038196f6e6640dfb0', 'bot': True, 'system': <UNSET>, 'mfa_enabled': <UNSET>, 'banner': <UNSET>, 'accent_color': <UNSET>, 'locale': <UNSET>, 'verified': <UNSET>, 'email': <UNSET>, 'flags': <UNSET>, 'premium_type': <UNSET>, 'public_flags': <UserFlags: 0>, 'avatar_decoration': <UNSET>}, 'nick': None, 'avatar': None, 'roles': [1245075501853446255], 'joined_at': datetime.datetime(2024, 5, 28, 18, 5, 32, 48542, tzinfo=TzInfo(UTC)), 'premium_since': None, 'deaf': False, 'mute': False, 'flags': <GuildMemberFlags: 0>, 'pending': False, 'permissions': <UNSET>, 'communication_disabled_until': None}], 'channels': [{'id': 1245074270820892863, 'type': <ChannelType.GUILD_CATEGORY: 4>, 'guild_id': <UNSET>, 'position': 0, 'permission_overwrites': [], 'name': '文字频道', 'topic': <UNSET>, 'nsfw': <UNSET>, 'last_message_id': <UNSET>, 'bitrate': <UNSET>, 'user_limit': <UNSET>, 'rate_limit_per_user': <UNSET>, 'recipients': <UNSET>, 'icon': <UNSET>, 'owner_id': <UNSET>, 'application_id': <UNSET>, 'managed': <UNSET>, 'parent_id': <UNSET>, 'last_pin_timestamp': <UNSET>, 'rtc_region': <UNSET>, 'video_quality_mode': <UNSET>, 'message_count': <UNSET>, 'member_count': <UNSET>, 'thread_metadata': <UNSET>, 'member': <UNSET>, 'default_auto_archive_duration': <UNSET>, 'permissions': <UNSET>, 'flags': <ChannelFlags: 0>, 'total_message_sent': <UNSET>, 'available_tags': <UNSET>, 'applied_tags': <UNSET>, 'default_reaction_emoji': <UNSET>, 'default_thread_rate_limit_per_user': <UNSET>, 'default_sort_order': <UNSET>, 'default_forum_layout': <UNSET>}, {'id': 1245074270820892864, 'type': <ChannelType.GUILD_CATEGORY: 4>, 'guild_id': <UNSET>, 'position': 0, 'permission_overwrites': [], 'name': '语音频道', 'topic': <UNSET>, 'nsfw': <UNSET>, 'last_message_id': <UNSET>, 'bitrate': <UNSET>, 'user_limit': <UNSET>, 'rate_limit_per_user': <UNSET>, 'recipients': <UNSET>, 'icon': <UNSET>, 'owner_id': <UNSET>, 'application_id': <UNSET>, 'managed': <UNSET>, 'parent_id': <UNSET>, 'last_pin_timestamp': <UNSET>, 'rtc_region': <UNSET>, 'video_quality_mode': <UNSET>, 'message_count': <UNSET>, 'member_count': <UNSET>, 'thread_metadata': <UNSET>, 'member': <UNSET>, 'default_auto_archive_duration': <UNSET>, 'permissions': <UNSET>, 'flags': <ChannelFlags: 0>, 'total_message_sent': <UNSET>, 'available_tags': <UNSET>, 'applied_tags': <UNSET>, 'default_reaction_emoji': <UNSET>, 'default_thread_rate_limit_per_user': <UNSET>, 'default_sort_order': <UNSET>, 'default_forum_layout': <UNSET>}, {'id': 1245074270820892865, 'type': <ChannelType.GUILD_TEXT: 0>, 'guild_id': <UNSET>, 'position': 0, 'permission_overwrites': [], 'name': '常规', 'topic': None, 'nsfw': <UNSET>, 'last_message_id': 1245957144013180958, 'bitrate': <UNSET>, 'user_limit': <UNSET>, 'rate_limit_per_user': 0, 'recipients': <UNSET>, 'icon': <UNSET>, 'owner_id': <UNSET>, 'application_id': <UNSET>, 'managed': <UNSET>, 'parent_id': 1245074270820892863, 'last_pin_timestamp': <UNSET>, 'rtc_region': <UNSET>, 'video_quality_mode': <UNSET>, 'message_count': <UNSET>, 'member_count': <UNSET>, 'thread_metadata': <UNSET>, 'member': <UNSET>, 'default_auto_archive_duration': <UNSET>, 'permissions': <UNSET>, 'flags': <ChannelFlags: 0>, 'total_message_sent': <UNSET>, 'available_tags': <UNSET>, 'applied_tags': <UNSET>, 'default_reaction_emoji': <UNSET>, 'default_thread_rate_limit_per_user': <UNSET>, 'default_sort_order': <UNSET>, 'default_forum_layout': <UNSET>}, {'id': 1245074270820892866, 'type': <ChannelType.GUILD_VOICE: 2>, 'guild_id': <UNSET>, 'position': 0, 'permission_overwrites': [], 'name': '常规', 'topic': <UNSET>, 'nsfw': <UNSET>, 'last_message_id': None, 'bitrate': 64000, 'user_limit': 0, 'rate_limit_per_user': 0, 'recipients': <UNSET>, 'icon': <UNSET>, 'owner_id': <UNSET>, 'application_id': <UNSET>, 'managed': <UNSET>, 'parent_id': 1245074270820892864, 'last_pin_timestamp': <UNSET>, 'rtc_region': None, 'video_quality_mode': <UNSET>, 'message_count': <UNSET>, 'member_count': <UNSET>, 'thread_metadata': <UNSET>, 'member': <UNSET>, 'default_auto_archive_duration': <UNSET>, 'permissions': <UNSET>, 'flags': <ChannelFlags: 0>, 'total_message_sent': <UNSET>, 'available_tags': <UNSET>, 'applied_tags': <UNSET>, 'default_reaction_emoji': <UNSET>, 'default_thread_rate_limit_per_user': <UNSET>, 'default_sort_order': <UNSET>, 'default_forum_layout': <UNSET>}, {'id': 1245722423110668452, 'type': <ChannelType.GUILD_TEXT: 0>, 'guild_id': <UNSET>, 'position': 1, 'permission_overwrites': [], 'name': '测试1', 'topic': None, 'nsfw': False, 'last_message_id': 1245787704399237281, 'bitrate': <UNSET>, 'user_limit': <UNSET>, 'rate_limit_per_user': 0, 'recipients': <UNSET>, 'icon': <UNSET>, 'owner_id': <UNSET>, 'application_id': <UNSET>, 'managed': <UNSET>, 'parent_id': 1245074270820892863, 'last_pin_timestamp': <UNSET>, 'rtc_region': <UNSET>, 'video_quality_mode': <UNSET>, 'message_count': <UNSET>, 'member_count': <UNSET>, 'thread_metadata': <UNSET>, 'member': <UNSET>, 'default_auto_archive_duration': <UNSET>, 'permissions': <UNSET>, 'flags': <ChannelFlags: 0>, 'total_message_sent': <UNSET>, 'available_tags': <UNSET>, 'applied_tags': <UNSET>, 'default_reaction_emoji': <UNSET>, 'default_thread_rate_limit_per_user': <UNSET>, 'default_sort_order': <UNSET>, 'default_forum_layout': <UNSET>}], 'threads': [], 'presences': [], 'stage_instances': [], 'guild_scheduled_events': [], 'timestamp': datetime.datetime(2024, 5, 31, 12, 31, 36, 229734), 'nsfw': False, 'embedded_activities': [], 'hub_type': None, 'activity_instances': {}, 'clan': None, 'application_command_counts': {}, 'lazy': True, 'soundboard_sounds': [], 'safety_alerts_channel_id': None, 'incidents_data': None, 'inventory_settings': None, 'home_header': None, 'latest_onboarding_question_id': None, 'version': 1716919238587}
05-31 12:35:32 [SUCCESS] nonebot | Discord 1245070577643946044 | [GuildTypingStartEvent]: {'channel_id': 1245074270820892865, 'guild_id': 1245074270820892862, 'user_id': 684192253295591475, 'timestamp': datetime.datetime(2024, 5, 31, 4, 35, 34, tzinfo=TzInfo(UTC)), 'member': {'user': {'id': 684192253295591475, 'username': 'violetc_', 'discriminator': '0', 'global_name': 'violetc', 'avatar': '8e7bd09ac6b8c71caa748aad8359e4f4', 'bot': False, 'system': <UNSET>, 'mfa_enabled': <UNSET>, 'banner': <UNSET>, 'accent_color': <UNSET>, 'locale': <UNSET>, 'verified': <UNSET>, 'email': <UNSET>, 'flags': <UNSET>, 'premium_type': <UNSET>, 'public_flags': <UserFlags: 0>, 'avatar_decoration': <UNSET>}, 'nick': None, 'avatar': None, 'roles': [], 'joined_at': datetime.datetime(2024, 5, 28, 18, 0, 38, 541000, tzinfo=TzInfo(UTC)), 'premium_since': None, 'deaf': False, 'mute': False, 'flags': <GuildMemberFlags: 0>, 'pending': False, 'permissions': <UNSET>, 'communication_disabled_until': None}}
@CMHopeSunshine CMHopeSunshine added the question Further information is requested label Jun 3, 2024
@CMHopeSunshine
Copy link
Member

能否将日志等级调成DEBUG,查看一下加载的配置(重要信息打码)

@s-yh-china
Copy link
Author

很抱歉我已经将机器人部署在服务器,暂时无法提供更多日志
但是我发现,如果修改每个文件中的第一个指令,是可以正常更新注册的

@CMHopeSunshine
Copy link
Member

每次启动都会调用接口去更新指令,可以看DEBUG日志的接口数据是否和要更新的指令数据一致

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants