From bcfa5177def2b0522630496b07109856caa8bf4e Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sun, 9 May 2021 00:51:23 +0200 Subject: [PATCH] Add example module --- modules/hello_world/header.json | 8 ++++++++ modules/hello_world/index.js | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 modules/hello_world/header.json create mode 100644 modules/hello_world/index.js diff --git a/modules/hello_world/header.json b/modules/hello_world/header.json new file mode 100644 index 0000000..c7c70c4 --- /dev/null +++ b/modules/hello_world/header.json @@ -0,0 +1,8 @@ +{ + "name": "Hello world", + "description": "Hello world, example module for embeded messages", + "prefix": "!hello", + "flavor": "node", + "entrypoint": "index.js", + "version": "0.0.1" +} diff --git a/modules/hello_world/index.js b/modules/hello_world/index.js new file mode 100644 index 0000000..41df230 --- /dev/null +++ b/modules/hello_world/index.js @@ -0,0 +1,27 @@ +let reply = { + status: "success", + action: "reply", + format: "embed", + message: "Testing", + profile: { + color: 0x0099f, + title: "Testing embed", + url: undefined, + author: undefined, + description: "Description of the testing embed", + thumbnail: undefined, + fields: [ + { + name: "Field 1", + value: "Hello there" + } + ], + image: undefined, + timestamp: undefined, + footer: { + text: "Footer text", + icon_url: undefined + } + } +}; +console.log(JSON.stringify(reply));