Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in streams refresh: TypeError: fields.flat is not a function #26

Closed
MrWhiteFlamesYT opened this issue Apr 25, 2021 · 3 comments
Closed

Comments

@MrWhiteFlamesYT
Copy link

Hey there

When i have the bot running and all when it does its "[Twitch] ▪ ▪ ▪ ▪ ▪ Refreshing now (Periodic refresh) ▪ ▪ ▪ ▪ ▪" and gets a live notification from a streamer i listed, then it gives me this error when it tries to send the message in the channel. and yes the bot it is connecting too has all the perms on the channel. can you help me fix this please?

[TwitchMonitor] Stream channel has gone online: mrwhiteflamesyt_dev
[StreamActivity] Update current activity: watching mrwhiteflamesyt_dev.
[TwitchMonitor] Error in streams refresh: TypeError: fields.flat is not a function
at Function.normalizeFields (/Whitebots/Stream-Notify/timbot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)
at MessageEmbed.addFields (/Whitebots/Stream-Notify/timbot/node_modules/discord.js/src/structures/MessageEmbed.js:266:42)
at MessageEmbed.addField (/Whitebots/Stream-Notify/timbot/node_modules/discord.js/src/structures/MessageEmbed.js:257:17)
at Function.createForStream (/Whitebots/Stream-Notify/timbot/live-embed.js:29:16)
at TwitchMonitor.onChannelLiveUpdate (/Whitebots/Stream-Notify/timbot/index.js:492:32)
at Function.handleChannelLiveUpdate (/Whitebots/Stream-Notify/timbot/twitch-monitor.js:220:21)
at Function.handleStreamList (/Whitebots/Stream-Notify/timbot/twitch-monitor.js:182:23)
at TwitchApi.fetchStreams.then (/Whitebots/Stream-Notify/timbot/twitch-monitor.js:95:24)
at process._tickCallback (internal/process/next_tick.js:68:7)

@roydejong
Copy link
Owner

This most likely means you are using an older version of Node.js, try updating to v12.

See: https://stackoverflow.com/a/61034427/1410310

@MrWhiteFlamesYT
Copy link
Author

How can i get a specific role to be pinged and does it use role id or name?

@roydejong
Copy link
Owner

How can i get a specific role to be pinged and does it use role id or name?

For basic config check out the README. You can define specific roles under the discord_mentions config option.

You have to set these by name currently, setting it by ID is an open request: #24

@roydejong roydejong changed the title Hey i have a little Bug Error in streams refresh: TypeError: fields.flat is not a function Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants