#development

1 messages · Page 1147 of 1

woven sundial
#

I tried but it didnt work tho

pallid igloo
#

No async await?

golden condor
#

have you tried a different package?

#

such as axios

#

request is deprecated anyway iirc

pallid igloo
#

Try node fetch

woven sundial
#

nope, uptime robot api docs use request

golden condor
#

Yeah but you can still use a different one

pallid igloo
#

I have a big list of fetching packages

#

Axios, node-fetch, https, http. and many more.

#

I use alot of them, axios is my main.

restive furnace
pure lion
#

How can I check if a bot invite link is valid?

pallid igloo
#

Nah, I use these only.

golden condor
#
exports.run = (client, message, args) => {
  var Discord = require("discord.js");

  var axios = require("axios");
  var form = {api_key: 'MY-API-KEY', format: 'json', logs: '1'}
  var headers = {'cache-control': 'no-cache',
       'content-type': 'application/x-www-form-urlencoded'}
            
  const req = await axios.post(options.url, form, headers)
  console.log(req.data)
};```
#

How can I check if a bot invite link is valid?
@pure lion split it, find the client id, find if that is valid, and if it is, see if it is a bot

pallid igloo
#

How can I check if a bot invite link is valid?
@pure lion Try slicing into the string to first find scope=bot, and find if a bot in the client's list is a match to the client_id from the link.

golden condor
#

I can think of a way of doing it in eris

weak rain
#
Require stack:
- E:\Thunder\server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (E:\Thunder\server.js:10:12)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {        
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'E:\\Thunder\\server.js' ]
}
pure lion
#

Oh alright

golden condor
#

npm i quick.db

pallid igloo
#

npm i quick.db@latest

weak rain
#

doesnt work @golden condor

earnest phoenix
#

you can't unless you scrape the website with a driver like selenium, chances are cloudflare is going to stop you

golden condor
#

in your console

earnest phoenix
#

keep in mind that a valid id does not make a valid invite link

golden condor
#

you might need windows build tools

weak rain
#

it says cannnot find Python

golden condor
#

npm i -g windows-build-tools

pallid igloo
#

xD

golden condor
#

you need py then

pure lion
#

Also is there a variation of the this keyword in a mongoose schema?

weak rain
#

but its a JS code

pallid igloo
#

I have no idea, I dont use schema alot.

golden condor
#

nodejs needs py.

earnest phoenix
#

what program should i use for making bot online?

pallid igloo
#

@earnest phoenix You need to buy a host.

pure lion
#

me

pallid igloo
#

they're cheap as 20 cents/month to as expensive as 1000 usd/month

earnest phoenix
#

how do i buy a host?

pure lion
#

i cost £1 a month x)

earnest phoenix
left kernel
#

The "Servers this bot is in" section is formatted incorrectly. ?

#

?

pallid igloo
#

where?

earnest phoenix
#

that's i have to do manual?

#

yes

left kernel
#

What should i write

golden condor
#

@pure lion if you extend it, you can use this

earnest phoenix
#

you need to have programming knowledge to make a bot

pallid igloo
#

You need to
A. Code it
B. buy a host for it

earnest phoenix
#

but code can without host?

pallid igloo
#

Yes

earnest phoenix
#

yes

pure lion
#

@golden condor wdym?

pallid igloo
#

But it wont be online 24/7 anyways from that.

earnest phoenix
#

ooh

#

and host are not from program im right?

#

correct

pure lion
#
const BotSchema = new mongoose.Schema(
    {
        botID: {
            type: String,
            index: true, 
            unique: true
        },
        botUsername: {
            type: String
        },
        owners: {
            type: Array
        },
        verified: {
            type: Boolean,
            default: false
        },
        certified: {
            type: Boolean,
            default: false
        },
        date: {
            type: Object,
            default: {
                timestamp: new Date().getTime(),
                date: new Date()
            }
        },
        inviteLink: {
            type: String,
            default: this.botID
        }
    }
);
```example of my schema
pallid igloo
#

I wish ?bin existed here

pure lion
#

it does

paper cliff
#

what is ?bin

pure lion
#

aa!bin

earnest phoenix
#

hosts are just machines, virtual pcs

#

ooh

pure lion
#

it works on .txt files and messages

pallid igloo
#

A discord.js official tag

paper cliff
#

Not always virtual pcs but yes

earnest phoenix
#

i understand

pallid igloo
#

Which says, That you have to use a virtual bin like hastb.in to post long code snippets.

paper cliff
#

I mean, you can even host your bot on your phone nowadays lol

#

phone squad

pallid igloo
#

xD

pure lion
#

Eugh

glad heart
#

well discord.js isnt really opening

earnest phoenix
#

arm

#

yuck

pallid igloo
#

well discord.js isnt really opening
@glad heart Wdym "opening"?

earnest phoenix
#

@earnest phoenix im lost

weak rain
#

you might need windows build tools
@golden condor what to do then

pure lion
#

Btw if you're interested in testing my bot list DM me

weak rain
#

how to use build tools

glad heart
#

@pallid igloo crashes whenever I try to host

pallid igloo
#

Host or test?

glad heart
#

I may leave bot developinh soon

#

both

earnest phoenix
#

ok

pallid igloo
#

Bruh, Don't use batch or sh files for testing.

paper cliff
#

what

glad heart
#

ikr

#

it's been an hour

pallid igloo
#

well discord.js isnt really opening
Friday#7005 What the heck is this supposed to mean, Can anybody understand this except for the dude who posted it?

paper cliff
#

@pallid igloo wdym

glad heart
#

-_-

#

nvm bruh

paper cliff
#

wtf

#

gg on flameshot but uh

pallid igloo
#

xD

golden condor
#

Sorry I didn't mean to do that

pallid igloo
#

Ah, Alright

paper cliff
#

@pallid igloo wdym about sh files for testing?

golden condor
earnest phoenix
golden condor
#

get verified

pallid igloo
#

-verifybot

earnest phoenix
#

from bot right?

manic osprey
#

hello

pallid igloo
#

Crap, Lemme use tags already.

manic osprey
#

How embed link send for invite?

pallid igloo
#

?

earnest phoenix
#

how can i make a bot verified

golden condor
#

wow flameshot lets you upload to imgur?

pallid igloo
#

@earnest phoenix It needs a minimum of 75 non fake servers.

paper cliff
#

flameshot is a really cool tool

golden condor
#

yeah

pallid igloo
#

Fake servers = the ones that you dont own.

golden condor
#

Equivalent of sharex on linux I'd say

glad heart
#

fake servers

paper cliff
#

ShareX is slow

glad heart
#

what does that mean

earnest phoenix
#

@pallid igloo okay then i have to give away my bot invation?

paper cliff
#

and keeps asking you for updates every time

pallid igloo
#

Yeah.

earnest phoenix
#

ooh

paper cliff
#

it's the bloatware version i should say

pallid igloo
#

and hope that you hit 75 servers.

golden condor
#

yeah, it's better

#

They are adding windows support soon

earnest phoenix
#

you'll get messaged by discord when your bot is qualified for verification

paper cliff
#

great

golden condor
paper cliff
#

that means you can already compile it for Windows I guess

#

that's cool

pallid igloo
#

Oof.

#

I'm bored.

quartz kindle
#

unbore yourself

earnest phoenix
#

let bored = true;
if(bored) bored = false;

pallid igloo
#

if(bored = false) new console.error('Cannot turn boredom to false!')

weak rain
#

how to install windows power tool

pallid igloo
#

idk

weak rain
#

-support @weak rain

short siren
#

==*

earnest phoenix
#

Google can help with that

weak rain
#

;-;

pallid igloo
#

True

short siren
#

;_;

pallid igloo
#

I'm gonna go and die.

short siren
#

bye

pallid igloo
#

Not die

weak rain
#

~support @weak rain

pallid igloo
#

I mean be super inactive.

manic osprey
#

People, im ask

short siren
#

ok

manic osprey
#

how send embed invite?

#

This Js coding

pallid igloo
#

Wtf you mean?

#

Embed invite?

manic osprey
#

i mean for script code.

#

yes

#

example

pallid igloo
#

Ahh god, Can you show an example where u saw it?

manic osprey
#

yes

winter basalt
#

im assuming hyperlink

pallid igloo
#

Or masked link.

glad heart
#

client.on(`guildMemberAdd`, member => { const embed = new Discord.MessageEmbed() .setColor(`#ffffff`) .setAuthor(member.user.username) .setDescription(`DobroDosli na **Hi!** server.`) .setTitle(`**Welcome!*`) .setImage(`https://pushalement.pokemon.com) member.guild.channels.cache.get(`720631185688100867`).send(embed); })

#

never sends the attached link of image with the welcome message

pallid igloo
#

Indent it please, I doubt anybody is going to read that by any chance.

glad heart
#

what

#

brb

weak rain
#

create

#

a embed

#

and add ur link their

#

thats easy as fuck

#

like this

pallid igloo
#

Bruh

glad heart
#

what

weak rain
#

client.on(`guildMemberAdd`, member => { const embed = new Discord.MessageEmbed() .setColor(`#ffffff`) .setAuthor(member.user.username) .setDescription(`DobroDosli na **Hi!** server.`) .setTitle(`**Welcome!*`) .setImage(`https://pushalement.pokemon.com) member.guild.channels.cache.get(`720631185688100867`).send(embed); })
@glad heart welcome code nice

glad heart
#

ok

weak rain
#

my message deleted?

glad heart
#

@weak rain yes

weak rain
#

why

glad heart
#

repeated text maybe

earnest phoenix
#

Cuz u should stop being a dick

glad heart
#

bot did it

#

@earnest phoenix sorry

weak rain
#

hm ok

pallid igloo
glad heart
#

wtf

winter basalt
#

invite link prob because you have no role

glad heart
#

wait brb

weak rain
#

hm

glad heart
#

lol I put a wrong link

weak rain
#
const { MessageEmbed } = require("discord.js")

module.exports = {
  name: "invite",
  usage: "Introduction",
  description: "Command Info",
  category: "main",
  run: (client, message, args) => {
  let inviteEmbed = new Discord.MessageEmbed()

    .setColor("RANDOM")
    .setAuthor(" ")
    .setFooter(`Requested by ${message.author.username}`)
    .setDescription(` __**Links**__  
[Click here to Invite the Bot](invite link of bot`);
   message.channel.send(inviteEmbed)
  }
}
#

ok use this

#

no link

#

now

glad heart
#

thanks@weak rain I ama try

weak rain
#

Np

pallid igloo
#

I'm bored.
for (i = 0; i = -1; i++) {
if(FanBoy.exists()) Boredom.Activate();
};

glad heart
#

ok

weak rain
#

@manic osprey here is invite

pallid igloo
#

I think he needed something else.

manic osprey
#

sec

weak rain
#

idk

manic osprey
#

im go test.

weak rain
#

hm

pallid igloo
#

oof.

winter basalt
weak rain
#

for click here links ;-; @winter basalt

glad heart
#

yes

#

basically text
@winter basalt that puts ur link in a blue text

#

sorry if I sound dumb

#

i am only 14

pallid igloo
#

basically text
Jly#0941 The full syntax is
[text](link "hover text")
But hover text can be optional.

#

Phone users have no impact from hover text.

winter basalt
#

they are optional

manic osprey
#

bad embed.

pallid igloo
#

Oh

#

You want masked link?

manic osprey
#

yes

#

invite

pallid igloo
manic osprey
#

example

#

just need.

#

sec

quartz kindle
#

thats not an embed

pallid igloo
manic osprey
#

no

pallid igloo
#

Oh.

#

Just post it.

manic osprey
#

i mean for send invite

pallid igloo
#

message.channel.send(link);

quartz kindle
#

discord does that automatically if you post a discord.gg server invite link

manic osprey
#

no

pallid igloo
manic osprey
#

@quartz kindle i mean for long time invite

quartz kindle
#

same thing

pallid igloo
#

ah god, Just create an infinity invite and simply post it in the channel.

manic osprey
#

i mean for example

#

send embed with bot

#

special tag

#

bot take send embeds

#

example !invite , and bot speak to send url

#

for invite

quartz kindle
#

you literally just send the link

manic osprey
#

sec

quartz kindle
#

discord does the join server embed automatically

winter basalt
pallid igloo
#

invlink = '';
m = [Message Object]
if(m.content = '!invite') {
m.channel.send(invlink);
};

manic osprey
#

the bot does need send.

pallid igloo
#

As easy as that.

#

Ah right.

golden condor
#

yeah people with no roles aren't allowed to send invites because a lot of the time, they just send ads.

manic osprey
#

I understand, im from to bot and channel

#

for own

#

cant ads

earnest phoenix
#

How much time they take for the approval of the bot (ping me with answer pls)

winter basalt
#

3+ weeks

pine aspen
#

Hey, how could I increase response times with lavalink?
\

earnest phoenix
#

Wow

pine aspen
#

rn it's taking roughly 2-10 seconds to find 1 song.

delicate shore
#

alr so

#

oh

pallid igloo
#

v11?

delicate shore
#

wait

earnest phoenix
#

I need help

#

I have this prefix script

#

And it’s not working

#

Idk why

#

Dm if u can help

golden condor
#

@pine aspen the speed of lavalink will be to do with your internet speeds and how long it takes to load youtube as it scrapes youtube's site

pallid igloo
#

Buy a better host.

earnest phoenix
#

...

winter basalt
#

@earnest phoenix you didnt provide anything. we need to atleast know the code you wrote to help

pallid igloo
#

I found a dude that had been getting 12k ms ping localhost.

#

I felt bad for him.

quartz kindle
#

wtf

earnest phoenix
#

@earnest phoenix you didnt provide anything. we need to atleast know the code you wrote to help
@winter basalt that’s why DM I said

#

And it’s JavaScript

quartz kindle
#

post the code here

pallid igloo
earnest phoenix
#

K 1 sec

quartz kindle
#

most people dont help in dms

#

unless they're getting paid

earnest phoenix
#

const fs = require('fs');
exports.run = async (client, message,args) => {
text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(Bot's Prefix is changed to ${text})
fs.writeFile('./jsons/ayarlar.json'
, JSON.stringify(ayarlar), err =>
{
if (err) console.log(err);

});
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['prefix'],
permLevel: 4
};
exports.help = {
name: 'prefix', usage: 'prefix'
};

quartz kindle
#

code blocks please

earnest phoenix
#

unless they're getting paid
@quartz kindle ppl are greedy for money lol

quartz kindle
#

people need to make a living

earnest phoenix
#

code blocks please
@quartz kindle ?

quartz kindle
#

```js
code here
```

slender thistle
#

Making advanced bots is... not something people wish to do for free. It costs nerves, time, and effort

earnest phoenix
#

Kk

#

```js
const fs = require('fs');
exports.run = async (client, message,args) => {
text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(Bot's Prefix is changed to ${text})
fs.writeFile('./jsons/ayarlar.json'
, JSON.stringify(ayarlar), err =>
{
if (err) console.log(err);

});
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['prefix'],
permLevel: 4
};
exports.help = {
name: 'prefix', usage: 'prefix'
};
```

forest prairie
#

good job

earnest phoenix
#

Oof

#

Ikr

forest prairie
#

you just

#

the three `

#

then js

#
const wolrus = wolrus
earnest phoenix
#

Wait do

#

So

#

```js
code here
```

#

Like that

forest prairie
#

yes

earnest phoenix
#

```js code here
```

#

Oops

#

```js

const fs = require('fs');
exports.run = async (client, message,args) => {
text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(Bot's Prefix is changed to ${text})
fs.writeFile('./jsons/ayarlar.json'
, JSON.stringify(ayarlar), err =>
{
if (err) console.log(err);

});
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['prefix'],
permLevel: 4
};
exports.help = {
name: 'prefix', usage: 'prefix'
};

```

#

See

quartz kindle
#

wtf

earnest phoenix
#

Idk why

quartz kindle
#
code here
earnest phoenix
#

Hmm

#

I think ik

flat pelican
#

it's because you have ` inside your code

earnest phoenix
#

Ah

#

Umm

#

Wut do I do then?

forest prairie
#
const wolrus = `mmm yes`
earnest phoenix
#

Oof

forest prairie
#

it works for me

earnest phoenix
#

js aaa

#
exports.run =  async (client, message,args) => {
  text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(`Bot's Prefix is 
  changed to ${text}`)
  fs.writeFile('./jsons/ayarlar.json'
    , JSON.stringify(ayarlar), err => 
    {
    if (err) console.log(err);

   });
};
  exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ['prefix'],
  permLevel: 4
};
exports.help = {
  name: 'prefix', usage: 'prefix'
}; ```
forest prairie
#

delete and I send it for you

#

with the js thing

earnest phoenix
#

I delete?

pallid igloo
#

ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
Why are you slicing an array BRUH.

earnest phoenix
#

Don’t ask I started it and my friend ruined it

forest prairie
#

the three ` worked for me

pallid igloo
#

but vru

#

WHY SLICE AN ARRAY?

earnest phoenix
#

LOL he mad

golden condor
#

Why are you slicing an array BRUH.
@pallid igloo you can slice an array

pallid igloo
#

Oh rip me

earnest phoenix
#

Ok can u tell me if it’s wrong?

golden condor
#
const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
const newArray = array.slice(2)
console.log(newArray) //[3, 4, 5, 6, 7, 8, 9, 10]
```^^ How slicing an array works
earnest phoenix
#
exports.run =  async (client, message,args) => {
  text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(`Bot's Prefix is 
  changed to ${text}`)
  fs.writeFile('./jsons/ayarlar.json'
    , JSON.stringify(ayarlar), err => 
    {
    if (err) console.log(err);

   });
};
  exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ['prefix'],
  permLevel: 4
};
exports.help = {
  name: 'prefix', usage: 'prefix'
}; ```
#

So?

golden condor
pallid igloo
#

2

#

I understood that

earnest phoenix
#

Omg thank u for ur help 👌

golden condor
#

just showing that it works

earnest phoenix
#
exports.run =  async (client, message,args) => {
  text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(`Bot's Prefix is 
  changed to ${text}`)
  fs.writeFile('./jsons/ayarlar.json'
    , JSON.stringify(ayarlar), err => 
    {
    if (err) console.log(err);

   });
};
  exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ['prefix'],
  permLevel: 4
};
exports.help = {
  name: 'prefix', usage: 'prefix'
}; ```
#

CAN anyone fix it? If there is any prob?

golden condor
#

where is ayarlar defined

earnest phoenix
#

where is ayarlar defined
@golden condor wdym

flat pelican
#

lol a turkish code

midnight blaze
#

I would like to do something, not sure if it is difficult.
I want like to loop throught a folder with files.
the files are named like this: test1_ger.mp3 or test2_fr.mp3

golden condor
#

@earnest phoenix you are making a new set on every message event, that's why it isn't working

midnight blaze
#

I want to filter fr, ger

#

I wonder if this is difficultt 🤔

golden condor
#

Put it outside the message event

#

I would like to do something, not sure if it is difficult.
I want like to loop throught a folder with files.
the files are named like this: test1_ger.mp3 or test2_fr.mp3
@midnight blaze use fs if you are using node.js

fringe axle
#

One question: how you can set a normal value for quick.db? Like standard value: 0 and you can change it. I only want to know how to set the standard value.

wary flame
#

@earnest phoenix has nothing to do with your problem but use msg.content.toLowerCase().includes() so you don't have to check for every possible capitalisation

golden condor
#

fs is the built in file system, you don't need to install it, just require it

earnest phoenix
#

lol a turkish code
@flat pelican so wut?

pallid igloo
#

fs is the built in file system, you don't need to install it, just require it
@golden condor NpM i Fs : Am I a joke to you?

golden condor
#

send your code

#

I'll show you how to fix it

#

like copy paste the code

midnight blaze
#

in one event you mean

golden condor
#

send the code

earnest phoenix
#
exports.run =  async (client, message,args) => {
  text = message.content.split(' ').slice(1).join(' ')
if (!text) return message.channel.send("Please write new prefix")
ayarlar.prefix = message.content.split(' ').slice(1).join(' ');
message.channel.send(`Bot's Prefix is 
  changed to ${text}`)
  fs.writeFile('./jsons/ayarlar.json'
    , JSON.stringify(ayarlar), err => 
    {
    if (err) console.log(err);

   });
};
  exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ['prefix'],
  permLevel: 4
};
exports.help = {
  name: 'prefix', usage: 'prefix'
}; ```
golden condor
earnest phoenix
#

Fixed
@golden condor that for me or him

golden condor
#

him

earnest phoenix
#

Ya I saw

#

Lol

#

@golden condor can u help me make new code for prefix?

golden condor
#

Not really

honest perch
#

No

#

Read

#

The

#

Docs

earnest phoenix
#

Ah...

honest perch
#

Its a very basic part of discordjs

golden condor
#

I'm busy

#

May I suggest to you to learn javascript

earnest phoenix
#

May I suggest to you to learn javascript
@golden condor don’t have time for that

golden condor
#

Not you

#

You kind of know what you are doing.

restive pebble
#

lmao

#

if u dont have time to learn the basics enjoy then

earnest phoenix
#

Lol

honest perch
#

Callum how do i turn my bot on

delicate shore
#

i am bored i wanna make another bot

#

but i am to lazy to go on and code

golden condor
#

Idk

earnest phoenix
#

if u dont have time to learn the basics enjoy then
@restive pebble I focus on my study and I wasn’t referring to u pls stay out of it

golden condor
#

I don't know how to code

delicate shore
#

nice

golden condor
#

Never coded in my life

#

Ever

restive pebble
#

ok so why coding then

delicate shore
#

me too

restive pebble
#

if u dont want to learn

delicate shore
#

i just clone from github

honest perch
#

Never coded in my life
@golden condor doubt

delicate shore
#

lol

golden condor
#

Ignore the fact that I have a verified badge, it's a glitch

restive pebble
#

sup callum

restive furnace
#

easiest way to learn: explore the language by testing things
harder way to learn: read books and/or ask other ppl for help

earnest phoenix
#

ok so why coding then
@restive pebble Bc I already have a full full script my bro made he isn’t here in country and this is the last thing I’m trying to fix

golden condor
restive pebble
#

allright good luck and i applogize for what i said

restive furnace
#

you documented your own mongoose schema?

#

nice

earnest phoenix
#

No worries

golden condor
delicate shore
#

why tf people use @param and what does that mean

golden condor
#

jsdoc

earnest phoenix
#

For now 5 ppl I asked none where helpful

restive pebble
#

i also have to learn those params things

restive furnace
#

parameter

golden condor
#

it's for classes and functions to tell you what to put in there

restive pebble
#

oh

#

like param => input

golden condor
restive pebble
#

oh

delicate shore
wary flame
#

It's basically types without typescript

restive pebble
#

yes i use ts so no need

golden condor
#

eh

delicate shore
restive pebble
#

i have .d.ts so i dont need that right

wary flame
#

You have more possibilities with jsdoc though

golden condor
#

jsdoc is very useful, there is also a modified version in ts

restive pebble
#

yes

golden condor
#

if you use vscode, it will automatically fill it for you if you type

/**```
delicate shore
#

/**OK

restive pebble
#

VS code is very helpful

golden condor
#

yes

#

it puts all that

#

for you to fill the function desc, and params required

restive pebble
#

oh nice

quartz kindle
#

i dont even comment my code, let alone jsdoc it lmao

restive pebble
#

@param {typeof} name ?

#

lol

golden condor
restive pebble
#

/** ok

golden condor
restive pebble
#

:void?

#

what if it returns boolean

#

or anything else

honest perch
#

Whats /** for

restive pebble
#

auto

wary flame
#

@return {*}

restive pebble
#

oh

golden condor
#

that indicates that it is jsdoc

restive pebble
#

below the param?

golden condor
#

/** means that it is jsdoc

restive pebble
#

ok ill read jsdoc ty

wary flame
#

I don't think it matters where, not sure

golden condor
#

Jsdoc is what shows you what to put in when using say discord.js's client

pure lion
#

wHoPingEdMEEEEEE

golden condor
#

Vscode should highlight @param

#

Make it coloured so you can see it

#

My theme makes it blue and purple

pure lion
#

Oh Callum ping

#

X)

restive furnace
#

i need good vscode theme

#

rn its bad

#

tbh

golden condor
#

(my theme is community material theme darker high contrast)

pure lion
#

I like the purple keywords - blue variables

golden condor
#

In my theme?

sage niche
#

how do i show my server count on top.gg page?

golden condor
astral ember
#

Hey guys

weak rain
golden condor
#

No

weak rain
#

:/

golden condor
#

There isn't

restive pebble
#

lol

golden condor
#

(my theme is community material theme darker high contrast)
@pure lion if you were taking about my theme, this is it

fringe axle
#

@earnest phoenix any idea?:

One question: how you can set a normal value for quick.db? Like standard value: 0 and you can change it. I only want to know how to set the standard value.

restive furnace
#

db.set("key", 0)

fringe axle
#

Oh, okay. Thanks!

earnest phoenix
#

Nani, what you mean by normal value

fringe axle
#

Standard value

#

Like standard value is: Hi

summer torrent
#

.set("", "") ?

#

what do you mean by "standart"

fringe axle
#

db.set("key", 0)
@restive furnace but it will set it, right?

restive furnace
#

yep, if u want integer

#

if u want string then use db.set("key", "you string here")

fringe axle
#

I want it like this:
Value: None
And you changed it to Hi

#

I know how to change it

restive furnace
#

then use db.set("key", "None")

fringe axle
#

But how to do a standard value

#

Ok

earnest phoenix
#

set() can set it to anything you want and update like the exact way you set it before

fringe axle
#

Thanks.

#

Okay, that‘s easy.

#

Thanks to both of you.

honest perch
#

@golden condor but whats the point of them

golden condor
#

Point of what?

#

jsdoc?

honest perch
#

Mhm

restive furnace
#

documenting your code is the point

#

simple as that

golden condor
#

It's supposed to provide description to functions, classes and parameters needed inside them and intellisense

honest perch
#

So it gives no function

#

Just for you to see

golden condor
#

Yes it does, it provides descriptions to functions and documentation inside the code.

honest perch
#

What

#

I seriously don't understand

restive furnace
#

tl;dr: it provides documentation to your code

delicate shore
#

I finally added a giveaway command 🥳

honest perch
#

Documentation

#

Why does my code need to be documented

#

Its not a living thing is it

earnest phoenix
#

tl;dr: it provides documentation to your code
^ so it can be pulled by IDEs and other text editors, and in case someone else works on the code

#

you're saying that now

#

but when you come back to a project after a month you'll forget what your code does lol

honest perch
#

Don't comments do the same thing

#

//

restive furnace
#

not for intellisense

earnest phoenix
#

sure but yeah, you use jsdoc so it can be pulled from text editors and IDEs

restive furnace
#

and if u go oss, then you can just generate docs from them

honest perch
#

Ohhhh

#

That makes more sense mmulu

fringe axle
#

@earnest phoenix so I made a say command but you can ping roles/everyone and here with it. How to fix it?

restive furnace
#

permissions

fringe axle
#

@ me if you know it.

quartz kindle
#

use allowedMentions and disableMentions

fringe axle
#

I want that everyone can say something.

#

Okay Tim

#

Never used this before

quartz kindle
#

in TextChannel#send() options

#

for example ```js
message.channel.send("@everyone",{disableMentions:"all"})

fringe axle
#

Oh

#

Okay

#

How will this work with an if statement?

#

Like if(text ===)

restive furnace
#

same like normal message.channel.send

fringe axle
#

Okay

quartz kindle
#

you dont need to check the text content

fringe axle
#

Not? Nice.

#

And role mention?

#

„all“?

quartz kindle
#

yes, if you disable all, it will disable all mentions

fringe axle
#

Good.

quartz kindle
#

it will show up like this

fringe axle
fading cypress
#

ShareX is slow
@paper cliff your pc is slow

paper cliff
#

it's not

fading cypress
paper cliff
#

what

#

what are you even bothering with that lmao
every time I boot into Windows, it keeps asking me to update even if I told him 5000 times to not update
and I feel like it's slower than flameshot, but it's probably Windows that does that anyway

fringe axle
#
message.channel.send("@everyone",{disableMentions:"all"})
``` @quartz kindle how can I disable role mentions for all roles and user mentions for all users?
paper cliff
#

^ what you did should works

fringe axle
#

Okay

solemn latch
#

I feel disableMentions: "all"
Is pretty descriptive of what happens

digital ibex
#

u can also use message.cleanContent

pine aspen
#

Hey, how'd I check if a user has speaking permission in a specific channel. Eris.

paper cliff
#

@digital ibex No, it's only for receiving messages, it's not for sending them

#

and cleanContent basically removes any mention where disableMentions directly tells Discord to not mention anybody without modifying the message content itself

solemn latch
pine aspen
#

Woo, it's for a voice channel.

#

nvm

#

found it

#

ty

solemn latch
#

I mean, that would also be on the docs

digital ibex
#

cleanContent doesnt mention

pine aspen
#

Hmm

#

Woo, how can i see if the user has a specific permission?

#

PermissionsOf just gives me all of them in an int

solemn latch
pine aspen
#

yeah but it doesn't work.

#

hmm

#

wait

cobalt eagle
#

hi i need help

digital ibex
#

what do u need help with?

cobalt eagle
#

i need to access my mysql database with another pc, how can i do that

solemn latch
#

I really like the eris docs

#

Why do people say they are bad

digital ibex
#

same

#

idk

pine aspen
#

ok

#

Thx.

cobalt eagle
#

the bot is not hosted on the same pc as the database

pine aspen
#

@solemn latch they're not the best.

#

Ok thanks woo got it.

solemn latch
#

Everything is chainable

pine aspen
#

I didn't think has would work.

solemn latch
#

It tells you what it returns and you can click on it to follow the chain to get what you want

#

They don't really provide examples, but who uses doc examples anyway

faint prism
#

They don't really provide examples, but who uses doc examples anyway
@solemn latch People who don't actually write their own code, and hope copy and pasting will result in a fully-functioning bot

(not keeping up with current convo)

solemn latch
#

Flawless faq

midnight blaze
#

Hi guys, I am trying to loop throught a folder with mp3 files.



fs.readdir("./a/", (err, files) => {
  if (err) return console.error(err);
  files.forEach(file => {
    if (!file.endsWith(".mp3")) return;
    let props = require(`./a/${file}`);
    let commandName = file.split(".")[0];
    console.log(`Attempting to load command ${commandName}`);
  });
});

I get this error:

/home/runner/languagebotquiz/a/address_cs.mp3:1
ID3
   ^

SyntaxError: Invalid or unexpected token

I tried to search it up, but I dont see a soltuion for now, maybe somebody here is experienced with fs.

pale vessel
#

why are you requiring an mp3 file

amber fractal
#

you cant require an mp3 file

midnight blaze
#

I see

#

I have to load it, right?

amber fractal
#

Confused at what you're trying to do

faint prism
#

this ^
By loading it, maybe you can just keep an array of file locations of mp3's

midnight blaze
#

I want to make a quiz with mp3 files

#

yeah

quartz kindle
#

you need to read it with fs and store it as a buffer

midnight blaze
#

ok, store it as a buffer. let me try that out 👀

faint prism
#

an array of byte arrays :^)

quartz kindle
#

you could also create a messageAttachment and store the attachment
pretty sure discord.js will do the reading and buffering for you

weak rain
#

| trigger.js | ❌ -> missing a help.name, or help.name is not a string. |

#

whats this

quartz kindle
faint prism
#

sounds like the property isn't a string or maybe undefined? idk. Looks like a custom error to me

weak rain
#

hm

amber fractal
#

it is a custom error

pure lion
#

From commando?

amber fractal
#

most likely from a built in command handler

quartz kindle
#

you're using something that requires all commands to have a name field in its help object

#

and your command doesnt have it

weak rain
#
const client = new Discord.Client();
const Canvacord = require("canvacord");
const canva = new Canvacord();

module.exports = {
    name: "trigger",
    usage: "trigger",
    description: "Trigger People",
    category: "image",
    usage: "trigger <@user>",
    run: (client, message, args) => {
let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
let image = await canva.trigger(avatar);
let attachment = new Discord.MessageAttachment(image, "triggered.gif");
return message.channel.send(attachment);
}
}```
#

this is my code

earnest phoenix
#

My GameBot isnt working anyone know why

midnight blaze
#

one sec

solemn latch
#

No

drifting wedge
#

is mongodb online?

#

or is it on your pc?

midnight blaze
#
fs.readdir("./a/", (err, files) => {
  if (err) return console.error(err);
  files.forEach(file => {
    file = new Buffer(file, 'binary').toString('base64');
    if (!file.endsWith(".mp3")) return;
    let props = require(`./a/${file}`);
    let commandName = file.split(".")[0];
    console.log(`Attempting to load command ${commandName}`);
  });
});

hmm, nothing happens. 🤔

weak rain
#
const client = new Discord.Client();
const Canvacord = require("canvacord");
const canva = new Canvacord();

module.exports = {
    name: "trigger",
    usage: "trigger",
    description: "Trigger People",
    category: "image",
    usage: "trigger <@user>",
    run: (client, message, args) => {
let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
let image = await canva.trigger(avatar);
let attachment = new Discord.MessageAttachment(image, "triggered.gif");
return message.channel.send(attachment);
}
}```

tHIS IS MY CODE

drifting wedge
#

its not working

#

its giving me no errors

#

but itsnt wokring

#

1 sec

digital ibex
#

whats not working?

drifting wedge
#

welcome messages

weak rain
#

;-;

copper cradle
#

@earnest phoenix do you think I'm a wizzard to magically guess why seomes vode doesn't work before even reading it?

solemn latch
#

Yes

weak rain
#

u know? @copper cradle

#

why isnt this working

midnight blaze
#
fs.readdir("./a/", (err, files) => {
  if (err) return console.error(err);
  files.forEach(file => {
    file = new Buffer.from(file, 'binary').toString('base64');
    if (!file.endsWith(".mp3")) return;
    let props = require(`./a/${file}`);
    let commandName = file.split(".")[0];
    console.log(`Attempting to load command ${commandName}`);
  });
});

HMM, wth! Why

solemn latch
#

Looks to me like your command handler is upset @weak rain

copper cradle
#

@midnight blaze a w a i t

weak rain
#

Why

midnight blaze
#

oof

#

readdirsync?

solemn latch
#

I dont know, depends on command handler

faint prism
#

My GameBot isnt working anyone know why
@ShakeandBake99#3390 Nobody can tell you why without an error, stacktrack, or code snippet

solemn latch
#

He isn't in the server anymore

copper cradle
#

@weak rain your command handler is requiring your commands to have a help object

#

export an object called help

#

and insifr that object add that property

#

'name'

midnight blaze
#
const waitFor = (ms) => new Promise(r => setTimeout(r, ms));

fs.readdir("./a/",async (err, files) => {
  if (err) return console.error(err);
  files.forEach(async file => {
    await waitFor(50);
    file = await new Buffer.from(file, 'binary').toString('base64');
    if (!file.endsWith(".mp3")) return;
    let props = require(`./a/${file}`);
    let commandName = file.split(".")[0];
    console.log(`Attempting to load command ${commandName}`);
  });
});
#

I tried it, doesnt work, same result

solemn latch
#

await waitFor(50)
?

midnight blaze
#

just to make sure^^

#

I am using this to test async functions

amber fractal
#

what

#

You dont need new for buffer.from

faint prism
#

write functions and proper unit tests

midnight blaze
#

@amber fractal aight, good, to know, but it wont solve the problem yet, thanks tho

copper cradle
#

actually

#

that promise isn't coming from that placr

tender basin
#

is their any good place too take a look at some example on discord.py shards implementation?

copper cradle
#

you're not logging anythig to the console

#

there*

delicate shore
#
  if(command === "airhorn"){
      const permissions = voiceChannel.permissionsFor(msg.client.user);
        if (!permissions.has("CONNECT")) {
            return msg.channel.send("Sorry, but I need a **`CONNECT`** permission to proceed!");
        }
        if (!permissions.has("SPEAK")) {
            return msg.channel.send("Sorry, but I need a **`SPEAK`** permission to proceed!");
        }
const VC = msg.member.voice.channel;
        if (!VC) return msg.channel.send("I'm sorry, but you need to be in a voice channel to play a music!");
    VC.join()
        .then(connection => {
            const dispatcher = connection.play('/home/container/airhorn.mp3');
                        msg.channel.send(`Ok Zoomer`)

            dispatcher.on("end", end => {VC.leave()});
        })
        .catch(console.error);
  }```
#

my bot does not leaves VC

#

once song is finished

#

i mean sound

dire obsidian
#

.then?

delicate shore
#

excuse me
wha--

dire obsidian
#

Why you want a horn command bro xd

delicate shore
#

Why would i use then when i don't need it

#

Why you want a horn command bro xd
@dire obsidian SoundBoard

solemn latch
#

I dont see an end event for dispatcher

dire obsidian
#

Niceeeeeeeeeeeeeeeee

delicate shore
#

I dont see an end event for dispatcher
@solemn latch it is i saw it on stackoverflow

#

i use this

#

oh wait

#

i think it is finish

#

i checked docs

worldly current
#

hi

delicate shore
#

oh wait no

worldly current
#

can domsone help me

delicate shore
#

it is end only

worldly current
faint prism
#

-asktoask

delicate shore
#

@worldly current with ?

worldly current
#

css

#

for the bot looks

stable eagle
#
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)')]``` I am for some reason, getting this error in my python code?
delicate shore
slender thistle
#

Let me dig up that GitHub issue

worldly current
#

Wot

stable eagle
#

latest one

solemn latch
#

🤔 probably shouldn't copy paste code from stackoverflow

paper cliff
faint prism
#

@worldly current Idk exactly what your issue is

slender thistle
#

latest one
@stable eagle pip show discord.py please

stable eagle
#

kk

#

@slender thistle It says current version is 1.4.1

earnest phoenix
#

@worldly current your bot must be certified in order to use css on top.gg

worldly current
#

ohh

slender thistle
#

No?

paper cliff
#

No

slender thistle
#

That's for JS, Auric

earnest phoenix
#

oh really

slender thistle
#

CSS and HTML is supposed for non-cert

worldly current
#

ohh

earnest phoenix
#

well i've heard otherwise

worldly current
#

Uhh

#

lel

earnest phoenix
#

oh yeah mb it is js

#

¯_(ツ)_/¯

#

@worldly current so uhh what do you need help with?

worldly current
#

How the css works

#

l know css

earnest phoenix
#

how it normally does

wooden dock
#

How many days takes to get your bot verified?

worldly current
#

Wdym

earnest phoenix
#

3-4 weeks

worldly current
#

Do you want me

#

to use div

#

tags

wooden dock
#

Lol

worldly current
#

not funny

#

lol

slender thistle
#

Use inspect Element to get element names and then make rules for them

earnest phoenix
#

bruh someone take over, imma eat

worldly current
#

lol

pure lion
#

I here

opaque eagle
#

Is it normal for yarn workspaces to put a node_modules in every workspace dir?

pure lion
#

Idk yarn but probably no

#

Lmao advertising

amber fractal
#

uh no

#

did you npm i in the wrong dir?

midnight blaze
opaque eagle
#

I did it from the main dir

amber fractal
#

I mean it should've recursed up anyways

#

og they all have a package.json

midnight blaze
#
fs.readdir("./a/",async (err, files) => {
  if (err) return console.error(err);
  await files.forEach(async file => {
    file = await new Buffer.from(file, 'binary').toString("base64");
    console.log(file)

  });
});


I was able to load the files, but how to make them in normal string?

#

all I need is the name of the files in strings

quartz kindle
#

you dont need await, nor new

amber fractal
#

I've never seen it do that @opaque eagle

faint prism
#

Then why are you getting the base64 representation of the file buffer?

quartz kindle
#

can Buffer.from even load from a path?

restive pebble
#

hi pangloss

autumn summit
#

e

amber fractal
#

file is a string...

earnest phoenix
#

what is the best way to ads a bot ?

amber fractal
#

file is just a file name

midnight blaze
#

the normal Buffer is deprecated

restive pebble
#

ok

midnight blaze
#

hi

quartz kindle
#

@midnight blaze you are base64 encoding the file name, not the contents lol

midnight blaze
#

Boeing

#

xD

restive pebble
#

xD

midnight blaze
#

oh

faint prism
fierce arch
#

Are you allowed to customise your bots page with CSS?

quartz kindle
#
const images = [];
fs.readdirSync(dir).forEach(file => {
  images.push({
    name:file,
    buffer:fs.readFileSync(`${dir}/${file}`)
  })  
})
``` @midnight blaze
stable eagle
#
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)')]``` Can someone help as I got this error when trying to get my bot online, my discord.py version is 1.4.1
restive pebble
#

can i require files like kek.example.js

fierce arch
#

@stable eagle I can help

restive pebble
#

with require("kek.example")

midnight blaze
#

but

stable eagle
#

ok

midnight blaze
#

anyway^^ thanks for help

restive pebble
restive furnace
#

no whitespace pls

fierce arch
#

@stable eagle I have had the exact same error before. Open up internet explorer and go to discord.com and then you can redownload the certificate

dusky mason
#

can anyone help me out with lavalink

#

i use python

#

ping me if youre helpful

slender thistle
opaque eagle
#

Ok I have more info... when I install a regular dependency, like chalk, it installs it in the main node_modules folder and won't create one inside the workspace. When I add a dev dependency like eslint or typescript, it makes a node_modules in the workspace folder... idk why

#

And I'm doing yarn workspace parser add -D typescript

split goblet
#

Guys if one day I got 75 servers using my bot where I have to go to get the tag

slender thistle
#

-verifybot

gilded plankBOT
#

Hi! It seems like you are looking for information on how to get your bot verified.

Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.

If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.

We cannot provide support on how to get your bot verified.

sharp tendon
#

Hello

#

Can anyone help me.

zealous torrent
#

sure

sharp tendon
#

Error: ````info.titlewill be removed in a near future release, useinfo.videoDetails.titleinstead.info.video_urlwill be removed in a near future release, useinfo.videoDetails.video_urlinstead.info.length_secondswill be removed in a near future release, useinfo.videoDetails.lengthSeconds` instead.
Could not join voice channel: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.```

worldly current
#

l hope my bot was approved

sharp tendon
#

So i hope you can help me @zealous torrent

zealous torrent
#

what did you use

faint prism
#

will be removed in a near future release, use X instead
I don't recommend using depreciated stuff in libraries

sharp tendon
#

what did you use
@zealous torrent I used = API's

#
const YouTubeAPI = require("simple-youtube-api");
zealous torrent
#

hey

#

you trying to make a music bot?

fringe axle
#
    async run(client, message, args) {
        client.guilds.cache.map(g => g.name)
    }
}

Someone knows why "cache" is undefined?

solemn latch
#

Looks like you shouldn't use info.title

sharp tendon
#

you trying to make a music bot?
@zealous torrent Yes!

zealous torrent
#

ok

#

yeah im not sure sorry

sharp tendon
#

😦

#

Ok

pure lion
#

Music bot ez

#

Fr

#

I'll break it down for you

fringe axle
#

@earnest phoenix are you there?

pure lion
#

Ignore the actual music playing, that's simple too

zealous torrent
#

tbh you can probably search how to make music bot on youtube and find tutorials

fringe axle
#
    async run(client, message, args) {
        client.guilds.cache.map(g => g.name)
    }
}

Do you know why "cache" is undefined?

split goblet
pure lion
#

@sharp tendon hi

sharp tendon
#

Hi

#

Can you help me?

pure lion
#

Music bot help

#

Is me

sharp tendon
#

Ow thx

pure lion
#

Np

#

I'll break it down for you

sharp tendon
#

Okey

faint prism
#

Guys I'm trying to check my bot I don't know how else it got 76 servers
@split goblet Do you suspect your token was leaked?
If so, regenerate and update your bot's script.
You can check the guilds it in via the lib you use

pure lion
#

You will need:
A way of storing all of the queues across guilds
A queue system per guild that stores volume, songs, paused status and voicechannels
Ways to trigger this and get info from YouTube

sharp tendon
#

Ok

#

I use quick.db for the databases

drifting wedge
#

channel = client.get_channel(id=int(result[0]))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

#

im getting this error

sharp tendon
#

You will need:
A way of storing all of the queues across guilds
A queue system per guild that stores volume, songs, paused status and voicechannels
Ways to trigger this and get info from YouTube
@pure lion How do i start? I need to delete my code?

drifting wedge
#

thats my code

faint prism
#

is result[0] null?

drifting wedge
#

no i dont think so

faint prism
#

What is it then?

drifting wedge
#

check my code ig

#

1 sec

#

it is

#

but it wasent supposed it

#

to

#

its pulling from a db

#

and its not working

faint prism
#

That's what the error is

solemn latch
#

Databases can return null

faint prism
#

You need to handle it being null, and or fix your db query

pure lion
#

@sharp tendon you don't need a db

sharp tendon
#

Ok can you help me with it?

solemn latch
#

Just swap the .title and .video_url
To the non deprecated properties

zealous torrent
#

every bot developer ^^

sharp tendon
#

I mean, the error was pretty straightforward.
No need to redo your whole code if it works.
@solemn latch What must i do,

#

?

zealous torrent
#

Just swap the .title and .video_url
To the non deprecated properties
@solemn latch

solemn latch
#

What the error told you to do

#

It was a plain text error describing exactly how to solve it

sharp tendon
#

What is the non deprecated properties then?

faint prism
sharp tendon
#

Sorry iam not so like a pro...

zealous torrent
#

@faint prism 100%

sharp tendon
#

What is the non deprecated properties then?
@solemn latch

zealous torrent
#

i dont think @solemn latch is gonna help you through every step

pale vessel
#

please

opaque eagle
#

Do you speak english

solemn latch
#

It literally describes what you need to do in full

opaque eagle
#

^

fringe axle
#

Hey @earnest phoenix I have some problems with your package.

slender thistle
earnest phoenix
#

@fringe axle What's the problem

fringe axle
#
    run(message, args) {
        let argsC = message.content.split(" ").slice(1);
        let np = new p();

np.scramble(`${argsC[0]}`);
    }
}
sharp tendon
#

Do you speak english
@opaque eagle Actualy not.

fringe axle
#

Not responding. No error, nothing.

opaque eagle
#

either way it explains what to do

faint prism
#

@opaque eagle Actualy not.
@sharp tendon Do exactly what the error tells you to do

sharp tendon
#

I don't speak english...

earnest phoenix
#

Of course it would not respond, you aren't sending any messages or as such @fringe axle

sharp tendon
#

I speak it now...

opaque eagle
#

cool but read the error

sharp tendon
#

But its all

fringe axle
#

I send a message after it.

faint prism
#

I don't speak english...
@sharp tendon Do what error say do

sharp tendon
#

Idk

earnest phoenix
#

@faint prism Show that part of the code too

faint prism
#

:reeeeee:

zealous torrent
#

Just swap the .title and .video_url
To the non deprecated properties @sharp tendon

fringe axle
#

Of course it would not respond, you aren't sending any messages or as such @fringe axle
@earnest phoenix I do...

solemn latch
#

Not being an English speaker, but being a programmer must suck pandasad

faint prism
#

@faint prism Show that part of the code too
@earnest phoenix It's pasted above about 3 times now

sharp tendon
#

Yes ok but what is the non deprecated properties?

opaque eagle
#

IT TELLS YOU

#

what they are

faint prism
#

Yes ok but what is the non deprecated properties?
@sharp tendon It says what they are 😢

opaque eagle
#

in the error message

earnest phoenix
#

@faint prism Wait sorry wrong ping

zealous torrent
#

info.title will be removed in a near future release, use info.videoDetails.title instead.
info.video_url will be removed in a near future release, use info.videoDetails.video_url instead.
info.length_seconds will be removed in a near future release, use info.videoDetails.lengthSeconds instead.
Could not join voice channel: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

earnest phoenix
#

@fringe axle Show that part of the code where you send it as a message

opaque eagle
#

those are the non-deprecated properties

zealous torrent
#

it says it right there

solemn latch
#

The things inside the boxes are the non deprecated properties

sharp tendon
#

@zealous torrent thx

opaque eagle
#

If you read the error, you would know

faint prism
#

change info.title to info.videoDetails.title
@sharp tendon

fringe axle
#
const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
const fs = require('fs');
const Discord = require('discord.js');
const np = require('string-toolkit')

module.exports = class ScrambleCommand extends Command {
  constructor(client) {
    super(client, {
      name: 'scramble',
      aliases: ['scramble-words'],
      group: 'fun',
      memberName: 'scramble',
      description: 'Scramble your text',

        });
    }

    run(message, args) {
        let argsC = message.content.split(" ").slice(1);
        let np = new p();

np.scramble(`${argsC[0]}`);
    }
}
#

Now "p" is not defined

#

@earnest phoenix

pale vessel
#

define it

opaque eagle
#

Dude needs a separate package to scramble text

#

funny

earnest phoenix
#

You don't send it as a message obviously

#

That's why it doesn't respond

solemn latch
#

I dont see you defining p anywhere

pale vessel
opaque eagle
#

but you didn't define p

#

where's the p in new p() coming from

earnest phoenix
#

const np has to be const p

opaque eagle
#

^

#

also learn how to work with strings plox

fringe axle
#

Okay

earnest phoenix
#
np.scramble(`${args[0]}`);``` can just be
```js
np.scramble(args[0]);```
opaque eagle
#

^ that too

fringe axle
#

Okay

opaque eagle
#

why use string literals when args[0] is already a string

faint prism
#

string interpolating a string

fringe axle
#

@earnest phoenix and how's he responding now?

midnight blaze
#

zzsound_quiz

earnest phoenix
#

Just send it as a message?

midnight blaze
#

zzsound_quiz

earnest phoenix
#
return message.channel.send(np.scramble(args[0]));```
solemn latch
#

Wrong channel

midnight blaze
#

zzsound_quiz

earnest phoenix
#

Uhh

fringe axle
#
return message.channel.send(np.scramble(args[0]));```

@earnest phoenix Replace with it?

solemn latch
#

Still wrong channel

faint prism
earnest phoenix
#

@fringe axle replace it with np.scramble(args[0]);

opaque eagle
#

this is officially spoonfeed city 🥄

solemn latch
#

Feels bad volt going to have to cover all of how to make a bot

earnest phoenix
fringe axle
sharp tendon
#

Ok @faint prism But now i have this error = ```js
Could not join voice channel: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

misty sigil
#

thats internet problem

opaque eagle
#

That's why if you learned how to work with strings, you wouldn't need some random package to do something as trivial as scrambling a string @fringe axle

faint prism
#

Read docs as to what would cause that command to be sure though

earnest phoenix
#

<Websocket connection problem or ratelimit of connecting to a voice channel>

midnight blaze
#

zzsound_quiz

faint prism
solemn latch
#

Wrong channel x 4

misty sigil
#

pangloss your in the wrong channel lmao

fringe axle
#

@earnest phoenix you saw my image above?

earnest phoenix
#

I think he is lagging or something idk

misty sigil
#

you're drunk, go to bed

solemn latch
#

Lol

earnest phoenix
#

@fringe axle Show your current code

fringe axle
#
    run(message, args) {
        let argsC = message.content.split(" ").slice(1);
        let np = new p();

        return message.channel.send(np.scramble(args[0]));

    }
}
earnest phoenix
#

Oh

fringe axle
#

message.content.split, right?

earnest phoenix
#

Change args[0] to argsC[0]

opaque eagle
#

That's not how commando works

fringe axle
#

Okay

opaque eagle
#

the point of commando is you don't have to worry about parsing arguments

sharp tendon
#

thats internet problem
@misty sigil How do i make that?

opaque eagle
#

I'd look at the commando docs to see how they want you to define arguments

sharp tendon
#

How do I fix that?*

fringe axle
#

Working, thanks!

earnest phoenix
#

@fringe axle wait

fringe axle
#

Cool package.

earnest phoenix
#

argsC[0] must be argsC.join(" ")

midnight blaze
#

zzsound_quiz

misty sigil
#

i'd assume you'd just get a better connection, but it could be something to do with ratelimits @sharp tendon

earnest phoenix
#

Sorry my bad

fringe axle
#

argsC[0] must be argsC.join(" ")
@earnest phoenix but it's working... xD

opaque eagle
#

@earnest phoenix doesn't commando parse args for u

fringe axle
#

Without it what you said.

misty sigil
#

not for more than one word

fringe axle
#

Oh

misty sigil
sharp tendon
#

i'd assume you'd just get a better connection, but it could be something to do with ratelimits @sharp tendon
@misty sigil And how do i fix that ratelimits?

misty sigil
#

By waiting

earnest phoenix
#

@opaque eagle Idk i don't use commando

opaque eagle
#

oh ok

sharp tendon
#

By waiting
@misty sigil Okey...

#

How long?

solemn latch
#

Depends on the ratelimit iirc