question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'giveaways' of undefined

See original GitHub issue
{
  "stack": "TypeError: Cannot read property 'giveaways' of undefined
    at GcreateCommand.run (/home/container/src/commands/misc/gcreate.js:25:41)
    at module.exports (/home/container/src/events/message.js:52:24)
    at Client.emit (events.js:314:20)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Dragonizedpizzacommented, Jan 10, 2021

tysm @Nico105, I found the error. GiveawayManager instead of giveawaysManager.

1reaction
Nico105commented, Jan 8, 2021

image Just put the manager code in your index or bot .js. if you use this.client then put this.client instead of client in there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

discord-giveaways | TypeError: Cannot read property 'start' of ...
In index.js: const { GiveawaysManager } = require('discord-giveaways') client.giveaways = new GiveawaysManager(client, { storage : '.
Read more >
TypeError: Cannot read property 'hostedBy' of undefined #78
const config = require('./config.json'); client.config = config;. to my index, my bad.
Read more >
Error: Cannot read property "variables" from undefined,Detail
Hi,. I'm trying to update the variable 'request reason' of a requested item which has been created through service portal:.
Read more >
How To Fix the "uncaught typeerror: cannot read property ...
The “uncaught typeerror: cannot read property” error mainly occurs when you try to use or access an undefined variable.
Read more >
[Solved]-discord-giveaways | TypeError: Cannot read property 'start ...
Coding example for the question discord-giveaways | TypeError: Cannot read property 'start' of undefined-discord.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found