Skip to content

Instantly share code, notes, and snippets.

@acollierr17
Last active November 12, 2018 08:06
Show Gist options
  • Select an option

  • Save acollierr17/28e48772df400c5cba3150065bf9ea8b to your computer and use it in GitHub Desktop.

Select an option

Save acollierr17/28e48772df400c5cba3150065bf9ea8b to your computer and use it in GitHub Desktop.

Revisions

  1. acollierr17 revised this gist Nov 12, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,13 @@ const { Client } = require('discord.js');

    const client = new Client({ disableEveryone: true });

    const philly = '158063324699951104'; // User ID for the friend you want to troll
    const yourFriend = '158063324699951104'; // User ID for the friend you want to troll

    client.on('ready', () => console.log(`Logged in as ${client.user.tag} (${client.user.id}) in ${client.guilds.size} server(s).`));

    client.on('message', async message => {

    // This is here because I want to ignore any messages being sent. Only want to focus on the "messageDelete" event
    // This is here because I want to ignore any messages being sent. Only want to focus on the "messageDelete" event
    if (message.author.bot) return;
    if (message.member) return;
    });
  2. acollierr17 created this gist Nov 12, 2018.
    26 changes: 26 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    const { Client } = require('discord.js');

    const client = new Client({ disableEveryone: true });

    const philly = '158063324699951104'; // User ID for the friend you want to troll

    client.on('ready', () => console.log(`Logged in as ${client.user.tag} (${client.user.id}) in ${client.guilds.size} server(s).`));

    client.on('message', async message => {

    // This is here because I want to ignore any messages being sent. Only want to focus on the "messageDelete" event
    if (message.author.bot) return;
    if (message.member) return;
    });

    client.on('messageDelete', async message => {

    if (!message.guild) return;
    if (message.author.id !== yourFriend) return;

    let msg = await message;

    message.channel.send(`${message.author} deleted: **${msg.content}**`);
    });

    client.login('no u');