On utilise ce bot pour LeBID: https://github.com/reactiflux/discord-irc
Il est host sur la VM d'UrLab sur la colloc urlab@irc.urlab.be:/home/urlab/docker/apps/lebid
Il tourne dans un docker, la config (docker-compose) est la suivante:
version: "3.7"
services:
LeBID:
image: "discordirc/discord-irc"
volumes:
- .config/config.json:/config/config.json
networks:
- public
restart: unless-stopped
networks:
public:
external: true
(Oui un compose pour un seul service c'est un peu overkill mais pourquoi pas ?)
le fichier .config/config.json
contient la config suivante
{
"nickname": "LeBID",
"server": "irc.libera.chat",
"discordToken": "***REDACTED***", // the discord token need to be keep secret
"channelMapping": {
"727212463988146206": "#UrLab" // 🕸-irc (discord) <-> #UrLab (irc)
},
"ircOptions": {
"username": "LeBID",
"debug": true
},
"format": { // Optional custom formatting options
"ircText": "<{$displayUsername}> {$text}", // When sending a message to IRC
"urlAttachment": "<{$displayUsername}> à envoyé: {$attachmentURL}", // When sending a Discord attachment to IRC
"discord": "**<{$author}>** {$withMentions}", // When sending a message to Discord
"webhookAvatarURL": "https://robohash.org/{$nickname}" // Default avatar to use for webhook messages
},
"parallelPingFix": true,
"ignoreUsers": {
"irc": [""] // To ignore users on irc, was used to ignore lechbot but no longer
}
}