diff --git a/.gitignore b/.gitignore index 6704566..ff5d006 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/README.md b/README.md index 044dafb..5423c42 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # igni-module + Sample custom module for igni + +Commands in `commands`, services in `services`. \ No newline at end of file diff --git a/commands/hello.js b/commands/hello.js new file mode 100644 index 0000000..a8ccd46 --- /dev/null +++ b/commands/hello.js @@ -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); + } +}; \ No newline at end of file diff --git a/module.json b/module.json new file mode 100644 index 0000000..c220fd7 --- /dev/null +++ b/module.json @@ -0,0 +1,5 @@ +{ + "name": "hello-world", + "display_name": "Hello world", + "lang": "node" +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..6fdea1c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@iceprod/discord.js-commando": "^0.14.4" + } +}