mo9mo9study / discord.CodeWarehouse

3 stars 2 forks source link

参加・離脱処理のエラー #46

Closed supleiades closed 3 years ago

supleiades commented 3 years ago
---> 参加時
---> 参加者: yuuty
(node:23733) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'code' of undefined
    at /home/centos/repos/discord.CodeWarehouse/node/join_leave_log.js:42:48
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:23733) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
---> 招待作成
---> 招待作成
---> 招待作成
---> 参加時
---> 参加者: ゆうち
(node:23733) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'code' of undefined
    at /home/centos/repos/discord.CodeWarehouse/node/join_leave_log.js:42:48
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:23733) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
supleiades commented 3 years ago

この問題、使用回数1回の時に発生しているかも

supleiades commented 3 years ago

自分で抜けた時の処理

[('abstractmethods', frozenset()), ('class', <class 'discord.member.Member'>), ('delattr', <method-wrapper 'delattr' of Member object at 0x7faaeb5ef6d0>), ('dir', <built-in method dir of Member object at 0x7faaeb5ef6d0>), ('doc', "Represents a Discord member to a :class:Guild.\n\n This implements a lot of the functionality of :class:User.\n\n .. container:: operations\n\n .. describe:: x == y\n\n Checks if two members are equal.\n Note that this works with :class:User instances too.\n\n .. describe:: x != y\n\n Checks if two members are not equal.\n Note that this works with :class:User instances too.\n\n .. describe:: hash(x)\n\n Returns the member's hash.\n\n .. describe:: str(x)\n\n Returns the member's name with the discriminator.\n\n Attributes\n ----------\n joined_at: Optional[:class:datetime.datetime]\n A datetime object that specifies the date and time in UTC that the member joined the guild.\n If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be None.\n activities: Tuple[Union[:class:BaseActivity, :class:Spotify]]\n The activities that the user is currently doing.\n guild: :class:Guild\n The guild that the member belongs to.\n nick: Optional[:class:str]\n The guild specific nickname of the user.\n premium_since: Optional[:class:datetime.datetime]\n A datetime object that specifies the date and time in UTC when the member used their\n Nitro boost on the guild, if available. This could be None.\n "), ('eq', <bound method Member.eq of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('format', <built-in method format of Member object at 0x7faaeb5ef6d0>), ('ge', <method-wrapper 'ge' of Member object at 0x7faaeb5ef6d0>), ('getattribute', <method-wrapper 'getattribute' of Member object at 0x7faaeb5ef6d0>), ('gt', <method-wrapper 'gt' of Member object at 0x7faaeb5ef6d0>), ('hash', <bound method Member.hash of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('init', <bound method Member.init of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('init_subclass', <built-in method init_subclass of ABCMeta object at 0xeef150>), ('le', <method-wrapper 'le' of Member object at 0x7faaeb5ef6d0>), ('lt', <method-wrapper 'lt' of Member object at 0x7faaeb5ef6d0>), ('module', 'discord.member'), ('ne', <bound method Member.ne of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('new', <built-in method new of type object at 0x921120>), ('reduce', <built-in method reduce of Member object at 0x7faaeb5ef6d0>), ('reduce_ex', <built-in method reduce_ex of Member object at 0x7faaeb5ef6d0>), ('repr', <bound method Member.repr of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('setattr', <method-wrapper 'setattr' of Member object at 0x7faaeb5ef6d0>), ('sizeof', <built-in method sizeof of Member object at 0x7faaeb5ef6d0>), ('slots', ('_roles', 'joined_at', 'premium_since', '_client_status', 'activities', 'guild', 'nick', '_user', '_state')), ('str', <bound method Member.str of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('subclasshook', <bound method User.subclasshook of <class 'discord.member.Member'>>), ('_abc_impl', <_abc_data object at 0x7faaec3cf660>), ('_client_status', {'web': 'online', None: 'online'}), ('_copy', <bound method Member._copy of <class 'discord.member.Member'>>), ('_from_message', <bound method Member._from_message of <class 'discord.member.Member'>>), ('_from_presence_update', <bound method Member._from_presence_update of <class 'discord.member.Member'>>), ('_get_channel', <bound method Member._get_channel of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_presence_update', <bound method Member._presence_update of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_roles', SnowflakeList('Q', [801977570470920233])), ('_state', <discord.state.ConnectionState object at 0x7faaec066640>), ('_try_upgrade', <bound method Member._try_upgrade of <class 'discord.member.Member'>>), ('_update', <bound method Member._update of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_from_message', <bound method Member._update_from_message of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_inner_user', <bound method Member._update_inner_user of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_roles', <bound method Member._update_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_user', ), ('activities', ()), ('activity', None), ('add_roles', <bound method Member.add_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('avatar', 'e8f2c3002dfb66c40e7db1b0a3cd227a'), ('avatar_url', ), ('avatar_url_as', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('ban', <bound method Member.ban of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('block', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('bot', False), ('color', ), ('colour', ), ('create_dm', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('created_at', datetime.datetime(2016, 5, 30, 14, 12, 26, 89000)), ('default_avatar', <DefaultAvatar.red: 4>), ('default_avatar_url', ), ('desktop_status', <Status.offline: 'offline'>), ('discriminator', '5669'), ('display_name', 'KeiitiChan'), ('dm_channel', None), ('edit', <bound method Member.edit of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('fetch_message', <bound method Messageable.fetch_message of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('guild', ), ('guild_permissions', ), ('history', <bound method Messageable.history of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('id', 186844273029677056), ('is_avatar_animated', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_blocked', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_friend', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_on_mobile', <bound method Member.is_on_mobile of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('joined_at', datetime.datetime(2021, 1, 26, 14, 3, 42, 341382)), ('kick', <bound method Member.kick of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mention', '<@186844273029677056>'), ('mentioned_in', <bound method Member.mentioned_in of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mobile_status', <Status.offline: 'offline'>), ('move_to', <bound method Member.move_to of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mutual_friends', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('name', 'KeiitiChan'), ('nick', None), ('permissions_in', <bound method Member.permissions_in of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('pins', <bound method Messageable.pins of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('premium_since', None), ('profile', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('public_flags', ), ('raw_status', 'online'), ('relationship', None), ('remove_friend', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('remove_roles', <bound method Member.remove_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('roles', [, ]), ('send', <bound method Messageable.send of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('send_friend_request', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('status', <Status.online: 'online'>), ('system', False), ('top_role', ), ('trigger_typing', <bound method Messageable.trigger_typing of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('typing', <bound method Messageable.typing of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('unban', <bound method Member.unban of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('unblock', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('voice', None), ('web_status', <Status.online: 'online'>)]

supleiades commented 3 years ago

追放された時

[('abstractmethods', frozenset()), ('class', <class 'discord.member.Member'>), ('delattr', <method-wrapper 'delattr' of Member object at 0x7faaea9a9200>), ('dir', <built-in method dir of Member object at 0x7faaea9a9200>), ('doc', "Represents a Discord member to a :class:Guild.\n\n This implements a lot of the functionality of :class:User.\n\n .. container:: operations\n\n .. describe:: x == y\n\n Checks if two members are equal.\n Note that this works with :class:User instances too.\n\n .. describe:: x != y\n\n Checks if two members are not equal.\n Note that this works with :class:User instances too.\n\n .. describe:: hash(x)\n\n Returns the member's hash.\n\n .. describe:: str(x)\n\n Returns the member's name with the discriminator.\n\n Attributes\n ----------\n joined_at: Optional[:class:datetime.datetime]\n A datetime object that specifies the date and time in UTC that the member joined the guild.\n If the member left and rejoined the guild, this will be the latest date. In certain cases, this can be None.\n activities: Tuple[Union[:class:BaseActivity, :class:Spotify]]\n The activities that the user is currently doing.\n guild: :class:Guild\n The guild that the member belongs to.\n nick: Optional[:class:str]\n The guild specific nickname of the user.\n premium_since: Optional[:class:datetime.datetime]\n A datetime object that specifies the date and time in UTC when the member used their\n Nitro boost on the guild, if available. This could be None.\n "), ('eq', <bound method Member.eq of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('format', <built-in method format of Member object at 0x7faaea9a9200>), ('ge', <method-wrapper 'ge' of Member object at 0x7faaea9a9200>), ('getattribute', <method-wrapper 'getattribute' of Member object at 0x7faaea9a9200>), ('gt', <method-wrapper 'gt' of Member object at 0x7faaea9a9200>), ('hash', <bound method Member.hash of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('init', <bound method Member.init of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('init_subclass', <built-in method init_subclass of ABCMeta object at 0xeef150>), ('le', <method-wrapper 'le' of Member object at 0x7faaea9a9200>), ('lt', <method-wrapper 'lt' of Member object at 0x7faaea9a9200>), ('module', 'discord.member'), ('ne', <bound method Member.ne of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('new', <built-in method new of type object at 0x921120>), ('reduce', <built-in method reduce of Member object at 0x7faaea9a9200>), ('reduce_ex', <built-in method reduce_ex of Member object at 0x7faaea9a9200>), ('repr', <bound method Member.repr of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('setattr', <method-wrapper 'setattr' of Member object at 0x7faaea9a9200>), ('sizeof', <built-in method sizeof of Member object at 0x7faaea9a9200>), ('slots', ('_roles', 'joined_at', 'premium_since', '_client_status', 'activities', 'guild', 'nick', '_user', '_state')), ('str', <bound method Member.str of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('subclasshook', <bound method User.subclasshook of <class 'discord.member.Member'>>), ('_abc_impl', <_abc_data object at 0x7faaec3cf660>), ('_client_status', {'web': 'online', None: 'online'}), ('_copy', <bound method Member._copy of <class 'discord.member.Member'>>), ('_from_message', <bound method Member._from_message of <class 'discord.member.Member'>>), ('_from_presence_update', <bound method Member._from_presence_update of <class 'discord.member.Member'>>), ('_get_channel', <bound method Member._get_channel of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_presence_update', <bound method Member._presence_update of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_roles', SnowflakeList('Q', [801977570470920233])), ('_state', <discord.state.ConnectionState object at 0x7faaec066640>), ('_try_upgrade', <bound method Member._try_upgrade of <class 'discord.member.Member'>>), ('_update', <bound method Member._update of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_from_message', <bound method Member._update_from_message of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_inner_user', <bound method Member._update_inner_user of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_update_roles', <bound method Member._update_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('_user', ), ('activities', ()), ('activity', None), ('add_roles', <bound method Member.add_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('avatar', 'e8f2c3002dfb66c40e7db1b0a3cd227a'), ('avatar_url', ), ('avatar_url_as', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('ban', <bound method Member.ban of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('block', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('bot', False), ('color', ), ('colour', ), ('create_dm', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('created_at', datetime.datetime(2016, 5, 30, 14, 12, 26, 89000)), ('default_avatar', <DefaultAvatar.red: 4>), ('default_avatar_url', ), ('desktop_status', <Status.offline: 'offline'>), ('discriminator', '5669'), ('display_name', 'KeiitiChan'), ('dm_channel', None), ('edit', <bound method Member.edit of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('fetch_message', <bound method Messageable.fetch_message of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('guild', ), ('guild_permissions', ), ('history', <bound method Messageable.history of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('id', 186844273029677056), ('is_avatar_animated', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_blocked', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_friend', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('is_on_mobile', <bound method Member.is_on_mobile of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('joined_at', datetime.datetime(2021, 1, 26, 14, 4, 37, 706445)), ('kick', <bound method Member.kick of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mention', '<@186844273029677056>'), ('mentioned_in', <bound method Member.mentioned_in of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mobile_status', <Status.offline: 'offline'>), ('move_to', <bound method Member.move_to of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('mutual_friends', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('name', 'KeiitiChan'), ('nick', None), ('permissions_in', <bound method Member.permissions_in of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('pins', <bound method Messageable.pins of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('premium_since', None), ('profile', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('public_flags', ), ('raw_status', 'online'), ('relationship', None), ('remove_friend', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('remove_roles', <bound method Member.remove_roles of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('roles', [, ]), ('send', <bound method Messageable.send of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('send_friend_request', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('status', <Status.online: 'online'>), ('system', False), ('top_role', ), ('trigger_typing', <bound method Messageable.trigger_typing of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('typing', <bound method Messageable.typing of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('unban', <bound method Member.unban of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('unblock', <bound method flatten_user..generate_function..general of <Member id=186844273029677056 name='KeiitiChan' discriminator='5669' bot=False nick=None guild=>>), ('voice', None), ('web_status', <Status.online: 'online'>)]

supleiades commented 3 years ago

解決したためクローズ