Giter VIP home page Giter VIP logo

hans1005 / restore-cord-bot-restore-members-your-new-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 657 KB

For example, if the card is a Green 7, you must play a Green card or any color 7. Or, you may play any Wild card or a Wild Draw 4 card. If you don't have anything that matches, you must pick a card from the DRAW pile and lose your turn by entering draw in your uno-channel. Each player can only play one card in their turn. Play a card by entering i

C# 93.85% Pawn 2.00% TypeScript 4.15%
discord-bot discord-bot-api discord-bot-basic discord-bot-dashboard discord-bot-framework discord-bot-list discord-bot-maker discord-bot-template discord-bot-website discord-bots

restore-cord-bot-restore-members-your-new-server's Introduction

image

revcord

πŸŒ‰ A cord to connect your Revolt and Discord servers

πŸ”— A bridge for Discord and Revolt with easy setup through commands, written in TypeScript using revolt.js.

For example, if the card is a Green 7, you must play a Green card or any color 7. Or, you may play any Wild card or a Wild Draw 4 card. If you don't have anything that matches, you must pick a card from the DRAW pile and lose your turn by entering draw in your uno-channel. Each player can only play one card in their turn.

Play a card by entering in your uno-channel. For example, if you wish to play a Green 7, enter green7 in your uno-channel. Play a Wild Draw 4 by entering +4. You may choose not to play a playable card from your hand. If so, you must draw a card.

Winning When a player no longer has any cards and the game ends, they receive points. All opponents’ cards are given to the winner and points are counted. This also applies even if the last card is an Action card, such as a Draw Two or a Wild Draw 4 – The next player must draw the required cards which will then be tallied up.

Command list

Instead of prefixes, Nessie uses Discord's new Slash Commands /

  • br: map rotation for battle royale
  • arenas: map rotation for arenas
  • control: map rotation for control
  • about: information hub of Nessie
  • help: list of commands and how to use them
  • invite: generates Nessie's invite link
  • updates: shows the latest news and current update of Nessie

TODO

  • Automatic Map Status Updates
  • Add installation guide to this readme

πŸ“” Features

  • Bridge messages between platforms
  • Bridge attachments
  • Bridge replies
  • Bridge message edit and delete
  • Bridge embeds
  • Seamlessly display user information

Screenshot - Revolt Screenshot - Discord

πŸ”© Setup

New: You can use Docker instead.

Node v16.9+ is required!

Important: this bot is meant to be used in one server (Discord+Revolt), but can be used in more as long as they share the same admin.

  1. Clone this repository, install dependencies and build
git clone https://github.com/mayudev/revcord
cd revcord
npm install
npm run build
  1. Create a bot in Discord (Guide) and Revolt (Open user settings -> My Bots -> Create a bot)
  2. Place the relevant tokens in environment variables. The easiest way is to create a .env file (yes, a file called .env):
DISCORD_TOKEN = ...
REVOLT_TOKEN = ...

Of course, replace ... with tokens.

If you are running a self-hosted instance of Revolt, additionally set the API_URL variable:

API_URL = https://api.revolt.chat
  1. Important! Make sure to select the following permissions in URL Generator when making an invite for your bot (Your bot in Discord Developers -> OAuth2 -> URL Generator) (or if you're lazy, just select Administrator) Note applications.commands!

permissions

  1. Important! On Revolt, make sure to add the bot to a role that has the Masquerade permission!

revolt permissions

  1. Invite the bot to to a Revolt and Discord server.
  2. Start the bot using npm start.

Note: it's recommended to use something like pm2 or nodemon to run the bot. Make sure to pass the --experimental-specifier-resolution=node flag to node manually, otherwise it will not run (it's included in the default start script).

Using Docker

You need Docker and docker-compose installed.

Follow the steps above to create a .env file1. You do not have to run npm install and npm run build, obviously. Also, make sure your bots have all the required permissions as explained above.

Before you run docker-compose, use touch revcord.sqlite to create the database file and leave it empty.

Then you should be ready to go.

docker-compose up -d

πŸ”§ Configuration

with commands

You can use either slash commands on Discord or rc! prefix on Revolt (use rc!help to show all commands)

To use the commands, you need the Administrator permission on Discord. On Revolt, only the server owner can run them (for now).

Connecting Discord and Revolt channels

From Discord:

/connect <Revolt channel name or ID>

From Revolt:

rc!connect <Discord channel name or ID>

For example:

# From Discord
/connect lounge
/connect 01AB23BC34CD56DE78ZX90WWDB

# From Revolt
rc!connect general
rc!connect 591234567890123456

βœ”οΈ Send a message to see if it works. Try editing and deleting it.

Removing the connection

From Discord:

/disconnect

From Revolt:

rc!disconnect

You don't have to specify any channel. It will disconnect the channel the command is sent in.

Showing connections

From Discord:

/connections

From Revolt:

rc!connections

Toggling bots

You can toggle whether messages sent by bots should be forwarded. It's enabled by default (it's requied for NQN to work properly).

Use either rc!bots or /bots

with mappings.json (not recommended)

This is not recommended!

  1. Create a mappings.json file in the root directory.
  2. Use the following format:
[
  {
    "discord": "discord_channel_id",
    "revolt": "revolt_channel_id"
  },
  {
    "discord": "another_discord_channel_id",
    "revolt": "another_revolt_channel_id"
  }
]

Footnotes

  1. Alternatively, you can edit the docker-compose.yml file appropriately. Make sure to remove ./.env:/app/.env below volumes: so it won't complain when you don't have a .env file. ↩

restore-cord-bot-restore-members-your-new-server's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.