flottbot: [Discord]: bot not listening in room?

Report

Bot seemingly not listening on room in Discord

(Appreciate Discord is still showing as WIP, so if this is something that is still being worked on, please feel free to close this issue)

What did you do?

Followed https://target.github.io/flottbot-docs/basics/discord/ to setup bot and got it added to a test server.

It shows up as online, and I can directly interact with the bot and it responds to rules (such as the hello.yml one in the example docs)

However, the bot does not seem to respond to triggers on the room it is sitting in. For example, if I use the trigger hello in a DM, it responds happily. But if I do it in the room, it doesn’t.

I also added the announce.yml example (https://github.com/target/flottbot/blob/master/config-example/rules/announce.yml) and when I run it on a DM, I see this on the bot’s logs:

time="2019-12-27T11:12:23Z" level=debug msg="Found rule match 'announce' for input 'announce test'"
time="2019-12-27T11:12:23Z" level=debug msg="Room 'general' does not exist"
time="2019-12-27T11:12:23Z" level=error msg="Could not find any of the rooms specified in 'output_to_rooms' while 'direct_message_only' is set to false. Please check rule 'announce'"

Trying different variations (e.g. ‘#general’, ‘general’, “general”) didn’t help. It’s like the bot can’t see the channel, even though it is inside the server.

What did you expect to happen?

The bot should respond to triggers on the channel, unless otherwise excluded

What happened instead?

The bot did not listen to triggers on the channel

Screenshots

N/A

Your Environment

  • Flottbot version: Docker image target/flottbot:latest
  • OS: Linux
  • OS version: 19
  • Bot YAML (see below)
  • Rule YAML (see below) if applicable
chat_application: discord
discord_token: [CUT]

name: bfbot
debug: true

hello.yml

# metadata
name: hello
active: true
respond: hello
format_output: "what's up?" # message to send to your user when they say hello
direct_message_only: false
help_text: hello
include_in_help: true

announce.yml

# meta
name: announce
active: true
# trigger and args
respond: announce
args:
  - message
# response
format_output: "${message}"
direct_message_only: false
output_to_rooms:
  - general
  - 'general'
  - '#general'
  
# help
help_text: announce <text>
include_in_help: true

Additional context

N/A

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17

Most upvoted comments

Thanks 😃

ok, thanks… i don’t recall specifically trying with #general, but the room functionality seemed to work fine for me when i tested, so i will give it a couple more spins to see if i can replicate…

Did some digging and it looks like it’s a two-part issue.

  1. Bot not responding in channel. This is a bug.
  2. Bot is not able to send message to specific channels via output_to_rooms. This is a side effect of discord being in WIP as you pointed out.

I have a fix for 1. and I’ll see how much headway I can make on 2.