Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. //app.js
  2. var client = require('./connection.js')
  3. var commands = require('./commands.js')(client)
  4.  
  5. // connection.js
  6. // message is equal to client
  7. // so in yours it would be var client = new tmi.Client({Options go here}) then module.exports = client
  8. var message = {
  9. log: function(message) {
  10. console.log(message)
  11. }
  12. }
  13.  
  14. module.exports = message
  15.  
  16. // commands.js
  17.  
  18. // message here is equivilent to client
  19. // message.log is equivilent to client.on
  20. module.exports = function(message) {
  21. message.log("hello world")
  22. }
  23.  
  24. //This will log message hello world when you run it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement