b1naryth1ef / dscord

Discord Library for D
http://b1naryth1ef.github.io/dscord/
zlib License
51 stars 15 forks source link

Example code does not build #18

Closed ZeroSumGame closed 7 years ago

ZeroSumGame commented 7 years ago

../src/dscord/bot/command.d(43,3): Error: closures are not yet supported in CTFE src/basic.d(33,22): called from here: CommandDescription("HI") dmd failed with exit code 1.

More importantly:

../src/dscord/bot/listener.d(23,45): Error: delegate dscord.bot.plugin.Plugin.Listenable!().loadListeners!(BasicPlugin).loadListeners.lambda1 cannot get frame pointer to dscord.bot.listener.Listener!(VoiceStateUpdate).Listener.lambda2 dmd failed with exit code 1.

Other listener code also does not work as exposed, such as your Creating Plugins Wiki Entry:

@Listener!MessageCreate()
void onMessageCreate(MessageCreate event) {
  this.log.infof("A message was created: %s", event);
}

This throws an error essentially the same as the one for listener.d(23,45) as above.

Commands are the only examples that currently do build in dmd-2.027.2, leaving audio and message listeners dead in the water.

b1naryth1ef commented 7 years ago

Fixed by #17