0.0.21 • Published 2 years ago

discord-text-games-api v0.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Stand With Ukraine

discord-text-games-api

API interfaces for "Discord Text Games" Project.

Used to create text games in Discord. Ready-to-use game, compatible with Discord Text Games must be in form of ZIP archive, where at root level exists file package.json with information about the game.

How discord text game creation is done: 1. You create main game app JS file (or TS and compile it to JS) 2. Your main file must export outside main game plugin class. 3. Exported game class must implement GamePluginEntryPoint interface. 4. When you have your JS files ready - you need to create game package.json file with information about the game. See PackageJsonStructure interface, it describes all required and optional fields. You can combine you npm's package.json with game's package.json and hold all fields in one file. 5. Now you need to pack you game plugin to ZIP archive. At root level of the archive there must be package.json file with game description. It must contain mandatory field textGameEntryPoint filled with path to main JS file (inside archive). If main game class is not exported via "default" export - then textGameEntryPoint additionally should contain name of the class in form: app/app.js#NameOfMainClass 6. When your ZIP is ready - you can upload it to Discord server here

If you want require 3rd party library in your plugin - you need pack all dependencies inside your zip (for example, to /node_modules/ subdirectory inside zip). Only next set of dependencies are available without packing: ["fs", "path", "util", "discord-text-games-api"]

See other related repositores:

0.0.20

2 years ago

0.0.21

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago