Questions tagged [eris]

Use this tag for questions about the usage of Eris, not for questions regarding the Discord API or Discord in general (for API questions, please use the 'discord' tag).

Eris is a node.js module that allows the developer to interact with the Discord API. Use this tag for questions about the usage of discord.js, not for questions regarding the Discord API or Discord in general (for API questions, please use the 'discord' tag).

24 questions
2
votes
1 answer

Error: [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by /node_modules/eris/package.json

So i'm really new to this type of stuff. When running my 'npm start' command, it keeps dropping the following error below: [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by "exports" in…
Firework
  • 219
  • 2
  • 15
2
votes
2 answers

Editing Channel Permissions with Eris

Heyo, I'm working on a ticket system (;ticket), I've gotten down all the creation code so far. And now I just can't figure out how to edit channel permissions so the user can see the channel. I've tried Discord.js's version (as they're often…
user13880771
1
vote
1 answer

TypeError: Cannot read property 'findOne' of undefined (using mongoose)

I have been using rethinkdb, and since it's getting outdated, i wanted to switch to mongodb. On my prefix command, i keep on getting that error and this is my code: const { Guild } = require('../../models/Guild'); async function prefixCommand (msg,…
ETLegacy
  • 35
  • 1
  • 8
1
vote
1 answer

JavaScript bot to sync Discord channel and Twitch chat

I'm a small twitch streamer / content creator who's launching my Discord soon, and thought it would be cool if I had an IRC channel in my Discord synced up to my Twitch IRC chat when I livestream! I wanted to accomplish this by creating a bot which…
1
vote
1 answer

How would I make my DB function send the information back?

I'm trying to make my database easier to access when I'm coding. This is the function (located in the main bot file): function getDB(area,argument){ db.collection(area).doc(argument).get().then((q) => { }) } This is how I call…
user13880771
1
vote
1 answer

Variables are unable to be found by required code even if they're defined already

When I require code and load it into my main code for my Discord bot, it's unable to find variables or sub parts of them even if they're defined in the main code. Required code: module.exports.stupid = () => { bot.on('messageCreate', (msg) => { …
user13880771
0
votes
0 answers

How to combine await or .then with ComponentInteraction in eris library

I started making discord bot with Eris library in JS. I want to send an embed message after using command and save the newly-created message's ID to a variable. The emb object is a global variable with embed struct. Here's the…
Oczek22
  • 3
  • 1
  • 1
0
votes
1 answer

Eris sending a message to a specific channel

I use Eris to write a bot for Discord. The documentation says that to send a message to the channel, you need to enter its ID, and then the message being sent, createMessage(channelID, content, file) but after applying the command, an error is…
Tz055
  • 1
  • 1
0
votes
0 answers

How to fetch load my commands folder and its sub-directories?

I'm writing a bot using NodeJS, and I'm pretty stuck. I'm attempting on creating a help command for the bot, and my folders look something like this: commands/slash and after the /slash I have my commands categorised, so like Moderation commands are…
ETLegacy
  • 35
  • 1
  • 8
0
votes
1 answer

Mongoose - how to fetch specific number and message ID

I'm trying to make the bot basically edit the message of any specific case mentioned for example if i do -case 5 test it will look for case 5 and it's message. So far when i do it, it basically changes the recent case number message, instead of the…
ETLegacy
  • 35
  • 1
  • 8
0
votes
1 answer

Why does mongoose crash my bot over this error?

My bot crashes everytime on this error, when using mongoose and just cannot know how to fix it. 0|Trinity | [07:26:07] Cluster 0 | [Aug 08 2021 07:26:07] Rethink log: TypeError: Cannot read property 'autoRole' of null 0|Trinity | at…
ETLegacy
  • 35
  • 1
  • 8
0
votes
0 answers

TypeError: Cannot read property 'logsChannel' of undefined

I switched to mongoose not too long ago from rethinkdb, and i have re-coding most of the things of course. And i keep getting this error spammed TypeError: Cannot read property 'logsChannel' of undefined at Trinity.exports.handle…
ETLegacy
  • 35
  • 1
  • 8
0
votes
1 answer

Call a user directly using Eris

I am trying to make a bot with Eris and I need it to be able to call people in direct messaging. This is what I came up with, but clearly, I'm missing something as it does not work. if (contacts[name].dm) { …
LovesickDev
  • 63
  • 1
  • 8
0
votes
0 answers

NodeJS double output in If condition

I started recently with NodeJS wrote a small discord Bot. Currently I wanted to understand why I get the output 2 times in my if statement: if (command === "commands" || command === "help") { if (args[0] === "mods") { if…
Acocalypso
  • 17
  • 2
  • 5
0
votes
1 answer

How to send a data in the form of a file in a channel using Eris Discord

I have some data in Array. I want it to send the data in a channel in the form of a .json file. How to do that in Eris?
Samir
  • 91
  • 6
1
2