mirror of
https://github.com/danbulant/igni-module
synced 2026-05-19 04:08:42 +00:00
feat: basic hello command
This commit is contained in:
parent
c815e4bc19
commit
f8a42fefec
5 changed files with 38 additions and 0 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -15,6 +15,10 @@ pids
|
|||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Locks
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
# igni-module
|
||||
|
||||
Sample custom module for igni
|
||||
|
||||
Commands in `commands`, services in `services`.
|
||||
21
commands/hello.js
Normal file
21
commands/hello.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const commando = require("@iceprod/discord.js-commando");
|
||||
|
||||
module.exports = class hello extends commando.Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "hello",
|
||||
memberName: "hello",
|
||||
group: "commands",
|
||||
description: "Say hello",
|
||||
args: [{
|
||||
key: "user",
|
||||
type: "user",
|
||||
prompt: "What's the user you want to say hello to?"
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
return msg.say("Hello " + user.username);
|
||||
}
|
||||
};
|
||||
5
module.json
Normal file
5
module.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "hello-world",
|
||||
"display_name": "Hello world",
|
||||
"lang": "node"
|
||||
}
|
||||
5
package.json
Normal file
5
package.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@iceprod/discord.js-commando": "^0.14.4"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue