From 979e3805d7982ac3e87e102c513833682614e211 Mon Sep 17 00:00:00 2001 From: secret_online Date: Sat, 23 Jan 2016 10:31:30 +1300 Subject: Check Discord channel ID for incoming messages --- index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index aae741b..2d60b12 100644 --- a/index.js +++ b/index.js @@ -58,11 +58,13 @@ shulker.on("ready", function() { }); shulker.on("message", function(message) { - if (message.author.id !== shulker.user.id) { - var data = { - text: "<" + message.author.username + "> " + message.content - }; - client.send('tellraw @a ["",' + JSON.stringify(data) + ']'); + if (message.channel.id === shulker.channels.get("name", c.DISCORD_CHANNEL).id) { + if (message.author.id !== shulker.user.id) { + var data = { + text: "<" + message.author.username + "> " + message.content + }; + client.send('tellraw @a ["",' + JSON.stringify(data) + ']'); + } } }); -- cgit 1.4.1 /log/bin/relay.c?follow=1'>log tree commit diff
path: root/bin/relay.c (unfollow)
Commit message (Expand)Author
2019-12-23Reformat music.txtJune McEnroe
2019-12-23Rename music.md to music.txtJune McEnroe
2019-12-23Add DO YOU DOUBT ME TRAITORJune McEnroe
2019-12-22Add license header to cgit CSSJune McEnroe
2019-12-22Add The Book of EttaJune McEnroe
2019-12-21Revert "Add first working version of imbox"June McEnroe
2019-12-21Add first working version of imboxJune McEnroe
2019-12-20Respect mailmap in gl pretty formatJune McEnroe
2019-12-20Set LANG in cgit filtersJune McEnroe
2019-12-20Source .editrc before applying -v or -eJune McEnroe
2019-12-20Disable signing commitsJune McEnroe
2019-12-19Ignore about-filterJune McEnroe
2019-12-19Fix matching make tags with no sourcesJune McEnroe
2019-12-19Avoid matching := assignments as tagsJune McEnroe
2019-12-18Hide line numbers when rendering mdocJune McEnroe
2019-12-18Customize cgit CSSJune McEnroe
2019-12-18Use :target rather than :focus pseudo-classJune McEnroe
2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe
2019-12-18Add git.causal.agency cgit configJune McEnroe
2019-12-18Bail from hi if input is binaryJune McEnroe
2019-12-16Post "cgit setup"June McEnroe