discord

package
v0.0.0-...-aafb61e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

irc-discord-bridgebot - a puppeteer bridge to connect IRC and Discord * Copyright (C) 2021 Arsen Arsenović <arsen@aarsen.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

irc-discord-bridgebot - a puppeteer bridge to connect IRC and Discord * Copyright (C) 2021 Arsen Arsenović <arsen@aarsen.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

irc-discord-bridgebot - a puppeteer bridge to connect IRC and Discord * Copyright (C) 2021 Arsen Arsenović <arsen@aarsen.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const MAX_IRC_MSG_LENGTH = 256

figure out a better limit? this should be fine for now, and there's no need to do this on the reverse, discords message limit is 4K rather than 512, and doesn't include the entire PRIVMSG command, unlike IRC.

Variables

This section is empty.

Functions

func New

func New(config *DiscordConfig) (sides.Side, error)

returns side instead of DiscordSide because Go lacks a way for me to statically assert that a *DiscordSide ought to be applicable to sides.Side

Types

type DiscordChannelMap

type DiscordChannelMap map[string]struct {
	WhId       string
	WhToken    string
	IrcChannel string
}

this feels like a layering violation, but I'll allow it

type DiscordConfig

type DiscordConfig struct {
	DiscordToken      string
	Receiver          sides.Receiver
	DiscordChannelMap *DiscordChannelMap

	MessageBaseUrl       string
	MessageListenAddress string
}

type DiscordSide

type DiscordSide struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*DiscordSide) AddEntity

func (ds *DiscordSide) AddEntity(sides.Entity, string)

func (*DiscordSide) ChangeEntity

func (ds *DiscordSide) ChangeEntity(sides.Entity)

func (*DiscordSide) GetOurId

func (ds *DiscordSide) GetOurId() string

func (*DiscordSide) RemoveEntity

func (ds *DiscordSide) RemoveEntity(sides.Entity, string)

func (*DiscordSide) SendMessage

func (ds *DiscordSide) SendMessage(sender sides.Entity, channel string, message string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL