8573 / irc-bot.rs

A library for writing Internet Relay Chat (IRC) bots in the Rust programming language (@rust-lang).
Other
29 stars 13 forks source link

Users' thread #50

Open 8573 opened 5 years ago

8573 commented 5 years ago

If you are a user of this crate, I suggest that (as an option, not a requirement) you comment on this issue ticket, optionally briefly describing your use-case. This way, I will be able to survey my users as to, notify them of, and/or help them adjust to changes in the API of this library, and perhaps provide other support.

In case you prefer GitLab over GitHub, I have opened an issue ticket on GitLab for the same purpose: https://gitlab.com/c74d/irc-bot.rs/issues/1.

ctm commented 5 years ago

I'm using irc-bot as a quick-and-dirty front-end to a poker server I'm writing. I'm writing the server in part so I can learn Rust better. I did something similar with Objective-C a little more than twenty years ago.

I'm so low of a priority as a user (my repository isn't even public) that I hesitate to comment at all. However I figure if I break the ice, and provide a low bar to clear, perhaps you'll hear from others.

I've only been playing with irc-bot for about a day. I've found it easy to use, although I haven't yet figured out how to make a command that takes an optional argument. In specific, I'd like to be able to support bet, bet N (where N is a positive number), bet pot and bet half, but, at least when using the source from the dev branch of this repository, I get:

Error: While handling YAML: Expected <argument> to be of type Scalar, but it is of type Mapping.

for just bet, although bet "" works fine. I'm using "<amount>" as the argument to the syntax parameter of ModuleBuilder::command. I tried "...", but that fails to compile. With "<amount>", the zero-length string as input is converted to an empty Hash which is why yaml::check_type dies. I'm early enough into development that this doesn't really matter to me, and I realize there may be some other argument to syntax that might work.

Anyway, thank you for writing irc-bot.

8573 commented 5 years ago

Hello, @ctm — I've replied in #51.