Comments (5)
The default behavior for commands is to require a mention. Did you do that? @MyBot !ping
? This is done to help combat the problem of hogging common prefixes for commands.
from ackcord.
I actually did try that and when i do it the bot reply with "No more arguments left" and if i put an arg like this "@testbot !ping hello" it will reply "For input string: "hello" i don't understand why it doesn't reply with "Received ping command with arg" since the code is this
{ override def handle(msg: Message, args: Int, remaining: List[String])(implicit c: CacheSnapshot[Id]): Unit = println(s"Received ping command with arg $args") }
Sorry if it's a silly question i'm a beginner in programming.
Thanks in advance.
from ackcord.
Welp, I screwed up the example bot commands. Sorry about that. What's happening here is that the second argument is the "parsed" argument. Here it expects a number, but you never give it one. As for if you give it a string, I've later come to learn in other projects that not all exception messages are fine to pass unhandled to the user. If you change the args: Int
to args: NotUsed
it should work fine. Remember to also change CommandHandler[Int]
to CommandHandler[NotUsed]
. Alternatively, you can provide a number when you invoke the command like so. @MyBot !ping 5
.
Lastly, while you can follow the example bot found on master, and that one might contain fixes, it will probably also contain other future changes. Preferably 0.11 would already be out, but my connection was crap last time I tried to publish, and I'm on vacation atm. If you want code that is guaranteed to work with 0.10, check out the repository at that point instead. https://github.com/Katrix/AckCord/tree/7db2e5c5499a4bf7e97eaaad3725ee768486f5da
from ackcord.
Should be fixed in master
from ackcord.
Sorry i totally forgot about this, thanks I will check it out again 😄
from ackcord.
Related Issues (20)
- module not found: com.sedmelluq#lavaplayer;1.3.10 HOT 2
- [Suggestion?] A Higher-leveled /modular command framework for AckCord HOT 3
- [Suggestion?] A Higher-leveled /modular command framework for AckCord HOT 1
- Ban Reason does not get URL-Encoded HOT 1
- When a user send a message I want to reply to the message and send a DM HOT 1
- Removing a bot leads to an error parsing such message
- Weird exception logged for no reason HOT 3
- Error in stage Upstream producer failed with exception, removing from MergeHub now HOT 5
- ERROR: actor name [GatewayHandler] is not unique! HOT 2
- Rate Limiter never releases once rate limit is hit HOT 8
- Member add/update events not being triggered HOT 4
- Avatar is incorrectly marked as not nullable for webhooks
- DecodingFailure at .t: Invalid message type
- user param doesn't work
- Autocomplete errors if the user doesn't enter anything
- Example not compiling HOT 1
- Components not being registered
- RawChannel has no entry in CacheTypeRegistry
- Mentionable is hardcoded to user
- Verifier IndexOutOfBoundsException issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ackcord.