DiscordSRV

DiscordSRV

86.8k Downloads

TownyChat channels are broadcasted to Discord

Ionaru opened this issue ยท 4 comments

commented

TownyChat channels like town, nation and staff chat are picked up by DiscordSRV and sent to the Discord chat, this is not supposed to happen.

Are you able to fix this?

commented

Will be working on this soon

commented

Added TownyChat channels support (http://scarsz.tech:8080/job/DiscordSRV/12/artifact/target/DiscordSRV-Build-11.666-SNAPSHOT-12.jar)

Two things to pay attention to:
1.) The default channel for TownyChat is general, not global.
2.) You need to add hooked: true to every used channel within TownyChat's Channels.yml or messages from Minecraft to Discord will not work. Example:

Channels:
    general:
        commands: [g]
        type: GLOBAL
        hooked: true
        channeltag: '&f[g]'
        messagecolour: '&f'
        permission: 'towny.chat.general'
        craftIRCTag: 'admin'
        range: '-1'

    admin:
        commands: [a,admin]
        type: DEFAULT
        hooked: true
        channeltag: '&f[&4ADMIN&f]'
        messagecolour: '&c'
        permission: 'towny.chat.admin'
        craftIRCTag: 'admin'
        range: '-1'
commented

Having not looked into how TownyChat's API works, there's nothing I can do since canceled chat events are already watched out for (https://github.com/Scarsz/DiscordSRV/blob/master/src/com/scarsz/discordsrv/listeners/ChatListener.java#L28); I'd have to look into it's API to see if there's anything I can do about it though.

commented

@Scarsz is TownyChat support going to be added so that the Mod and Admin chats do not send to discord?