mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 07:29:24 +00:00
Add Discord support
This commit is contained in:
@ -2,6 +2,7 @@ package bridge
|
||||
|
||||
import (
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/bridge/discord"
|
||||
"github.com/42wim/matterbridge/bridge/gitter"
|
||||
"github.com/42wim/matterbridge/bridge/irc"
|
||||
"github.com/42wim/matterbridge/bridge/mattermost"
|
||||
@ -35,6 +36,8 @@ func New(cfg *config.Config, bridge *config.Bridge, c chan config.Message) Bridg
|
||||
return bslack.New(cfg.Slack[name], name, c)
|
||||
case "xmpp":
|
||||
return bxmpp.New(cfg.Xmpp[name], name, c)
|
||||
case "discord":
|
||||
return bdiscord.New(cfg.Discord[name], name, c)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ type Message struct {
|
||||
|
||||
type Protocol struct {
|
||||
BindAddress string // mattermost, slack
|
||||
Guild string // discord
|
||||
IconURL string // mattermost, slack
|
||||
IgnoreNicks string // all protocols
|
||||
Jid string // xmpp
|
||||
@ -32,11 +33,11 @@ type Protocol struct {
|
||||
PrefixMessagesWithNick bool // mattemost, slack
|
||||
Protocol string //all protocols
|
||||
RemoteNickFormat string // all protocols
|
||||
Server string // IRC,mattermost,XMPP
|
||||
Server string // IRC,mattermost,XMPP,discord
|
||||
ShowJoinPart bool // all protocols
|
||||
SkipTLSVerify bool // IRC, mattermost
|
||||
Team string // mattermost
|
||||
Token string // gitter, slack
|
||||
Token string // gitter, slack, discord
|
||||
URL string // mattermost, slack
|
||||
UseAPI bool // mattermost, slack
|
||||
UseSASL bool // IRC
|
||||
@ -61,6 +62,7 @@ type Config struct {
|
||||
Slack map[string]Protocol
|
||||
Gitter map[string]Protocol
|
||||
Xmpp map[string]Protocol
|
||||
Discord map[string]Protocol
|
||||
Gateway []Gateway
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user