Reimnop / Discord4Fabric

A beautiful Discord bot client for Fabric
MIT License
37 stars 20 forks source link

Allow bot messages config option #71

Closed exstrim401 closed 1 year ago

Reimnop commented 1 year ago

Thank you for your contribution!

gadget78 commented 1 year ago

oo thats funny, as i also recently added this to my fork to, but didn't push it to a PR here ... looks like i implemented it a little differently mainly due to webhooks.. does your implementation, also ignore its own webhookss ?? ..

as the way i did it was ...

        //ignoring of bots
        if (event.getAuthor().isBot() && !config.listentoBots) { return; }
        //ignoring of your own webhooks or embeds/messages
        if (config.webhookUrl.contains(event.getAuthor().getId()) | event.getAuthor().equals(event.getJDA().getSelfUser())) {
            return;