Giter Club home page Giter Club logo

cross-server-bot's Introduction

Cross-Server-Bot

A Cross-Server bot script that works with Eris library. Link channels between them easily with an easy and beautiful visual thanks to webhooks. Supports message delete, update, lock command...

Features

  • Link as many channels as you want between them.
  • Instant redirection of messages.
  • Support message deletion and message updating
  • Usage of webhooks to simulate users (good looking and easy to understand chat).
  • Support images.
  • Warn if a server supposed to be in the linked channels is not here anymore or if a webhook is falsy.
  • EnhancedMention - mention a user/role/channel in another guild easily by simply using @name or #name.
  • ignore - Whether or not to ignore all messages coming from that channel.
  • ignoreBots - Whether to accept bots message to gothrough the network. False by default
  • Commands
    • lock - Lock the current channel (remove sendMessage for everyone role): c!lock
    • lock all - Lock all channels in the network: c!lock all
    • unlock - Unlock the current channel: c!unlock
    • unlock all - Unlock all channels: c!unlock all
    • commands are usable by poeple that have one of the roles in the managerRoles field in the config.

Setup

Clone this repository.
Run npm install or yarn.

Copy and paste config.template.json as config.json.
Enter your bot token and all correct information:

{
    "token": "botToken",
    "prefix": "c!",
    "enhancedMention": {
        "user": false,
        "role": false,
        "channel": false
    },
    "messageDelete": true,
    "deleteOnUpdate": true,
    "guilds": [
        {
            "name": "name",
            "identifier": "",
            "guildID": "111111",
            "channelID": "121212",
            "whID": "232323",
            "whToken": "webhookToken2323",
            "ignore": false,
            "ignoreBots": true,
            "managerRoles": []
        },
        {
            "name": "name",
            "identifier": "",
            "guildID": "444444",
            "channelID": "454545",
            "whID": "56565656",
            "whToken": "webhookToken5656",
            "ignore": false,
            "ignoreBots": true,
            "managerRoles": []
        }
    ]
}

You can enter here as many guilds as you want. Make sure webhooks and channels are valid.

The enhancedMention system makes the bot automatically resolve users, roles, channels in every guild if tried to be mentioned in another guild.
For instance if you type a message with @user in your guild but this user is not in your current guild but only in an other guild connected through the cross server system, it will mention the user in this other guild.

To enjoy all bots features you need to make sure the bot has the correct permissions:

  • read messages, send messages
  • @everyone role need to have the use external emoji permission in the channel in order to allow the bot to use all custom emotes
  • manage messages in order to support deleteOnUpdate and messageDelete options
  • manage permissions in the channel in order to support using lock commands

To start the bot once everything is ready, you can do:

  • npm start or yarn start to run the bot normally.
  • npm pm2start or yarn pm2start to run the bot with pm2.

cross-server-bot's People

Contributors

aervyon avatar bsian03 avatar dependabot[bot] avatar khaaz 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.