Xh4H / Discord.jl

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

get_guild_channels never returns #11

Closed Vexatos closed 6 years ago

Vexatos commented 6 years ago

Calling get_guild_channels seems to never return a value in its future. It hangs forever.

Version information:

Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

Project Discord v0.1.0
    Status `~/Development/Discord.jl/Project.toml`
  [cd3eb016] HTTP v0.7.0 #master (https://github.com/JuliaWeb/HTTP.jl.git)
  [682c06a0] JSON v0.19.0
  [102dff8d] OpenTrick v0.2.1
  [efcf1570] Setfield v0.3.0
  [37f0c46e] TimeToLive v0.1.4
  [ade2ca70] Dates 
  [8ba89e20] Distributed 

MWE (also confirmed using REST API get_guild_channels):

using Discord

token = "123456"
gid = 123456

c = Client(token)
open(c)
guild = fetchval(retrieve(c, Guild, gid))
println("Gathering Channels")
channels = fetchval(retrieve(c, DiscordChannel, guild))
println(channels)
close(c)
christopher-dG commented 6 years ago

Thanks, there's likely a crash somewhere in the async task which isn't reported. I'll have a look.

christopher-dG commented 6 years ago

Should be fixed now.