Closed Vaipex closed 2 years ago
The line that it points to is at createGuild proc, does it error if you remove the code?
Try doing nimble install dimscord@#head
for the fix, since I believe this error occurs when --threads:on
Installing @#head didnt help. I got a new error now
dimscord-#head/dimscord/helpers.nim(31, 31) template/generic instantiation of `async` from here
var internalTmpFuture`gensym22: FutureBase = bulkDeleteMessages(discord.api,
"123", @["123"], "")
yield internalTmpFuture`gensym22
read(cast[typeof(bulkDeleteMessages(discord.api, "123", @["123"], ""))](internalTmpFuture`gensym22))' has no type (or is ambiguous)
Did you import asyncdispatch?
yes
For messageCreate proc, could you remove the {.event(discord).}
pragma and leave as something like this?
proc messageCreate(s: Shard, m: Message) {.async.} =
...
discord.events.messageCreate = messageCreate
This will make the error a bit more easier to understand.
Looks like its the same error
template/generic instantiation of `async` from here
Error: expression '
var internalTmpFuture`gensym21: FutureBase = bulkDeleteMessages(discord.api,
"123", @["123"], "")
yield internalTmpFuture`gensym21
read(cast[typeof(bulkDeleteMessages(discord.api, "123", @["123"], ""))](internalTmpFuture`gensym21))' has no type (or is ambiguous)
Hmm, the code looks fine to me. Try sending your code that isn't exactly simplified.
I found the issue, bulkDeleteMessages doesnt return anything. await discord.api.bulkDeleteMessages("123", @["123"])
works just fine.
Thank you for your time!
I tried dimscord today and wanted to use the bulkDeleteMessages proc. I always get this error when I try to compile it.
nimble/pkgs/dimscord-1.3.0/dimscord/restapi/guild.nim(90, 25) Error: expression 'none seq[Channel]' has no type (or is ambiguous)
This is my code: