Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hex2f/cask
A unique Discord bot that lets you create your own commands using JavaScript, from the chatbox.
https://github.com/hex2f/cask
Last synced: about 1 month ago
JSON representation
A unique Discord bot that lets you create your own commands using JavaScript, from the chatbox.
- Host: GitHub
- URL: https://github.com/hex2f/cask
- Owner: hex2f
- Created: 2019-06-27T23:03:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-28T13:11:08.000Z (about 2 years ago)
- Last Synced: 2024-05-02T05:30:17.087Z (7 months ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Cask Header](https://i.imgur.com/Z0uGcfV.png)
## What is it?
Cask is a unique Discord bot that lets you create entirely custom commands using JavaScript. It's very simple to use, you just write your code in a code block where you have access to the Discord.JS message object, fetch and the NodeJS crypto api. You can also install cool commands others have published using [>cask install](https://github.com/RekkyRek/cask/blob/master/docs/install.md) or publish your own commands using [>cask publish](https://github.com/RekkyRek/cask/blob/master/docs/publish.md).## How does it work?
Every time a message is sent with the selected prefix in the beginning of the message, `>` by default, it looks up any stored commands for your server.
If it finds any matching commands, it instantiates a new JavaScript virtual machine which has the following variables in its global scope:| Variable Name | Description |
|----------------------------------------------------------------|---------------------------------------------------------------|
| [msg](https://discord.js.org/#/docs/main/stable/class/Message) | The Discord.JS message object. |
| [fetch](https://www.npmjs.com/package/node-fetch) | An instance of node-fetch, so you can interact with APIs etc. |
| [crypto](https://nodejs.org/api/crypto.html) | The NodeJS crypto API. |## Commands
| Command | Description |
|-------------------------------------------------------------------------------------|----------------------------------------------------|
| [>cask new](https://github.com/RekkyRek/cask/blob/master/docs/new.md) | Create a new local command. |
| [>cask install](https://github.com/RekkyRek/cask/blob/master/docs/install.md) | Install a command. |
| [>cask remove](https://github.com/RekkyRek/cask/blob/master/docs/remove.md) | Remove a command. |
| [>cask list](https://github.com/RekkyRek/cask/blob/master/docs/list.md) | List all installed commands. |
| [>cask vote](https://github.com/RekkyRek/cask/blob/master/docs/vote.md) | Show your appreciation for a cask by voting. |
| [>cask search](https://github.com/RekkyRek/cask/blob/master/docs/search.md) | Search for a cask. |
| [>cask top](https://github.com/RekkyRek/cask/blob/master/docs/top.md) | Shows you the top voted casks. |
| [>cask publish](https://github.com/RekkyRek/cask/blob/master/docs/publish.md) | Publish one of your local commands. |
| [>cask unpublish](https://github.com/RekkyRek/cask/blob/master/docs/unpublish.md) | Unpublish one of your casks. |
| [>cask permission](https://github.com/RekkyRek/cask/blob/master/docs/permission.md) | Manage who can use what. |