shizzard / marvin

Marvin, Discord bot
Other
2 stars 2 forks source link

Unable to punish certain user #55

Closed shizzard closed 5 years ago

shizzard commented 5 years ago
[2019-07-23T13:16:52.360254+00:00][error][marvin_helper_chain:chain/3:67@<0.1128.0>][88329a51-ed1c-4c1d-8f10-c46daed7e98f][NONE] what=error text="Chain dropped function execution with crash" result=NONE details_stacktrace="[{marvin_pdu2_object_member,roles,1,[]},{marvin_pdu2_object_member,have_role,2,[{file,\"/src/_build/prod/lib/marvin_pdu2/src/object/marvin_pdu2_object_member.erl\"},{line,36}]},{marvin_plugin_moderator,'-handle_info_guild_event_command_mute_prepare_filter_already_muted_subjects/1-fun-0-',3,[{file,\"/src/_build/prod/lib/marvin_plugin/src/moderator/marvin_plugin_moderator.erl\"},{line,300}]},{lists,foldl,3,[{file,\"lists.erl\"},{line,1263}]},{marvin_plugin_moderator,handle_info_guild_event_command_mute_prepare_filter_already_muted_subjects,1,[{file,\"/src/_build/prod/lib/marvin_plugin/src/moderator/marvin_plugin_moderator.erl\"},{line,299}]},{marvin_helper_chain,chain,3,[{file,\"/src/_build/prod/lib/marvin_helper/src/marvin_helper_chain.erl\"},{line,35}]},{marvin_plugin_moderator,handle_info_guild_event_command_mute_prepare,2,[{file,\"/src/_build/prod/lib/marvin_plugin/src/moderator/marvin_plugin_moderator.erl\"},{line,200}]},{marvin_plugin_moderator,handle_info,2,[{file,\"/src/_build/prod/lib/marvin_plugin/src/moderator/marvin_plugin_moderator.erl\"},{line,112}]}]" details_reason=badarg details_initial_value="{handle_info_guild_event_command_mute,<<\"269209661973069825\">>,<<\"269213289978920960\">>,<<\"277189846664085505\">>,<<\"591245037615185923\">>,{marvin_pdu2_object_member,{marvin_pdu2_object_user,<<\"269144761103810561\">>,<<\"shizzard\">>,<<\"1337\">>,<<\"463c479451c08a983dd2bd76b55002a0\">>,false,false,false,undefined},[<<\"269213127835516929\">>,<<\"269213289978920960\">>,<<\"269565043446644739\">>,<<\"270845668619190273\">>,<<\"301042304880345088\">>,<<\"301058554821869569\">>,<<\"332188255824904193\">>,<<\"335395823196045313\">>,<<\"387273646663532544\">>,<<\"403106989678264333\">>,<<\"411093326666661888\">>,<<\"461590825294495755\">>,<<\"489949913279627276\">>,<<\"490621741547388959\">>,<<\"504304899274833960\">>,<<\"542657379066445824\">>,<<\"574289921074790400\">>,<<\"581947146643963915\">>,<<\"584040773096308766\">>],<<208,161,208,186,208,176,208,189,208,180,208,176,208,187>>,false,<<\"2017-01-12T21:03:05.094000+00:00\">>,false},[undefined],undefined,undefined,{marvin_guild_pubsub,{marvin_guild_context,<<\"Imbaland\">>,<<\"341500172515278859\">>,<<\"269209661973069825\">>,<<\"269144761103810561\">>,<<\"269213127835516929\">>,<<\"269213289978920960\">>,[{marvin_plugin_command,<<\"marvin_plugin_ping\">>,<<\"status\">>,<<208,159,209,128,208,190,208,178,208,181,209,128,208,186,208,176,32,209,129,209,130,208,176,209,...>>,[<<209,129,209,130,208,176,209,130,209,131,209,129>>,<<208,191,208,184,208,189,208,179>>]},{marvin_plugin_command,<<\"marvin_plugin_voice_on_demand\">>,<<\"create_channel\">>,<<208,161,208,190,208,183,208,180,208,176,208,181,209,130,32,208,178,209,128,208,181,208,188,...>>,[<<208,178,208,190,208,185,209,129>>,<<208,186,208,176,208,189,208,176,208,187>>,<<208,179,208,190,208,187,208,190,209,129>>,<<208,186,208,190,208,188,208,189,208,176,209,130,208,176>>]},{marvin_plugin_command,<<\"marvin_plugin_fuzzy_nickname\">>,<<\"change_nickname\">>,<<208,156,208,181,208,189,209,143,208,181,209,130,32,209,130,208,178,208,190,208,185,32,...>>,[<<208,189,208,184,208,186>>]},{marvin_plugin_command,<<\"marvin_plugin_help\">>,<<\"generic_help\">>,<<208,146,209,139,208,178,208,190,208,180,208,184,209,130,32,209,141,209,130,209,131,...>>,[<<209,129,208,191,209,128,208,176,208,178,208,186,208,176>>,<<208,191,208,190,208,188,208,190,209,137,209,140>>]},{marvin_plugin_command,<<\"marvin_plugin_moderator\">>,<<\"mute\">>,<<208,151,208,176,209,130,209,139,208,186,208,176,208,181,209,130,32,209,131,208,...>>,[<<208,189,208,176,208,186,208,176,208,182,208,184>>,<<208,176,209,128,208,181,209,129,209,130,209,131,208,185>>]},{marvin_plugin_command,<<\"marvin_plugin_wiki\">>,<<\"search\">>,<<208,145,209,139,209,129,209,130,209,128,209,139,208,185,32,208,191,208,190,...>>,[<<208,178,208,184,208,186,208,184>>]}],#Ref<0.2504455689.2945843201.206406>,#Ref<0.2504455689.2945843201.206407>,#Ref<0.2504455689.2945843201.206408>,#Ref<0.2504455689.2945843201.206409>,#Ref<0.2504455689.2945843201.206410>,#Ref<0.2504455689.2945843201.206411>,#Ref<0.2504455689.2945843201.206412>,#Ref<0.2504455689.2945843201.206413>,#{marvin_plugin_lfg => #Fun<marvin_plugin_lfg.0.67074983>}},<<\"command\">>,<<\"marvin_plugin_moderator:mute\">>,#{command => <<\"mute\">>,original_message => {marvin_pdu2_dispatch_message_create,<<\"603213947692122113\">>,<<\"591245037615185923\">>,{marvin_pdu2_object_user,<<\"269144761103810561\">>,<<\"shizzard\">>,<<\"1337\">>,<<\"463c479451c08a983dd2bd76b55002a0\">>,false,false,false,undefined},<<60,64,33,51,52,49,53,48,48,49,55,50,53,49,53,50,55,56,56,53,57,62,32,208,178,209,128,208,...>>,<<\"2019-07-23T13:16:52.303000+00:00\">>,undefined,false,false,[{marvin_pdu2_object_user,<<\"341500172515278859\">>,<<\"Marvin\">>,<<\"8455\">>,<<\"573f5a2720e1b07b90f7567885ea57cc\">>,true,false,false,undefined},{marvin_pdu2_object_user,<<\"528286233659703309\">>,<<\"vorobushka\">>,<<\"3990\">>,<<\"16ecdd1c0a3ac32f620a19e36d164bee\">>,false,false,false,undefined}],[],[],[],[],<<\"603213944575754240\">>,false,undefined,0},parsed_message_content => [{user_mention,<<\"341500172515278859\">>},<<208,178,209,128,208,181,208,188,209,143>>,<<209,129,208,178,208,184,208,180,208,176,208,189,208,184,208,185>>,<<208,178>>,<<209,130,209,142,209,128,209,140,208,188,208,181>>,<<208,157,208,176,208,186,208,176,208,182,208,184>>,{user_mention,<<\"528286233659703309\">>},<<208,189,208,176>>,1,<<208,188,208,184,208,189,209,131,209,130,209,131>>]}},undefined,#Ref<0.2504455689.2945843201.206366>}" details_fun=2 details_chain=marvin_plugin_moderator:handle_info_guild_event_command_mute_prepare
[2019-07-23T13:16:52.372284+00:00][error][marvin_plugin_moderator:handle_info_guild_event_command_mute_prepare/2:243@<0.1128.0>][bf4cd6fe-54ce-4090-b8d9-16373d64469a][NONE] what=handle_info text="Plugin failed to perform mute command" result=error details_type=error details_reason=badarg details_guild_id=269209661973069825
shizzard commented 5 years ago

The issue itself is about creating/updating the member record in the ETS. So there is no issue with punishing; The same will happen on any member read from the guild' Ctx.

shizzard commented 5 years ago

To be fixed in #57.