#development

1 messages · Page 480 of 1

sick cloud
#
let path = require('path').join(__dirname + '/assets'); console.log(path)
app.use(require('express').static(path));
#

path is C:\Users\-----\Desktop\minestore\assets

#

and i can verify that dir exists

topaz fjord
#

one min Tony lemme check how I did it

sick cloud
#

ok

topaz fjord
#

@sick cloud i do mine like this

#
app.use(express.static(`${__dirname}/public`));
#

then to access it i do ./public/whatever the fuck

sick cloud
#

ohk

#

trying to add params and stuff

topaz fjord
earnest phoenix
#

Anyone generous enough to help me add a triggered image over a users avatar using Image Manipulation in JavaScript? Im not too sure how to do it.

restive silo
#

for Image Manipulation in js use Canvas

earnest phoenix
#

Okay

sick cloud
#

use canvas-constructor also

#

makes it way easier

sick cloud
#

can i do this? msg.mentions.members.first().delete(); 👀

topaz fjord
#

no

#

wait

#

msg.mentions.members.first() returns type GuildMember @sick cloud

sick cloud
#

oh

#

i need to try delete the first mention if ifs the bots mention

#

since userinfo conflicts

#

k!userinfo @user returns info for @user
@koya userinfo @user returns info for @koya not @user

#

and i need to ignore the mention prefix

topaz fjord
#

u can use .delete() on msg.mentions.members

#

but you will have to specify what you want to delete

sick cloud
#

oh

#

is there a better way to do what i need to do?

#

and i cant filter the mentions by the bots user id since then they cant do @koya userinfo @koya or k!userinfo @koya

split lantern
#

@sick cloud best thing would be to parse the mentions yourself

sick cloud
#

ok

sick cloud
#

thanks so much <3

bright spear
#

theres already a bot named koya 👀

#

and they mention nsfw on their bot page smh ban them

sick cloud
#

good for them

#

@runic bridge this one?

floral stone
#

So, how could I change a setting every day at midnight automatically using python. Like, having a loop played in the background

bright spear
#

@sick cloud yeah

sick cloud
#

oof

floral stone
#

I don't need a snippet or anything, just not 100% sure what to google.

knotty steeple
#

can you do a f string and do b'' at the same time in python

#

or format

#

something

west raptor
#

it was working before

#

i didnt change anything

gilded blaze
#

Are you sure you are looking at the right msg?

west raptor
#

i wasnt, sorry, i know the issue now

sick cloud
marble elm
#

an error

#

get use to them

topaz fjord
#

@sick cloud ```js
<Client>.on("error", (err) => {
console.log(err)
})

#

add that and wait for it to come back

sick cloud
#

facepalm

#

and on

#

got to add a new file for it

knotty steeple
#

@marble elm that doesnt help

#

if you dont have anything that actually helps dont say anything

marble elm
#

you asked what it was..

#

and i told you

#

never specified that you wanted help

knotty steeple
#

he asked what it was as in what the error means

bright spear
#

pls dont troll

old crystal
#

@bright spear your here?!

#

Oof

bright spear
#

yeah lol

ionic barn
#

@floral stone you can use a background task

#

with datetime imported

floral stone
#

I guess you are right but i don't want to run another file tbh

ionic barn
#

wdym

floral stone
#

nvm, is it like a background loop with asyncio?

ionic barn
#

yes

floral stone
#

Could you link me to it

#

Like some sort of doc

#

That's what i thought but i'm not 100% sure what i should google

ionic barn
#

idk about that but i can link you to an example of a background task

floral stone
#

that be fine

ionic barn
#

dm or here?

floral stone
#

up to you

ionic barn
floral stone
#

Not what i was looking for but i could use it, thx

lusty dew
#
const db = require("quick.db")

module.exports.run = async (client, message, args, ops) => {
    db.startsWith(`guildMessages_${message.guild.id}`, { sort: '.data'}).then(resp=>{


        resp.length = 15;

        var finalOutput = "**Leaderboard:**\n\n";
        for(var i in resp) {
            finalOutput += `${client.users.get(resp[i].ID.split('_')[2]).username} -- ${resp[i].data} messages`;
        }

        message.channel.send(finalOutput)
    })
}

module.exports.help = {
    names: ["leaderboard", "lb", "l-b"]
}
#

this just returns

#

Leaderboard:

#

and nothing more

earnest phoenix
#

Maybe because you're not using a for loop correctly?

lusty dew
#

Oh.

#

How do you correctly use one

rustic axle
#

Have fun

earnest phoenix
#

for...in by the way, is for iteration through objects

#

I think you are looking for a different type of for loop

lusty dew
#

Hmm

earnest phoenix
#

What are you trying to do anyway?

sick cloud
#

just map it

lusty dew
#

I am trying to display

#

messages sent in the guild

#

but as a leaderboard

#

So it does 15 members

#

and it displays there user names and the amount of messages they sent

earnest phoenix
#

Hmm

#

What is resp?

lusty dew
#

resp is what all the messages are stored in

earnest phoenix
#

I'll need specifics

#

What is the value of resp

lusty dew
#
 db.startsWith(`guildMessages_${message.guild.id}`, { sort: '.data'}).then(resp=>{


        resp.length = 15;

        var finalOutput = "**Leaderboard:**\n\n";
        for (var i in resp) {
            finalOutput += `${client.users.get(resp[i].ID.split('_')[2]).username} -- ${resp[i].data} messages\n`;
        }
#

Read the code figure it out

earnest phoenix
#

That's not helpful at all, still have no idea what resp is

lusty dew
#

Ok

#

so

#

resp stores all of the guild messages sent

earnest phoenix
#

Lemme try again

#

What is resp?

lusty dew
#

.

earnest phoenix
#

As in what does JavaScript define it as

#

Object, array, bool

lusty dew
#

nothing as I know of

earnest phoenix
#

Can you log it and tell me please?

lusty dew
#

ok

#

[]

#

it is an empty array

#

I need to fix that

#

Wait

#

Yea

#

I don't know why that logs an empty array

earnest phoenix
#

You will have to figure that part out

lusty dew
#

Yea

#

I am

smoky spire
#

Perhaps because quick.db doesn’t have a startsWith function

lusty dew
#

Yea

#

I just saw that

#

It used too

#

I need to do

#

db.set

#

pretty sure

smoky spire
#

Use your brain

lusty dew
#

I am

#

dumbass

smoky spire
#

Then you would know you don’t want set

lusty dew
#

Well sorry

#

I was being slow

#

🖕

#

Ima use .fetch

earnest phoenix
#

how can i get the owners username from scraping?

cedar token
#
  let serverQ = serversQ[msg.guild.id];
   function play(connection, msg){
     serverQ.dispatcher = connection.playStream(YTDL(serverQ.queue[0],{filter: 'audioonly'}));
     serverQ.queue.shift();
     serverQ.dispatcher.on("end", function() {
       if (serverQ.queue[0]) play(connection, msg);
       else connection.disconnect();
     });  };  
sick cloud
#

very clear

#

serverQ.queue[0]

#

thats an object

#

does your queue object have a url or video id or something?

cedar token
#

supposed to be url

earnest phoenix
#

how can i get the owners username from scraping?

sick cloud
#

scraping what?

#

generally you shouldn't scrape

cedar token
#

aye how would mine be fixed, I'm a bit new to object things, pretty different from lua ;-;

sick cloud
#

look

#

an object has keys

earnest phoenix
#

@sick cloud from dbl, for dbl command

sick cloud
#

does your object have a key like .url?

#

uh

#

@earnest phoenix why are you scraping

#

theres an api

earnest phoenix
#

yes api from

sick cloud
#

check it out there

earnest phoenix
#

yes

sick cloud
#

you shouldnt scrape a bots page

cedar token
#

ye so, i think object would be meant probably for this?
let serversQ = {};

#

?

sick cloud
#

i'm not going to help further, you can figure it out on your own

cedar token
#

mk

lusty dew
#

How would I define newChannel?

#

I am making a

#

set channel

#

so it logs when members join and shit

cedar token
#

What you mean

#

So if I member joins the server or?

lusty dew
#

I will show code

#
let newChannel = 
                     db.set(`pmessageChannel_${message.guild.id}`, newChannel).then(i => {
                        message.channel.send(channelEmbed)
cedar token
#

oo

#

idk db

spring ice
#

I need a package of packages for bot development with node.js could anyone tell me?

lusty dew
#

Huh?

#

@spring ice

remote heart
#

@vernal rivet Also ich ahbe einen Command und ich möchte das wenn man dne Ausführt das der bot eine EInladung erstellt und dann in einen Channel sendet Nur ich weis nciht wie das geht.

lusty dew
#

Is there a way I can do like a secret code and if you get that code correct it will send out a message?

#

like

#

!6534

outputs: <secretmessage>

idle mountain
#

Create an array of the codes, then when a message starts with the prefix, check if the command starts with any of the codes in the array

#

there are probably better ways to do that

lusty dew
#

yea

#

I was going to do one code

#

so like

#

var secret = "code"

#

that part is not a problem

#

if that doesn't work

#

then I will do an array

#

the thing I need is how to tell if they used one of the codes

#

Idk how to do that

idle mountain
#

oh do you only want one code?

#

or multiple?

lusty dew
#

Either one

#

i prefer

#

one

idle mountain
#

wait so like how are you triggering commands

lusty dew
#

I want to figure out how to tell

#

if they use the code

#

I can do the rest

#

all i need is the code

#

thingy

idle mountain
#

yeah I'm not familiar with JavaScript but you can do something like this:

var secretCode = "spoopy";

if (msg.content.startsWith("!" + secretCode)) //if the message starts with "!spoopy"
{
    //do some code here
}```
#

you mean like that?

lusty dew
#

Yes

#

except

#

my prefix is

#

mentioning the bot

idle mountain
#

wait do you already have a system in place for handling that?

lusty dew
#

?

idle mountain
#

like do you know how to make a mention the prefix?

lusty dew
#

I already have that set up...

#

It works

#

The bot is far into development

#

it is a remake

#

and I been working on it for a week

idle mountain
#

well just replace the "!" in my example with whatever you're using, then :P

lusty dew
#

or two

#

Okie

#

@idle mountain Oh wait

#

I am using a command handler

idle mountain
#

So how do you input what the syntax is for each command?

#

er like

#

if you wanna add "!test", how do you attach the method to "test"?

#

not sure if that makes any sense it's 2am

lusty dew
#

I am not understanding

#
       if(secret) return message.channel.send(embed)
       if(!secret) return ("Code incorrect")
#

would something like that work?

#

Well

#

I still need a way to detect if they said the secret code

idle mountain
#

currently reading up on how command handlers work in d.js Thonkang

#

How I would do it is add a command that's like, "!secret", and then have the second word be the secret code

#

like "!secret 1234"

#

and that should be fairly straightforward I think

lusty dew
#

Hmmmmmm

#

I could do that

#

ima see if my way is possible though

idle mountain
#

If you did that, and just checked if the command was right or not, then every message starting with ! would trigger "code incorrect" if I'm reading this right

lusty dew
#

if not

#

i will do that

sinful lotus
#

@idle mountain that should be simple.

get the args and compare it

idle mountain
#

mhm

#

im not the one asking the question angeryBOYE

sinful lotus
#

ow

#

@lusty dew

#

there

idle mountain
#

lol

sinful lotus
#

right tag now

lusty dew
#

Lol

#

What going on?

vernal rivet
#

@remote heart ok

#

does anyone know how to make a bot to send an invitation when joining a discord server? kartoffel is wanting to know how to do that

austere meadow
#

is there an easy way to get the total amount of channels the bot is connected to in eris

bright spear
#

Voice or all channels?

austere meadow
#

@bright spear all channels, my deepest apologies for the late reply good sir

wise raptor
#

Need help coding following:

Custom prefix per server
Stats about my bot, eg how many guilds its in and users etc inv links etc
A way for a command to set the value for a command per guild,

pm me pls

violet dagger
#

Oh hey it’s Blake

wise raptor
#

?

spring ember
#

@wise raptor lib?

wise raptor
#

node.js i believe

spring ember
#

Node is not a library

wise raptor
#

what u mean

spring ember
#

D.js?

#

Eris?

neat falcon
spring ember
#

Derpy no bulli

wise raptor
#

im confused, pm me please

neat falcon
#

im not bulli

spring ember
#

No need

neat falcon
#

im thonking

spring ember
#

What discord library do you use

wise raptor
#

discord.js

spring ember
#

Ok thank you

wise raptor
#

that what u mean?

spring ember
#

Do you use a command handling framework?

wise raptor
#

dont think so

spring ember
#

Or do you listen to message event

wise raptor
#

idk

#

im a shit coder tbh

spring ember
#

I need to know how the code is structured

#

Do you have a database set up?

wise raptor
#

No, json for now, but will need to setup sql soon

spring ember
#

You absolutely need

#

First of all set up a database

#

You can use noSQL if you want just not json files

#

Then make some kind of connector to the database

wise raptor
#

would u mind helping me?

spring ember
#

Just ask any questions here

wise raptor
#

idk how to code it

spring ember
#

Then learn

wise raptor
#

thats why im here

earnest phoenix
#

Wth, what are you trying to learn? o.O

wise raptor
#

how to make the commands

earnest phoenix
#

In what language?

wise raptor
#

node

spring ember
earnest phoenix
#

^

earnest phoenix
#

node is not a language ree

quartz kindle
#

node is a shit language

earnest phoenix
#

Node is not a language

quartz kindle
#

therefore, its a shit language

earnest phoenix
#

You can't put adjectives on nothing

spring ember
#

Your point is contradictory

quartz kindle
#

i just did

#

:3

spring ember
#

👀

earnest phoenix
#

That's stupid, though

#

If you're going to describe node, at least refer to it as a runtime

quartz kindle
#

if you havent noticed, mr. smart guy, im memeing

earnest phoenix
#

very obvious. (not)

#

Kinda hard to tell who's being serious and who's not through text

quartz kindle
#

understandable, have a nice day

sick cloud
earnest phoenix
#

hello

#
            if(message.content.includes('discord.gg')){ 
                if(message.member.hasPermission("MANAGE_GUILD")) return;
        if(!message.channel.guild) return;
        message.delete()
          var command = message.content.split(" ")[0];
    let muterole = message.guild.roles.find(`name`, "Muted");
    if(!muterole){
      try{
        muterole = await message.guild.createRole({
          name: "Muted",
          color: "#000000",
          permissions:[]
        })
        message.guild.channels.forEach(async (channel, id) => {
          await channel.overwritePermissions(muterole, {
            SEND_MESSAGES: false,
            ADD_REACTIONS: false
          });
        });
      }catch(e){
        console.log(e.stack);
      }
    }
           if(!message.channel.guild) return message.reply('** This command only for servers**');
     message.member.addRole(muterole);
    const embed500 = new Discord.RichEmbed()
      .setTitle("Muted Ads")
            .addField(`**  You Have Been Muted **` , `**Reason : Sharing Another Discord Link**`)
            .setColor("c91616")
            .setThumbnail(`${message.author.avatarURL}`)
            .setAuthor(message.author.username, message.author.avatarURL)
        .setFooter(`${message.guild.name} `)
     message.channel.send(embed500)
     message.author.send('` انت معاقب ميوت شاتي بسبب نشر سرفرات ان كان عن طريق الخطا **ف** تكلم مع الادارة `');
   
       
    }
})```
#

this code sand DMS

#

this code if one sand link invite tall him you are muted to unmute plz call satff

spring ember
#

Ok

earnest phoenix
#

how ican make him not work on this server

#

i mean how i can delete dms

#

sorry for bad english

spring ember
earnest phoenix
#

?

#

plz into the code

spring ember
#

At the beginning

earnest phoenix
#

Black List

#

Good idea

#

@spring ember

#
    if(message.content.includes('discord.gg')){ 
        if (message.guild.id === '264445053596991498') return;
        if(message.member.hasPermission("MANAGE_GUILD")) return;
if(!message.channel.guild) return;
message.delete()
  var command = message.content.split(" ")[0];
let muterole = message.guild.roles.find(`name`, "Muted");
if(!muterole){
try{
muterole = await message.guild.createRole({
  name: "Muted",
  color: "#000000",
  permissions:[]
})
message.guild.channels.forEach(async (channel, id) => {
  await channel.overwritePermissions(muterole, {
    SEND_MESSAGES: false,
    ADD_REACTIONS: false
  });
});
}catch(e){
console.log(e.stack);
}
}
   if(!message.channel.guild) return message.reply('** This command only for servers**');
message.member.addRole(muterole);
const embed500 = new Discord.RichEmbed()
.setTitle("Muted Ads")
    .addField(`**  You Have Been Muted **` , `**Reason : Sharing Another Discord Link**`)
    .setColor("c91616")
    .setThumbnail(`${message.author.avatarURL}`)
    .setAuthor(message.author.username, message.author.avatarURL)
.setFooter(`${message.guild.name} `)
message.channel.send(embed500)


}
})```
quartz kindle
#

why the extra spaces in the guild id?

#

also, is this the only command the bot has? or you have more commands?

earnest phoenix
#

sorry

#

@quartz kindle now this will work ?

quartz kindle
#

yes, it should work

earnest phoenix
#

earnest phoenix
#

I made a help list reaction works

#

This is good or there is better

#

Looks good to me

#

if you need my code tall me

#

What for? I am good with mine

#

Your looks more compact, mine looks more beautiful

#

In JavaScript, is there a .endsWith() function or whatever it's called?

west raptor
#

yes

earnest phoenix
#

Cheers

lusty dew
#
    if(args[0]  !== '2004') {
        var embed = new Discord.RichEmbed()
        .setTitle("")
        .setDescription(``)
        .setImage("")
        message.channel.send(embed)
#

does anyone know why this is not working?

slender thistle
#

Because there is sorta nothing to sent?

west raptor
#

everything is empty

#

nothing to send

lusty dew
#

I k

#

there are things there

#

just I dont want it to be seen

#

so I removed it to show

marsh lark
#

...

lusty dew
#

@marsh lark have a problem?

marsh lark
#

you lol

west raptor
#

thats not very nice

marsh lark
#

jk was just surprised

slender thistle
#

Well, we don't know what exactly you are doing

#

Soooooooooo

lusty dew
#

Well

west raptor
#

do you receive any error?

lusty dew
#

someone in

#

discord.js offical server

#

said that

#

args[0] !== "password"

#

would work

#

so like you do

#

@quartz dune secret <passwordhere>

slender thistle
#

Should I take a guess what args is even

lusty dew
#

Ok

#

Does anyone know how to make it so they have to have a password to use the command?

#

cause this way is not working

#

oof

#

could I do

#

message.content.includes(${secret})

kind roost
#

hi

earnest phoenix
#

Good morning I would like a little help with a code I have for {server info}

west raptor
#

alright

#

whats the issue?

#

??

earnest phoenix
#

I try to put the photo I took to dig you the code and it does not leave me!

west raptor
#

wut

earnest phoenix
#

this is my code

west raptor
#

code block pls

#

h

earnest phoenix
#

but when I write the command {* server info} the bot does not respond

west raptor
#

well i mean i cant read your code

#

can you put it in a code block?

earnest phoenix
#

`if(command === "serverinfo") {

module.exports.run = async (client, message, args) => {

const verificationLevel = message.guild.verificationLevel;
const verificationLevels = ['None', 'Easy', 'Medium', 'High', 'Extreme']

const embed = new Discord.MessageEmbed()
.setDescriprion(${message.guild.name}'s info)
.setThumbnail(message.guild.iconURL("https://cdn0.iconfinder.com/data/icons/law-crime-and-justice-1/32/detective-crime-criminal-investigate-investigation-suspect-gangster-512.png"))
.setFooter(message.guild.owner.user.tag, message.guild.owner.user.avatarURL("https://cdn0.iconfinder.com/data/icons/law-crime-and-justice-1/32/detective-crime-criminal-investigate-investigation-suspect-gangster-512.png"))
.setTimestamp()
.addField('Server Name', ${message.guild.name}, true)
.addField('Server ID', ${message.guild.id}, true)
.addField('Server Name', ${message.guild.owner.user}, true)
.addField('Owner ID', ${message.guild.owner.id}, true)
.addField('Members', ${message.guild.members.filter(member => member.user.bot).size} bot of ${message.guild.memberCount} members, true)
.addField('Channels', ${message.guild.channels.filter(channel => channel.type === 'voice').size} voice / ${message.guild.channels.filter(channel => channel.type === 'text').size} text, true)
.addField('verification Level', ${message.guild.verificationLevels[message.guild.verificationLevel]}, true)
.addField('Server Region', ${message.guild.region}, true)
.addField('AFK Channel', ${message.guild.afkChannel}, true)
.addField('Created', ${message.guild.createsAt}, true)
.setColor('RANDOM')
message.channel.send(embed)
}
}`

quartz kindle
#

3x `

west raptor
#

^

earnest phoenix
#

I do not know how to put my code in a block

quartz kindle
#

3x `

#

``` code ```

earnest phoenix
#

 module.exports.run = async (client, message, args) => {

   const verificationLevel = message.guild.verificationLevel;
   const verificationLevels = ['None', 'Easy', 'Medium', 'High', 'Extreme']
 
   const embed = new Discord.MessageEmbed()
   .setDescriprion(${message.guild.name}'s info)
   .setThumbnail(message.guild.iconURL("https://cdn0.iconfinder.com/data/icons/law-crime-and-justice-1/32/detective-crime-criminal-investigate-investigation-suspect-gangster-512.png%22))
   .setFooter(message.guild.owner.user.tag, message.guild.owner.user.avatarURL("https://cdn0.iconfinder.com/data/icons/law-crime-and-justice-1/32/detective-crime-criminal-investigate-investigation-suspect-gangster-512.png%22))
   .setTimestamp()
   .addField('Server Name', ${message.guild.name}, true)
   .addField('Server ID', ${message.guild.id}, true)
   .addField('Server Name', ${message.guild.owner.user}, true)
   .addField('Owner ID', ${message.guild.owner.id}, true)
   .addField('Members', ${message.guild.members.filter(member => member.user.bot).size} bot of ${message.guild.memberCount} members, true)
   .addField('Channels', ${message.guild.channels.filter(channel => channel.type === 'voice').size} voice / ${message.guild.channels.filter(channel => channel.type === 'text').size} text, true)
   .addField('verification Level', ${message.guild.verificationLevels[message.guild.verificationLevel]}, true)
   .addField('Server Region', ${message.guild.region}, true)
   .addField('AFK Channel', ${message.guild.afkChannel}, true)
   .addField('Created', ${message.guild.createsAt}, true)
   .setColor('RANDOM')
   message.channel.send(embed)
  }
}```
west raptor
#

iconURL isnt a function neither is avatarURL, only time it would be is if you are using master

earnest phoenix
#

do you want me to send you and my sub bot code?

quartz kindle
#

its setFooter(text,url)

#

url is just "http://etc..." not message.guild.etc..

earnest phoenix
#

to get the url from iconurl & avatarurl

earnest phoenix
#

I removed it but still does not do something

quartz kindle
#

what did you remove?

#

show the new code

earnest phoenix
#

I removed the url

#

why did he change my name??

quartz kindle
#

show the new code so i can see what you changed

#

your name was changed because it starts with © which makes your name appear first in the list ->>>>

earnest phoenix
#

 module.exports.run = async (client, message, args) => {

   const verificationLevel = message.guild.verificationLevel;
   const verificationLevels = ['None', 'Easy', 'Medium', 'High', 'Extreme']
 
   const embed = new Discord.MessageEmbed()
   .setDescriprion(`${message.guild.name}'s info`)
   .setThumbnail(message.guild.iconURL())
   .setFooter(message.guild.owner.user.tag, message.guild.owner.user.avatarURL())
   .setTimestamp()
   .addField('**Server Name**', `${message.guild.name}`, true)
   .addField('**Server ID**', `${message.guild.id}`, true)
   .addField('**Server Name**', `${message.guild.owner.user}`, true)
   .addField('**Owner ID**', `${message.guild.owner.id}`, true)
   .addField('**Members**', `${message.guild.members.filter(member => member.user.bot).size} bot of ${message.guild.memberCount} members`, true)
   .addField('**Channels**', `${message.guild.channels.filter(channel => channel.type === 'voice').size} voice / ${message.guild.channels.filter(channel => channel.type === 'text').size} text`, true)
   .addField('**verification Level**', `${message.guild.verificationLevels[message.guild.verificationLevel]}`, true)
   .addField('**Server Region**', `${message.guild.region}`, true)
   .addField('**AFK Channel**', `${message.guild.afkChannel}`, true)
   .addField('**Created**', `${message.guild.createsAt}`, true)
   .setColor('RANDOM')
   message.channel.send(embed)
  }
}```
west raptor
#

avatarURL and iconURL are not functions

lusty dew
#

Question

#

How would I make a image from

#

imgur

#

be sent out in an embed

#

with the link for that image

earnest phoenix
#

to remove these two?

west raptor
#

no

#

just take out the ()

topaz fjord
lusty dew
#

I know how to do

#

.setImage

#

but

#

the image just comes up

#

like it failed to load

#

so it has something to do with the imgur link

topaz fjord
#

does the image exist

lusty dew
#

Yes

#

I just uploaded it

#

and got the link

#

.

#

if it didnt I wouldn't have the link

quartz kindle
#

whats the link

earnest phoenix
#

@west raptor what exactly do I have to do with () ??

quartz kindle
#

nothing

#

remove them

west raptor
#

^

quartz kindle
#

() means its a function

#

but they are not functions, they are values

west raptor
#

only in master its a function

quartz kindle
#

just like .id and .username

lusty dew
#

Umm

#

I don't want to share the link

#

well

#

at least

#

it is this

quartz kindle
#

is it the full image url ending with .jpg?

#

it has to be a direct url to the image

lusty dew
#

It is

#

I just removed the part that will take you to it

#

cause

#

the image is something I don't want anyone but one person to see

quartz kindle
#

/a/ is usually an album link, not an image

lusty dew
#

OHH

#

damnit

#

ok

quartz kindle
#

it has to be the direct url

lusty dew
#

Ah

#

ok

quartz kindle
#

ending with .jpg or .png

lusty dew
#

I there a way

#

i can like

#

I have the image in my folder

quartz kindle
#

yes

lusty dew
#

is there a way I can do it without using imgur

#

sorry

#

laggg

quartz kindle
#

yes

lusty dew
#

ok

#

cause

#

I dont really want to share the image on internet either

#

so can I like do

quartz kindle
#

you have to read the image from disk into a buffer

#

and use discord attachment

lusty dew
#

..?

#

Ok

#

I will try

quartz kindle
#

use node's fs.readFile

lusty dew
#

Ermmmmmm

#

To read the image?

quartz kindle
#

yes

lusty dew
#

I will try

viral iris
#

help pls

quartz kindle
#

servers the bot is in?

viral iris
#

my server

#

server support

quartz kindle
#

what did you write?

viral iris
#

this

west raptor
quartz kindle
#

this is support server

#

this is other servers

lusty dew
#
fs.readFile("ha.png", (err, file) => {
    if(err) console.log(err)
})
#

like this?

knotty steeple
viral iris
#

i do it

quartz kindle
#

also @viral iris , delete your server invite, because posting invites is against the rules

viral iris
#

done

lusty dew
#

Tim

#
fs.readFile("ha.png", (err, file) => {
    if(err) console.log(err)
})
quartz kindle
#

yes

knotty steeple
#

can someone help me

earnest phoenix
quartz kindle
#

now try js msg.channel.send({"files":[new discord.Attachment(file, "filename.png")]})

#

wdym remove the white line @knotty steeple ?

#

in photoshop or what

knotty steeple
#

with css

#

its on the bot page

quartz kindle
#

you want to edit an image with css?

knotty steeple
#

its not the image

quartz kindle
#

@earnest phoenix you didnt change anything

#

@knotty steeple where is that image? can i access it?

lusty dew
#

Ok

#

thank you

#

Wait

#

Question

quartz kindle
#

i mean, in the page/website

lusty dew
#

I am using

#

an embed

earnest phoenix
#

@quartz kindle 1 min

quartz kindle
#

so i can see it with css, to understand what you want

lusty dew
#

Tim

#

I am using an embed

#

I want the image in the embed

knotty steeple
#

what

#

oh i needed box shadow to be none GWqlabsThinkPlant

earnest phoenix
#

@quartz kindle
view your messages

quartz kindle
#

@lusty dew embed.attachFile(file) embed.setImage("attachment://name.jpg")

lusty dew
#

Ok

#

Thank you

quartz kindle
#

or .attachFile(new discord.Attachment(file, "filename.png"))

#

whichever works

lusty dew
#

Ok

#

Also

knotty steeple
#

embed.setImage("link")

quartz kindle
#

@earnest phoenix again, you didnt change anything. we told you to remove () and you didnt

earnest phoenix
#

@quartz kindle now?

quartz kindle
west raptor
#

^

#

beat me to it

quartz kindle
#

lmao

lusty dew
#
C:\Users\User\Desktop\LoverBot v3\commands\secret.js:13
        embed.setImage(attachment: ha.png)
                       ^^^^^^^^^^

SyntaxError: missing ) after argument list
    at new Script (vm.js:74:7)
    at createScript (vm.js:246:10)
    at Object.runInThisContext (vm.js:298:10)
    at Module._compile (internal/modules/cjs/loader.js:670:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
'bot.guild.size' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
earnest phoenix
west raptor
#

it looks good

#

test it

knotty steeple
#

i already said what to do @lusty dew

lusty dew
#

link?

#

What link

quartz kindle
#

embed.setImage("attachment://name.jpg")

knotty steeple
#

what you think

#

uh

#

the

lusty dew
#

Idk

knotty steeple
#

image link

lusty dew
#

I don't have it anymore

#

cause it didn't work

earnest phoenix
#

Nothing happened

west raptor
#

any errors?

earnest phoenix
#

there is no error

lusty dew
#
    at Object.module.exports.run (C:\Users\User\Desktop\LoverBot v3\commands\sec
ret.js:12:25)
    at Client.client.on (C:\Users\User\Desktop\LoverBot v3\index.js:71:31)
    at Client.emit (events.js:187:15)
    at MessageCreateHandler.handle (C:\Users\User\Desktop\LoverBot v3\node_modul
es\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\User\Desktop\LoverBot v3\node_modu
les\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\User\Desktop\LoverBot v3\node_modules\ws\li
b\event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (C:\Users\User\Desktop\LoverBot v3\node_modu
les\ws\lib\websocket.js:137:47)
#

I don't understand

topaz fjord
#

show code

lusty dew
#

I have discord defined

topaz fjord
#

need more context

quartz kindle
#

under what name?

lusty dew
#

Oh wait

#

I don't have it as

#

discord

#

I have it as

#

Discord

topaz fjord
#

rip

quartz kindle
#

then Discord.attachment

earnest phoenix
#

wit guys he speak arabic

lusty dew
#

?

#

What

earnest phoenix
#

you don't speak arabic ?

lusty dew
#

No

#

Who told you this

earnest phoenix
#

ok

lusty dew
#

Wth

quartz kindle
lusty dew
#

Lol

#

I don't speak arabic

#

Also

earnest phoenix
#

xD

lusty dew
#

File is undefined

earnest phoenix
#

google

#

xD

lusty dew
#

@quartz kindle

quartz kindle
#

which file

lusty dew
#
fs.readFile("ha.png", (err, file) => {
    if(err) console.log(err)
})
#

file on that

#

is greyed out

quartz kindle
#

show full code

lusty dew
#

That is

#

full code

#

lmfao

quartz kindle
#

readFile is async

lusty dew
#

full code of reading it

quartz kindle
#

meaning either use async await function

#

or you have to put the entire embed code

#

inside the readfile(=>{//code})

lusty dew
#

OOF

#

ok

#

Um

#

no

#

Can you help me

#

?

quartz kindle
#

show full code

#

or use readFileSync

#

but readFileSync is blocking, meaning while the file is being loaded, the bot will freeze until it finishes

lusty dew
#

Ok

#

Oh

quartz kindle
#

although it usually takes like 1 ms

lusty dew
#

Ok

quartz kindle
#

so you wont feel it pretty much

lusty dew
#

But still

#

file is still greyed out

quartz kindle
#

what do you mean grayed out

lusty dew
#

Like

#

err is blue

#

cause it was used

quartz kindle
#

that doesnt mean anything. its just your editor trying to guess what is it

topaz fjord
#

its grayed out since u didnt use it?

marsh lark
#

editors have themes, thats why they are different colours

lusty dew
#

OH

#

Ok

#

Well

#

file is still undefined

quartz kindle
#

again, show full code

lusty dew
#
ReferenceError: file is not defined
    at Object.module.exports.run (C:\Users\User\Desktop\LoverBot v3\commands\sec
ret.js:12:44)
    at Client.client.on (C:\Users\User\Desktop\LoverBot v3\index.js:71:31)
    at Client.emit (events.js:187:15)
    at MessageCreateHandler.handle (C:\Users\User\Desktop\LoverBot v3\node_modul
es\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\User\Desktop\LoverBot v3\node_modu
les\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\User\Desktop\LoverBot v3\node_modules\ws\li
b\event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (C:\Users\User\Desktop\LoverBot v3\node_modu
les\ws\lib\websocket.js:137:47)
marsh lark
#

i havent used fs to read a png so cant help

lusty dew
#
const Discord = require("discord.js")

module.exports.run = async (client, message, args, ops) => {

    var secret= "284956042851516416"
   
    if(message.content.includes("2004")){
    if(!message.content.includes("2004")) return message.reply("Sorry code incorrect")
        var embed = new Discord.RichEmbed()
        .setTitle("Secret")
        .setDescription(`${Secret}`)
        .attachFile(new Discord.Attachment(file, "ha.png"))
        .setImage("attachment://ha.jpg")
        message.channel.send(embed)
        
}
}

module.exports.help = {
    names: ["secret"]
}
marsh lark
#

you sending from local storage?

quartz kindle
#

where is the fs.readfile?

lusty dew
#

in my index.js

marsh lark
#

i think he has it in index?

topaz fjord
#

it has to be in the command file to use file

lusty dew
#

yepo

#

Oh

#

ok

#

fuckkkk

#

I am dumb

quartz kindle
#

are you loading the image globally?

#

its a good think actually

#

load the image once, and have it saved in a variable

#

but then you need to pass it along with your commands

#

you can probably add it to an unused client property

#

but then if you're doing it on load, then better use readFileSync

topaz fjord
#

^

quartz kindle
#

client.secretimage = fs.readFileSync("file.png") //index.js

#

new Discord.attachment(client.secretimage,"name.png")

lusty dew
#

Oh

#

Ok

#

So I have to put

#

client.secretimage = readFileSync("file.png")

#

in index.js

quartz kindle
#

yes, preferably right after client and fs are defined

#

also, its fs.readFileSync()

#

my mistake

lusty dew
#

?

#

Oh

#

Ok

quartz kindle
#

also, according to discord.js docs (stable v11)

#

you can actually do it without new attachment

lusty dew
#
TypeError: Discord.attachment is not a constructor
    at Object.module.exports.run (C:\Users\User\Desktop\LoverBot v3\commands\sec
ret.js:14:21)
    at Client.client.on (C:\Users\User\Desktop\LoverBot v3\index.js:69:31)
    at Client.emit (events.js:187:15)
    at MessageCreateHandler.handle (C:\Users\User\Desktop\LoverBot v3\node_modul
es\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\User\Desktop\LoverBot v3\node_modu
les\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\User\Desktop\LoverBot v3\node_modules\ws\li
b\event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (C:\Users\User\Desktop\LoverBot v3\node_modu
les\ws\lib\websocket.js:137:47)
#

cause

#

it is Discord.Attachment

topaz fjord
#

ok

quartz kindle
#

if im reading the docs correctly you can do embed.attachFile({"attachment":client.secretimage,"name":"filename.jpg"}); embed.setImage("attachment://filename.jpg")

lusty dew
#

Ok

#

got it

#

what

#

goes where name is?

quartz kindle
#

the name you want the file to be

lusty dew
#

Ok

quartz kindle
#

it appears in the image url and in the name if the person downloads the image

lusty dew
#

Also

#

if someone doesn't input the correct code

#

how can I make it so it sends out

#

a message saying Sorry incorrect code

quartz kindle
#

if(message.includes) {} else {}

lusty dew
#

Oh

#

I thought it was

#

if(!message.content.includes) {}else{}

quartz kindle
#

that is the opposite

#

if(!message.content.includes) { message does not include } else { message includes }

lusty dew
#

ERM

#

Ok

#

Ima just stick with what I got

#

xD

#

My brain

quartz kindle
#

the ! makes it the opposite

lusty dew
#

Oh

#

ok

quartz kindle
#

!true = false
!false = true

#

!!true = true

#

xD

lusty dew
#

Ohhh

#

Ok

#
    if(message.content.includes("")){
        return message.reply("Sorry code incorrect")
        var embed = new Discord.RichEmbed()
        .setTitle("Secret")
        .setDescription(`${Secret}`)
        .attachFile({"attachment":client.secretimage,"ha":"ha.jpg"})
        .setImage("attachment://ha.jpg")
        message.channel.send(embed)
        
}
#

so like that?

quartz kindle
#

that will make it always say "sorry code incorrect"

lusty dew
#

Oh

#

.

#

Welp

#

Hmmm

quartz kindle
#

also, be aware that .includes means the person can write it anywhere in the message

#

like !command ouoqwbvoq qowe owe owie wienoviwev secretcode ieygibgowbowiegp

#

and it will work

lusty dew
#

Oh

#

damn

#

I don't want that

#

~<

#

I forgot includes did that

#

could I do

#

message.content("secret")

#

or no

knotty steeple
#

content isnt a function

quartz kindle
#

use the args that you already have

lusty dew
#

It is fine

#

I got it

earnest phoenix
#

May I just add, try to avoid fs.readFileSync and other synchronous methods

lusty dew
#

It doesn't matter

#

as soon as the person uses the command that I made it for

#

I am deleting it

earnest phoenix
#

What do you mean, it doesn't matter

lusty dew
#

Means

#

I dont care

#

that is what it means

earnest phoenix
#

It almost always matters in nodejs

#

Then don't say it doesn't matter lol

lusty dew
#

Ok

#

Whatever

earnest phoenix
#

Just say you don't care

lusty dew
#

fuck off

#

I am not in the mood

earnest phoenix
#

Just trying to give you some advice...

lusty dew
#

Thank you

#

but rn

#

not in the mood

quartz kindle
#

you can use the sync method in this case, as its loading the file only once and then keeping it in memory

#

using async here wont give you any advantage, other than maybe a millisecond faster startup

earnest phoenix
#

In general however, you want to avoid blocking methods

#

It's not a good practice

quartz kindle
#

i'd say understanding when and why to use which method is more important

wheat apex
#

I know that not many people includ this in their bots howewver i found a random pig API which took for ever to find lol its https://www.pigrandom.xyz/ lol just thought id share it :p

bright spear
quartz kindle
#

random pig api? lmao

#

its randompig.zyx

#

lmfao

earnest phoenix
#

meme

#

bois how to stop a client.on in js?

west raptor
#

http://prntscr.com/ks59dd py I am online and ready, logged in as 451347311637823498 Ignoring exception in on_ready Traceback (most recent call last): File "C:\Program Files (x86)\Python36-32\lib\site-packages\discord\client.py", line 221, in _run_event await coro(*args, **kwargs) File "AnimeNameHere.py", line 15, in on_ready bot.load_extension(cog) File "C:\Program Files (x86)\Python36-32\lib\site-packages\discord\ext\commands\bot.py", line 698, in load_extension raise discord.ClientException('extension does not have a setup function') discord.errors.ClientException: extension does not have a setup function

Lightshot

Captured with Lightshot

lusty dew
#

Damn

#

There are api's for everything huh

#

xD

#

Pigs, cats, dogs

#

is there horses 0-0

west raptor
#

probably

lusty dew
#

omg

#

I need

#

to

#

find

#

OUT

quartz kindle
#

@earnest phoenix there is client.destroy()

#

.destroy()
Logs out, terminates the connection to Discord, and destroys the client.

earnest phoenix
#

well I meant

#

like

#

it starts a client.on("message" thing and then if a thing is true it stops listening

#

obvs ik there's other ways to do it but yeye

vernal rivet
#

are you saying to make an event to make the bot to stop listening if x happens?

earnest phoenix
#

kinda

vernal rivet
#

so what is it that your trying to do? i wasn't here when you saying that

earnest phoenix
#

well

#

just a thing

#

but nvm ik a probably better way

vernal rivet
#

ok

west raptor
#

h

vernal rivet
#

@remote heart Hast du es Kartoffel herausgefunden?

west raptor
#

http://prntscr.com/ks59dd py I am online and ready, logged in as 451347311637823498 Ignoring exception in on_ready Traceback (most recent call last): File "C:\Program Files (x86)\Python36-32\lib\site-packages\discord\client.py", line 221, in _run_event await coro(*args, **kwargs) File "AnimeNameHere.py", line 15, in on_ready bot.load_extension(cog) File "C:\Program Files (x86)\Python36-32\lib\site-packages\discord\ext\commands\bot.py", line 698, in load_extension raise discord.ClientException('extension does not have a setup function') discord.errors.ClientException: extension does not have a setup function

Lightshot

Captured with Lightshot

topaz fjord
#

isnt .removeListener a thing in node.js

west raptor
#

can anyone help with this

topaz fjord
#

@quartz kindle ?

vernal rivet
#

that looks like py

west raptor
#

ye

#

it is

vernal rivet
#

oh ok, i can't help you, i use discord.js

west raptor
#

oof

topaz fjord
#

so afaik u can do client.removeListener or import emitter yourself and use it like that

quartz kindle
#

yeah, it should be client.removeListener('message', callback);

topaz fjord
#

although i dont see a point for it

#

why would u want to remove the message event

limber hawk
#

look's like they managed to break my bot 2 time while trying it with this :S

earnest phoenix
#

lul

#

Yes I highly doubt that you want to remove the message listener.

lusty dew
#

can someoen explain

#

OOF

#

wrong channel

#

Ok

#

Well umm

#

I need help

#

I keep getting pictures of dogs

#

even though the url is for horses

#

Oh wait

#

nvm

#

I missed part of the code

earnest phoenix
#

lol

#

@west raptor you didnt import asyncio lol

#

and if it doesnt load that cog again make an __init__.py file

#

and do not put nothing in that file, it will be deleted after startup

knotty steeple
#

you dont need to import asyncio

#

what

earnest phoenix
#

the fuck you do

knotty steeple
#

ok then

west raptor
#

i fixed the issue anyways

#

¯_(ツ)_/¯

knotty steeple
#

i dont anywhere

#

but

#

ok then

west raptor
#

neither do i

hearty tulip
#
dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})```
do i put this in the discord js ready function
or outside of it
lusty dew
#
@Neko Ali, Oh no, an error occurred: query is not defined. Try again later!
#

That is the error I got

#
.query({ 'filter[text]': query });
    const body = JSON.parse(text);
    if (!body.data.length) return message.reply('Could not find any results.');
    const data = body.data[0].attributes;
    const embed = new MessageEmbed()
        .setColor(0xF75239)
        .setAuthor('Kitsu.io', 'https://i.imgur.com/lVqooyd.png', 'https://kitsu.io/explore/anime')
        .setURL(`https://kitsu.io/anime/${data.slug}`)
        .setThumbnail(data.posterImage ? data.posterImage.original : null)
        .setTitle(data.canonicalTitle)
        .setDescription(shorten(data.synopsis))
        .addField('❯ Type', `${data.showType} - ${data.status}`, true)
        .addField('❯ Episodes', data.episodeCount || '???', true)
        .addField('❯ Start Date', data.startDate ? new Date(data.startDate).toDateString() : '???', true)
        .addField('❯ End Date', data.endDate ? new Date(data.endDate).toDateString() : '???', true);
#

this is the code

humble hawk
#

Did somebody got an snippet for a vote webhook in python?

rustic axle
#

I just lost like 20 braincells reading these messages from like 12:00 today

#

What is english

earnest phoenix
#

guys can i add a field without title to my embed?

#

i mean
.addField("", "bla bla bla bla", true)

bright spear
#

set the title to an invisible character

earnest phoenix
#

how

bright spear
#

just put an invisible character there...

earnest phoenix
#

ok

west raptor
#

­

#

here you go

earnest phoenix
#

­­­­
let me try

west raptor
#

idk, i got it off twitter

prime cliff
#

Its just a dot

#

¯_(ツ)_/¯

earnest phoenix
#

i copy it from your message

bright spear
#

@earnest phoenix some code editors show invisible characters as dots

#

it doesnt actually look like a dot

earnest phoenix
#

oh

#

thanks

bright spear
#

yw

lusty dew
#
.query({ name: card })

How could I define card?

prime cliff
#

You mean css for DBL? or a database query?

#

Context needed

lusty dew
#

It is not for DBL

#

Oh shoot

#

the website

#

is down

#

Lol

#

Nvm

prime cliff
#

The website isnt down wait what?

lusty dew
#

Lol

#

I just went to it

#

site can't be reached

lusty dew
#

I am getting this

#

but

#

there is more to it then that

#

but I can't see it

earnest phoenix
#

k but what is it

lusty dew
#

Info

#

from Kitsu anime

#

Attack on Titan Season 3

#

I am trying to make a Kitsu command

rustic axle
#

Is it stupid that I made a bot that just posts updates and rules... mmLol

west raptor
#

wdym?

rustic axle
#

you do pm:compose [msg]

#

and it @-everyone's

#

it could be used for updates and rules

#

its pointless I think

#

but how should I know

lusty dew
#

Lol

#

I hope to make a Discord.js bot

#

one day

earnest phoenix
#

Always good to learn the fundamentals before doing a discord bot

lusty dew
#

I already made a dsicord bot

#

@molten prairie

earnest phoenix
#

That's very contradictory then? GMthonk

lusty dew
#

I said

#

Discord.js

#

A bot about Discord.js

#

not just discord

earnest phoenix
#

Is there a difference?

lusty dew
#

Yes

#

Discord.js

#

is a coding library

earnest phoenix
#

Discord JS in just a library for Discord

lusty dew
#

Discord is the app/website you use

#

Ok

earnest phoenix
#

Essentially you're making a bot for Discord

lusty dew
#

Ik

#

Ok

#

But

#

Just fuck off

#

like for real

topaz fjord
#

lmao

earnest phoenix
#

Always good to elaborate when you talk

topaz fjord
#

why r u taking it so personally

lusty dew
#

Cause

#

I am not in the mood right now

#

a lot of shit is going on in my life

#

and it gets to me after a while

earnest phoenix
#

I mean, I can understand that to an extent

idle mountain
#

there's no point in taking it out here, if you're not going to be patient and kind then don't chat in a development channel

earnest phoenix
#

But, saying something incorrect and using that as an excuse, that's kind of sketchy

lusty dew
#

?

#

Incorrect

rustic axle
#

how about both of you just go on your own fucking ways alright kiddos?

lusty dew
#

What was incorrect

earnest phoenix
#

I'm not talking about right now per se

#

Referring to earlier when you were talking about node as a library

lusty dew
#

Discord.js is a library

#

.

earnest phoenix
#

I'm not saying it isn't

rustic axle
#

omfg

#

stop your fucking circular arguments

earnest phoenix
#

Uhm, hi

#

I'm not trying to argue

rustic axle
#

well guess what both of you are arguing now just leave the situation alone

earnest phoenix
#

Do you even know what's going on?

sick cloud
#

how do you deny permissions to a channel for @everyone in d.js v12?

#

i got this:

                const ticket = await msg.guild.channels.create(`ticket-${msg.author.username}`,
                { type: 'text', topic: `New ticket opened by ${msg.author.tag}.`, overwrites: [
                    { id: r1.id, allowed: ['SEND_MESSAGES', 'READ_MESSAGES'] },
                    { id: r2.id, allowed: ['SEND_MESSAGES', 'READ_MESSAGES'] },
                    { id: msg.author.id, allowed: ['SEND_MESSAGES', 'READ_MESSAGES'] },
                    { id: msg.guild.id, denied: ['SEND_MESSAGES', 'READ_MESSAGES'] }
                ]});
steel drum
#

cant really test the effect of this by maybe try something alogn the lines of msg.guild.roles.get('name', 'everyone').id;

#

as the id

bright spear
#

the name is @everyone

steel drum
#

are you sure

#

whenever you tag someone

#

discord automatically adds a @ in the beginnign

#

for example

#

@steel drum

#

same w roles

earnest phoenix
#

what is this irro

#

error

sick cloud
#

but thatll just give me the guild id @steel drum

#

aka pointless code

#

@earnest phoenix ytdl and stuff is all broke now

earnest phoenix
#

oh, so that error i cant fix

#

right?

toxic oracle
#

is it possible to embed links in richembed descriptions

sick cloud
#

yes

#

you cant fix it

obtuse wind
#

.-.

earnest phoenix
#

well

#

i feel like i'm lying tho

sick cloud
#

its an unfixable bug tho

earnest phoenix
#

but its not a bug

sick cloud
#

its yt

earnest phoenix
#

ik

loud salmon
#

👌

earnest phoenix
#

How g

#

help me

#

@earnest phoenix

#

fork whatever u need on github, then modify it