Xh4H / Discord.jl

The Julia Discord API Wrapper
MIT License
151 stars 23 forks source link

Error: Parsing failed #17

Closed devlcp closed 4 years ago

devlcp commented 5 years ago

Error with the basic example:

Error: Parsing failed time = 2019-10-13T20:40:02.979 conn = 1 T = GuildCreate exception = MethodError: no method matching datetime(::Nothing) Closest candidates are: datetime(::Dates.DateTime) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:21 datetime(::Int64) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:19 datetime(::AbstractString) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:20 Stacktrace: [1] #(globalref #<julia: Discord> Member)#279(::Base.Iterators.Pairs{Symbol,Any,NTuple{8,Symbol},NamedTuple{(:nick, :user, :premium_since, :joined_at, :roles, :deaf, :hoisted_role, :mute),Tuple{String,Dict{Symbol,Any},Nothing,String,Array{Any,1},Bool,Nothing,Bool}}}, ::Type{Member}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:99 [2] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:nick, :user, :premium_since, :joined_at, :roles, :deaf, :hoisted_role, :mute),Tuple{String,Dict{Symbol,Any},Nothing,String,Array{Any,1},Bool,Nothing,Bool}}, ::Type{Member}) at ./none:0 [3] Member(::Dict{Symbol,Any}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:100 [4] _broadcast_getindex_evalf at ./broadcast.jl:625 [inlined] [5] _broadcast_getindex at ./broadcast.jl:598 [inlined] [6] getindex at ./broadcast.jl:558 [inlined] [7] macro expansion at ./broadcast.jl:888 [inlined] [8] macro expansion at ./simdloop.jl:77 [inlined] [9] copyto! at ./broadcast.jl:887 [inlined] [10] copyto! at ./broadcast.jl:842 [inlined] [11] copy at ./broadcast.jl:818 [inlined] [12] materialize at ./broadcast.jl:798 [inlined] [13] #(globalref #<julia: Discord> Guild)#340(::Base.Iterators.Pairs{Symbol,Any,NTuple{33,Symbol},NamedTuple{(:presences, :preferred_locale, :channels, :description, :premium_tier, :region, :members, :afk_channel_id, :owner_id, :system_channel_flags, :voice_states, :banner, :splash, :system_channel_id, :default_message_notifications, :member_count, :explicit_content_filter, :application_id, :large, :features, :name, :icon, :joined_at, :unavailable, :lazy, :mfa_level, :vanity_url_code, :id, :emojis, :roles, :verification_level, :premium_subscription_count, :afk_timeout),Tuple{Array{Any,1},String,Array{Any,1},Nothing,Int64,String,Array{Any,1},String,String,Int64,Array{Any,1},Nothing,Nothing,String,Int64,Int64,Int64,Nothing,Bool,Array{Any,1},String,String,String,Bool,Bool,Int64,Nothing,String,Array{Any,1},Array{Any,1},Int64,Int64,Int64}}}, ::Type{Guild}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/types/types.jl:99 [14] Type at ./none:0 [inlined] [15] #GuildCreate#433 at /home/devlcp/.julia/packages/Discord/td6Xq/src/gateway/events/guilds.jl:23 [inlined] [16] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:presences, :preferred_locale, :channels, :description, :premium_tier, :region, :members, :afk_channel_id, :owner_id, :system_channel_flags, :voice_states, :banner, :splash, :system_channel_id, :default_message_notifications, :member_count, :explicit_content_filter, :application_id, :large, :features, :name, :icon, :joined_at, :unavailable, :lazy, :mfa_level, :vanity_url_code, :id, :emojis, :roles, :verification_level, :premium_subscription_count, :afk_timeout),Tuple{Array{Any,1},String,Array{Any,1},Nothing,Int64,String,Array{Any,1},String,String,Int64,Array{Any,1},Nothing,Nothing,String,Int64,Int64,Int64,Nothing,Bool,Array{Any,1},String,String,String,Bool,Bool,Int64,Nothing,String,Array{Any,1},Array{Any,1},Int64,Int64,Int64}}, ::Type{GuildCreate}) at ./none:0 [17] GuildCreate(::Dict{Symbol,Any}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/gateway/events/guilds.jl:24 [18] tryparse(::Client, ::Type, ::Dict{Symbol,Any}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/client/client.jl:470 [19] dispatch(::Client, ::Dict{Symbol,Any}) at /home/devlcp/.julia/packages/Discord/td6Xq/src/gateway/gateway.jl:313 [20] (::getfield(Discord, Symbol("##724#725")){Client,Dict{Symbol,Any}})() at ./task.jl:268 @ Discord ~/.julia/packages/Discord/td6Xq/src/client/client.jl:473

christopher-dG commented 4 years ago

Fixed although it'll probably come up again with different fields.