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
0
votes
1 answer

ReferenceError: "bot" is not defined (Eris) - in my commands

I am in the process of creating a Discord bot, and I have gotten pretty far. However, I keep getting this error when I try to connect my bot: ReferenceError: bot is not defined My main file's code is here. I have defined the constant variable bot…
0
votes
1 answer

Why is this DB function returning undefined?

I'm trying to make a function where I can easily call my MongoDB. This is the function code/hanlder: let get = {}; get.getGuildData = (id) => { const guildData = require('./models/guilds.js') guildData.findById(id).then(async (data) => { …
user13880771
0
votes
1 answer

How would I correctly .catch this?

I'm trying to catch // this line, but I can't seem to find where to put the catch to correctly catch it. mutedList.forEach((i) => { if (i.mutedEnd*1000 < new Date()){ console.log(i) …
user13880771
0
votes
0 answers

Incorrect name when inputting to firebase [JS ISSUE]

I'm trying to make a played command (if any of you have used it on tatsu, now deprecated) I'm trying to add games into a firebase database, but I am unable to name it correctly. The code is: let currentname =…
user13880771
0
votes
2 answers

Get value from array based on key

I'm trying to get the text from an array based on a number string. This is the array: const titles = [ { level: '0', text: 'None' }, { level: '1', text: 'Bee Support' }, { level: '2', text: 'Bee Staff' }, { …
user13880771
0
votes
1 answer

requiring code fails to work no matter what I try

I'm attempting to break down my Discord bot into different files to keep everything neat. I've created a test file and tested it out, and it either fails to load or doesn't at all. Please let me know if there's anything I should add / fix. required…
user13880771
0
votes
4 answers

Check if userid matches one in the array

I'm attempting to check if a user's ID is in this array and if they are, also get the "text" from it. Array: const staff = [ { user: '245569534218469376', text: 'dev' }, { user: '294597887919128576', text:…
user13880771
0
votes
1 answer

Discord bot TypeError. Can't connect it to my server

I am trying to make a Discord bot that sends a specific message ("!clean") to a specified text channel on Discord every 30 minutes or something like that. I've run into a bunch of problems, and this is the furthest I've gotten. I get this…
-5
votes
1 answer

SyntaxError: Unexpected token 'if'

var Eris = require('eris') var bot = new Eris("########") bot.on("ready", () =>( console.log("to vivo pai ihihihi") )); bot.on("messageCreate"), (msg) => ( if(msg.content.indexof(!ajuda) == 0) { …
dino
  • 1
  • 1
1
2