Coder Social home page Coder Social logo

dislink's Introduction

DisLink V2

DisLink is a Discord bot used to forward messages between Discord channels. This can be done across guilds or within the same guild. Thread channels are also supported

If you need support with DisLink please join my Discord server

Downloads

Releases Snapshots
Standalone Download Download
Bukkit Download Download

(there are no releases for V2 at the moment)

Setup

  1. Create a bot application through the Discord developer panel
  2. Generate a bot token and save it somewhere secure
  3. Download the relevant DisLink jar from above
    • If you are running Dislink on a Minecraft server, place Dislink in the plugins folder and restart the server to generate the config files
    • If you are running DisLink standalone, then run the jar to generate the config files
  4. Once the config files are generated fill out main.conf with the bot token you generated earlier
  5. Then fill out channels.conf with your channel ID's
  6. Save your config and restart the server/application, and you should be ready to go!

Tips

Global Settings

Global settings can be found in global-settings.conf and define the default values for forwarding messages. This means the channel-settings block in channels.conf can be deleted to remove repetition if you want all forwarding to be the same format

Multiple channels

To forward between multiple channels you just need to add another block in channels.conf. In this example we will omit the channel-settings option and just take the global settings from global-settings.conf

For example:

channels = [
  {
    # Values available: FIRST_TO_SECOND, SECOND_TO_FIRST & BOTH
    direction = BOTH
    # channel-id: The ID of the channel you want chat to be forwarded to/from. This can be any type of thread channelThe URL of the webhook you want the bot to use.
    # webhook-url: The url of the webhook. Given that auto-create-webhooks is enabled in "main.conf" and the bot has MANAGE_WEBHOOKS permissions in the channel, these will be created and saved for you.
    first-channel {
      channel-id = "12345"
      webhook-url = ""
    }
    second-channel {
      channel-id = "54321"
      webhook-url = ""
    }
    # Values available: WEBHOOK & PLAINTEXT
    type = WEBHOOK
  },
  {
    # Values available: FIRST_TO_SECOND, SECOND_TO_FIRST & BOTH
    direction = BOTH
    # channel-id: The ID of the channel you want chat to be forwarded to/from. This can be any type of thread channelThe URL of the webhook you want the bot to use.
    # webhook-url: The url of the webhook. Given that auto-create-webhooks is enabled in "main.conf" and the bot has MANAGE_WEBHOOKS permissions in the channel, these will be created and saved for you.
    first-channel {
      channel-id = "56789"
      webhook-url = ""
    }
    second-channel {
      channel-id = "98765"
      webhook-url = ""
    }
    # Values available: WEBHOOK & PLAINTEXT
    type = WEBHOOK
  }
]

Placeholders available

  • %message%

Author

  • %author_username%
  • %author_displayname%
  • %author_id%
  • %author_avatar%
  • %author_mention%
  • %author_nickname%
  • %author_guild_avatar%
  • %author_toprole_name%
  • %author_toprole_mention%

Origin

  • %origin_channel_name%
  • %origin_channel_id%
  • %origin_channel_mention%
  • %origin_guild_name%
  • %origin_guild_id%
  • %origin_guild_iconurl%

Destination

  • %destination_channel_name%
  • %destination_channel_id%
  • %destination_channel_mention%
  • %destination_guild_name%
  • %destination_guild_id%
  • %destination_guild_iconurl%

dislink's People

Contributors

anutley avatar

Stargazers

 avatar Udoy avatar Jamie Needham avatar Nathan Adhitya avatar  avatar

Watchers

 avatar

dislink's Issues

Request: Channel grouping.

As discussed on Discord, here's an example 'config' setup.

groups=[
	{
		# group name, for labeling purposes only.
		group-name="main channel"

		# channels.  channel-id = numerical ID of the discord channel
		# direction=in (doesn't send out), out (doesn't accept messages), both
		channels {
			{
				channel-id="12345"
				prefix="[SRV1]"
				direction=BOTH
			},
			{
				channel-id="54321"
				username-format="[SRV2] message from %author_displayname%"
				direction=BOTH
			},
			{
				channel-id="67890"
				prefix="[SRV3]"
				direction=BOTH
			}
		}

		# username-format can be customized per channel instead of just the prefix.
		username-format="%prefix% %author_displayname%"

		# prefix is the default used
		prefix="[DisLink]"
	}
]

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.