Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //app.js
- var client = require('./connection.js')
- var commands = require('./commands.js')(client)
- // connection.js
- // message is equal to client
- // so in yours it would be var client = new tmi.Client({Options go here}) then module.exports = client
- var message = {
- log: function(message) {
- console.log(message)
- }
- }
- module.exports = message
- // commands.js
- // message here is equivilent to client
- // message.log is equivilent to client.on
- module.exports = function(message) {
- message.log("hello world")
- }
- //This will log message hello world when you run it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement