Xh4H / Discord.jl

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

Deleting channels triggers a MethodError warning #40

Closed tk3369 closed 2 years ago

tk3369 commented 3 years ago

I happened to find the following warning message when deleting a channel.

┌ Warning: Handler function threw an exception
│   time = 2021-07-25T16:49:07.656
│   conn = 1
│   event = ChannelDelete
│   handler = :DJL_DEFAULT
│   exception =
│    MethodError: no method matching delete!(::Guild, ::UInt64)
│    Closest candidates are:
│      delete!(::IdDict{K, V} where V, ::Any) where K at iddict.jl:115
│      delete!(::Base.IdSet, ::Any) at idset.jl:23
│      delete!(::BitSet, ::Integer) at bitset.jl:298
│      ...
│    Stacktrace:
│     [1] handler(c::Client, e::ChannelDelete)
│       @ Discord.Defaults ~/.julia/packages/Discord/3wJXG/src/Defaults.jl:63
│     [2] handler_cached(c::Client, e::ChannelDelete)
│       @ Discord.Defaults ~/.julia/packages/Discord/3wJXG/src/Defaults.jl:189
│     [3] dispatch(c::Client, data::Dict{Symbol, Any})
│       @ Discord ~/.julia/packages/Discord/3wJXG/src/gateway/gateway.jl:338
│     [4] (::Discord.var"#706#707"{Client, Dict{Symbol, Any}})()
│       @ Discord ./task.jl:411
└ @ Discord ~/.julia/packages/Discord/3wJXG/src/gateway/gateway.jl:342

My versions:

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

(MeetBot) pkg> st
     Project MeetBot v0.1.0
      Status `~/.julia/dev/MeetBot/Project.toml`
  [fcbf000d] Discord v0.1.0 `https://github.com/Xh4H/Discord.jl#master`
  [ade2ca70] Dates
Xh4H commented 2 years ago

This should be fixed now.