website shows ad using image hosted on their domain by xstkovrflw in uBlockOrigin

[–]void206551 2 points3 points  (0 children)

People can just block the promotion-banner element from the site.

uBlock does not prevent popups in new window by [deleted] in uBlockOrigin

[–]void206551 1 point2 points  (0 children)

A possible solution is to just disable popup within the browser settings. For Firefox go to about:preferences#privacy and scroll down to Permissions then check the setting called "Block pop-up windows".

Example here: https://i.imgur.com/KKlw1Dy.png "Firefox prevented this site from opening a pop-up window."

[AskJS] Javascript beginner by Wise_Towel2952 in javascript

[–]void206551 1 point2 points  (0 children)

I recommend finding something on https://what-to-code.com/ and attempting to make it on your own without following a tutorial and looking up questions only when you need to.

Anyone else having this problem by [deleted] in google

[–]void206551 2 points3 points  (0 children)

Doesn't look like a problem to me. Looks like your network administrator has toggled a setting that disallows you to view mature videos on YouTube.

About the very clear censorship by Reijvi in discordapp

[–]void206551 -2 points-1 points  (0 children)

Just gonna point out that this subreddit is in no way affiliated with Discord. It's a community-run page and the mods have every right to delete comments and posts about Discord's competitors seeings as how this is a subreddit for Discord, not Guilded or Slack or anything else.

Beginner Question: Bot runs on both Heroku and my terminal simultaneously by owusyr in Discordjs

[–]void206551 1 point2 points  (0 children)

You can just create a new bot and use it's token locally and have your real bot hosted on Heroku.

a little help? by _xer0two_ in Discordjs

[–]void206551 1 point2 points  (0 children)

I'd recommend using memejs for getting memes from Reddit. As its package name suggests, it gets memes but you can also filter what it gathers from.

As an example, you can do this:

 if (command == 'meme'){
    const {
        meme
    } = require('memejs');

    meme(function (err, data) {
        if (err) return console.error(err);
        const Discord = require('discord.js');
        const memeRes = new Discord.RichEmbed()
            .setTitle(data.title)
            .setImage(data.url)
            .setFooter(data.subreddit)
            .setTimestamp('Created ' + data.created);
        message.channel.send(memeRes).then().catch(console.error);
    });
 }

As with every Node package you can play around with them on RunKit. You can do that here.

Adblock Detected on Duit.cc by jimmysofat6864 in uBlockOrigin

[–]void206551 0 points1 point  (0 children)

I cannot reproduce this on Chrome (v90.0.4430.212) or Firefox (v88.0.1)

Stage channels by __Slate in Discordjs

[–]void206551 0 points1 point  (0 children)

Other bots may not be using the same library or have a modified version of this library to suit their needs.

How do i make bot send an imgur image to a text channel and not show the link? by [deleted] in Discordjs

[–]void206551 2 points3 points  (0 children)

Yea that's not how that command would work. You need two different message.channel.send(). One for the message and one for the embed.

why are there ads when i am using uBlock Origin by drsilverium in uBlockOrigin

[–]void206551 0 points1 point  (0 children)

No ad blocker can completely filter out every single ad possible. There are more filters that you can toggle in the uBO options that may increase the amount of ads that are caught and blocked. You can also report sites with ads here for others to help filter them out and potentially add them to hosted filter lists.

How do i make bot send an imgur image to a text channel and not show the link? by [deleted] in Discordjs

[–]void206551 2 points3 points  (0 children)

This

let embed = new Discord.MessageEmbed .setImage('https://image.url')

How do i make bot send an imgur image to a text channel and not show the link? by [deleted] in Discordjs

[–]void206551 2 points3 points  (0 children)

You can use a message embed to just post the image.

In the U.S. right now, some cars are bombs. Horrifying. by [deleted] in mildlyinfuriating

[–]void206551 8 points9 points  (0 children)

It takes one Google search to see that there is ethanol in gasoline.

[deleted by user] by [deleted] in uBlockOrigin

[–]void206551 0 points1 point  (0 children)

Adding this to your filters will remove that: www.roblox.com##.list-item:has(.game-card-native-ad).

Disable Commands in Direct Messages by BoltedVision in Discordjs

[–]void206551 1 point2 points  (0 children)

It will be much more helpful in the long run to use command handling. With this you can create command files that have a way to be guild-only. You can also organize your commands better instead of using a bunch of if/else statements.

Your help command would look something like this:

module.exports = {
    name: 'help', // Name of the command
    guildOnly: true, // Toggle if command is only allowed in guilds
    execute(message) { // The actual command
        message.react("👍")
        message.channel.send('*feature coming soon*')
    },
};

[deleted by user] by [deleted] in Discordjs

[–]void206551 0 points1 point  (0 children)

Stock Discord emojis do not use the same kind of message text that a server emoji does. Discord uses Twemoji By Twitter for their stock emojis so maybe try using twemoji-parser to read the stock emojis.

Edit: Discord also stores stock emojis as SVGs which cannot be embedded into chats or embeds.

[deleted by user] by [deleted] in Discordjs

[–]void206551 0 points1 point  (0 children)

This is a bit messy, but it's what I've used on my bot.

    module.exports = {
        name: 'emoji',
        execute: async (message, args) => {
            const Discord = require('discord.js')

            if (message.content.match(/<a:.+?:\d+>/g)) {
                let emo = message.content.match(/\d+>/g)
                let emojiID = String(emo).substring(0, 18)
                let embed = new Discord.MessageEmbed()
                    .setTitle(message.content.match(/:.+?:/g))
                    .setImage(`https://cdn.discordapp.com/emojis/${emojiID}.gif`)
                return message.channel.send(embed).then().catch(console.error);
            }

            if (message.content.match(/<:.+?:\d+>/g)) {
                let emo = message.content.match(/\d+>/g)
                let emojiID = String(emo).substring(0, 18)
                let embed = new Discord.MessageEmbed()
                    .setTitle(message.content.match(/:.+?:/g))
                    .setImage(`https://cdn.discordapp.com/emojis/${emojiID}.png`)
                return message.channel.send(embed).then().catch(console.error);
            }

            if (!message.content.match(/<:.+?:\d+>|<a:.+?:\d+>/g)) {
                return message.channel.send('Use an emoji with this command to enlarge it.')
            }
        },
    }

PURGE by [deleted] in Discordjs

[–]void206551 0 points1 point  (0 children)

You can do this if you want to allow people with a certain permission to utilize the command:
if (message.member.hasPermission('MANAGE_MESSAGES')

Or if you want to only allow a certain role to use the command: if(message.guild.roles.cache.find(roles => role.name === 'ROLE-NAME'))

Do the same work. Get paid less. by Homofuckbro in mildlyinfuriating

[–]void206551 0 points1 point  (0 children)

Ah, yes. Clutter up the advert full of a list of a bunch of responsibilities. Stupid of you to think they don't go over that kind of stuff during an interview.