PhantomBot and Discord Intergration

intergration
alerts
discord

#1

Hi Support,

I am looking to use P-Bot (Phantom Bot) to post Stream alerts into my Discord > Announcements Channel.

I have gone through this process: Discord Integration Setup

And as a result I can see the bot in Discord come online and offline when I start or stop P-Bot.

P-Bot has read and send permissions in the Discord > Announcements Channel, in fact i gave it all permissions explicitly to the channel to try resolve this issue, i will evaluate that once the issue is resolved.

Within P-Bot:

  • I have enabled ./discord/handlers/streamHandler.js
  • In the Discord Module > Stream Alert Settings I have
    > Toggle Online Alerts - Enabled
    > Toggle Bot Stream Status - Enabled

My Online message is configured and my alert channel is set to > announcements

The Issue:
When I go live on my stream, no alerts are popping up in #announcements in Discord.

Additional Question: Is there a way I can test read/write from the bot to discord without having to turn on my stream. I believe that any posts that appear in the channel should show up in the P-Bot command console, like with Twitch chat, however this is not happening, possibly another symptom of my actual issue.


#2

You could test if your bot can write to discord by creating a custom command that only works in the announcements channel.

Try adding the following command as I did:

Note: Do not put #announcements for the channel, only put announcements. This command will only work for admins, and it must be done in the announcements channel.

I personally use my bot to send a stream notification to discord too, and it posts every time.


#3

Hi UsernamesSuck (Great Username!) ,

Ive done as you directed, and when calling !test in the announcements channel, i am still getting no response from the bot.


#4

Ah, is there any chance you could post your bot’s console? I do not need to see the entire thing.

What I really want to see is the message I’ve highlighted here, where the bot “Successfully authenticated with Discord.”

Also the lines when you used the commands could help.


#5

Ok so I can tell you now im not getting the “Successfully authenticated with Discord” log in the console. Yet the bot will go offline in discord if i kill P-Bot, and will come online again when starting P-Bot. I have also re-applied the Bot Token to the Botlogin.txt file and restarted P-Bot.


#6

If you don’t get a message saying it’s authenticated with discord, that is the first issue to tackle.

You see the bot in your server, so it sounds like the bot account is setup correctly.

It might be your auth token.

go back to the discord dev page:

Click on your bot app, make sure it’s a bot (it will say something like “APP BOT USER” at the top of one panel).

Click the “click to reveal” text next to “Token:”

Copy the entirety of your token into your clipboard.

Now in your bot’s folder, open up botlogin.txt, and add a new line (or replace the existing if it does exist) with:
discord_token=YOUR_TOKEN_HERE

If this doesn’t work, then you might need to re-authorize your bot with discord so it can join your channel.

You can do so by going back to the discord developer page, copy the Client ID, and append it to this url: https://discordapp.com/oauth2/authorize?&scope=bot&permissions=8&client_id=
Then visit the url.


#7

This seems to be a common issue. Discord is dropping old APIs, the current version of PhantomBot is using an older API which should only be dropped on October 6th, from what I can see Discord is dropping it slowly and on October 6th it will be removed completely. We will have another stable release out by then, but for now please update to the nightly build.

https://phantombot.tv/#download


#8

Did all this no dice (Re-auth etc), but see ScaniaTVs post (Installing the Nightly, that worked).


#9

This has fixed the issue, i can now see the Test command in Discord just fine!


#10

Thank you for your help UsernamesSuck, I really appreciate it!

And thank you to you too ScaniaTV, without you im sure we would both be scratching our heads for a while longer!


#11

Seems you guys might have to release a new version soon as this issue is becoming more and more common :worried:


#12

We’re working on that. I’m putting a lot more time this week into the bot to do this. :wink:


#13

I am even trying to wrap up the Data Render Service and fix a few bugs in between horrible office hours :wink:


#14

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.