How to use the wtfnode.init function in wtfnode

To help you get started, we’ve selected a few wtfnode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github discordjs / RPC / test / lobby.js View on Github external
'use strict';

/* eslint-disable no-console */

try {
  require('wtfnode').init();
} catch (err) {} // eslint-disable-line no-empty

const { Client } = require('../');

const { clientId, clientSecret } = require('./auth');

const client = new Client({ transport: 'ipc' });

client.on('ready', async () => {
  console.log(client.user);

  await client.setActivity({
    state: 'slithering',
    details: '🐍',
    startTimestamp: new Date(),
    largeImageKey: 'snek_large',
github discordjs / RPC / test / rp.js View on Github external
'use strict';

/* eslint-disable no-console */

try {
  require('wtfnode').init();
} catch (err) {} // eslint-disable-line no-empty

const { Client } = require('../');

const { clientId } = require('./auth');

const client = new Client({ transport: 'ipc' });

client.on('ready', () => {
  console.log(client);

  client.subscribe('ACTIVITY_JOIN', ({ secret }) => {
    console.log('should join game with secret:', secret);
  });

  client.subscribe('ACTIVITY_SPECTATE', ({ secret }) => {

wtfnode

Utility to help find out why Node isn't exiting

ISC
Latest version published 4 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages