#development
1 messages ยท Page 1012 of 1
I have heard these
this is why free hosters suck
ahj
I need vps lol
someone suggest mes vps
Fuck u glitch
if you have a proper vps run 1 command and you have all modules you wanted
Suggest me one
oh

now glitch server down
digitalocean
Victory royale
you can get one with node preinstalled
lol
what message?
Error
hmm yess the floor is made of floor
Index Code -
const fs = require('fs');
bot.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for (const file of commandFiles){
const command = require(`./commands/${file}`);
bot.commands.set(command.name , command);
}```
Reddit.js code
```js
const { MessageEmbed } = require('discord.js');
const fetch = require('node-fetch');
const { Command } = require('discord.js-commando');
module.exports = class RedditCommand extends Command {
constructor(client) {
super(client, {
name: 'reddit',
aliases: ['subreddit', 'reddit-search'],
group: 'other',
memberName: 'reddit',
description:
'Replies with 10 top daily posts in wanted subreddit, you can specify sorting and time',
throttling: {
usages: 2,
duration: 10
},
args: [
{
key: 'subreddit',
prompt: 'What subreddit would you like to search?',
type: 'string',
default: 'all',
max: 50,
wait: 20
},
{
key: 'sort',
prompt:
'What posts do you want to see? Select from best/hot/top/new/controversial/rising',
type: 'string',
default: 'top',
validate: function(sort) {
return (
sort === 'best' ||
sort === 'hot' ||
sort === 'new' ||
sort === 'top' ||
sort === 'controversial' ||
sort === 'rising'
);
},
wait: 10
}
]
});
}};```
reddit command code
```js
if(command === "reddit"){
bot.commands.get('reddit')
};```
now what is wrong here
@earnest phoenix wait wait , you're gonna have to open a connection every time and close it manually every time? https://ascencia.is-inside.me/mOWivbZh.png 
what does the error say
this
@earnest phoenix wait wait , you're gonna have to open a connection every time and close it manually every time? https://ascencia.is-inside.me/mOWivbZh.png :mdr:
@digital wagon ?
at Client.emit (events.js:196:13)
at MessageCreateAction.handle (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/event-target.js:125:16)
at WebSocket.emit (events.js:196:13)
at Receiver.receiverOnMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/websocket.js:800:20)
(node:11714) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a ```
this also (node:11714) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'execute' of undefined

you have somewhere a error in a command
Error
wait
lemme clear the log
and run command again
at Client.<anonymous> (/app/index.js:246:31)
at Client.emit (events.js:196:13)
at MessageCreateAction.handle (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/event-target.js:125:16)
at WebSocket.emit (events.js:196:13)
at Receiver.receiverOnMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/websocket.js:800:20)
(node:11714) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)```
@restive pebble this is the whole error
what happens in line 246 in your /app/index.js
:O
wait
if(command === "reddit"){
bot.commands.get('reddit').execute(msg, args);
}
oh
why tf i did that
Undefined
now

should i remove it
rename your Reddit.js to reddit.js

const { MessageEmbed } = require('discord.js');
const fetch = require('node-fetch');
const { Command } = require('discord.js-commando');
module.exports = class RedditCommand extends Command {
constructor(client) {
super(client, {
name: 'reddit',
aliases: ['subreddit', 'reddit-search'],
group: 'other',
memberName: 'reddit',
description:
'Replies with 10 top daily posts in wanted subreddit, you can specify sorting and time',
throttling: {
usages: 2,
duration: 10
},
args: [
{
key: 'subreddit',
prompt: 'What subreddit would you like to search?',
type: 'string',
default: 'all',
max: 50,
wait: 20
},
{
key: 'sort',
prompt:
'What posts do you want to see? Select from best/hot/top/new/controversial/rising',
type: 'string',
default: 'top',
validate: function(sort) {
return (
sort === 'best' ||
sort === 'hot' ||
sort === 'new' ||
sort === 'top' ||
sort === 'controversial' ||
sort === 'rising'
);
},
wait: 10
}
]
});
}};```
this is code
of reddit
Yeh
so
what should i do ?
๐ฆ
๐ข
when you don't have nitro can you cannot use cry emoji even

Lemme see
How u defined commands
const fs = require('fs');
bot.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for (const file of commandFiles){
const command = require(`./commands/${file}`);
bot.commands.set(command.name , command);
}
seee ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
why laugh?
@restive pebble
Flamzipe
what
Help him flazepe
Oh collection is captial C
Mm
What
Does it not work
Error?
Go to where it's undefined
what happened
@delicate shore pls use hastebin
kokokok
^
ok
holy that structure looks like straight out from xiao nah, just traditional commando command structure
Lol
@golden condor @pure lion @pale vessel https://hatebin.com/dqphrnsjdr
COmmand handler code + reddit.js code + reddit command code
and error
ty
wlcm
There's an error in your code
whiche one
Yes
Yes
@quartz kindle help this human
is tim dbl's stackoverflow professional
its so funny when ppl want help for their pasted code
^^^^^^^
No i watched tutorial of code lyon
@winter basalt yes
@earnest phoenix
Tim should be hired by dbl to be the code master
@golden condor did u saw it?
what
Tim is big brain
@honest perch pls tel me one thing
Learn js
he isnt even being rude
it will take me 30 min
It's basic js
It states the error clearly
It's basic js
@honest perch no see the code first
i will dig ur code
wait 30 mins
or 15 mins
TypeError: Cannot read property 'execute' of undefined
ok reading now
yes
That's your error
yes
because i watched code lyon on yooutube
i did what he did
and i am getting errroir
of execute
the difference
is
he just told the command handler
things
Dont copy videos
Lies
copying videos is the worst way of learning
except paid courses
i learned js from reading sourcecode in github
education.github.com always exists
also learning coding got in the past years many free ways
its not like the late 90s or early 2000s where the internet was still growing
ok
.exec('here?')
wait
ok
yes
reddit.js
try
u didnt split
.
reddit.js
if(command === "reddit"){
bot.commands.get('reddit.js')
};
then execute
WTFร
then again it will throw error
oh wait u set it comamnd.name
ha ha lol
@delicate shore try this
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js')); for (const file of commandFiles){ const command = require(`./commands/${file}`);
let commandlocation= `./commands/${file}` bot.commands.set(command.name , commandlocation); }```
this will give error
unexcpeced token bot
where lol
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js')); for (const file of commandFiles){ const command = require(./commands/${file});
let commandlocation= ./commands/${file} bot.commands.set(command.name , commandlocation); }
screenshot error
Hello Coders.
Yes.
on top.gg
how do you do the red thing
yes.
Can you send me the script with a simple word in it?
@restive pebble onst client = new Discord.Client()
wait no @restive pebble
It is not the same.. you just sent me a text with red color
like your bot info?
Yes.
that
in the terminal
you have to write
same code
like
<pstyle or whatever
in the black terminal
can you send me an example.
wait a sec
send ur full code
me?
yes
@restive pebble your dms close
can anyone send me the code for the red text in the pic please?
Ok @delicate shore ๐
ok
@feral aspen see this
Here insert code from link of
Here
@feral aspen ok?
Suuuup
Supppp
Ok
@feral aspen ok?
@delicate shore I know
but when i insert it
it doesnt look the same.
it just puts red text only.,
but in the pic.. its looks different.
its like thin red and highlighted gray and stuff.
how do i do that.
can u make a !help command that automatically updates?
and what if I make new folders in my command folder to make the commands more organised
will they still get executed?
what is shards and what do they do and do you need to pay?
you need them if your bot reaches 2500 guilds
and they are free (but need more resources from your VPS)
they split the bot in mutiple Instances that can communicate with each other
huh
each shard can hold 2500 Guilds
the bot wont login
oof
you would need to create multiple shards once your bot reaches more than 2.5k servers

@spare mirage you need to change your command loader
why tho discord prevents login without shards
yeah ik
bcs everything above wont get a instance
oh
bot.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for(const file of commandFiles){
const command = require(`./commands/${file}`);
bot.commands.set(command.name, command);
}
what do I change?
make it to take the new folder with into account
wait in html what is best place to put text?
do I make a new const?
const fun = require(`./commands/fun${file}`);
how much time it will take to verify my bot ?
2-3 weeks
ok
done
๐
@lethal pine your bot
How could I then set the bot status to how many servers it is on?
yup @earnest phoenix
@lethal pine your bot name
@earnest phoenix OMG

@low phoenix u make a var:
var scount = bot.guilds.cache.size
@low phoenix are you using discord.js?
yes
then follow @spare mirage's instructions
whats the best place to but text in html?
getting this error when trying to connect to postgressql on a remote server i have already edited the .conf files
Is the server running on host "blah blah "and accepting
TCP/IP connections on port 5432?```
@earnest phoenix huh
html
@plucky harness self hosted DB?
no
what about html
vps
then its self hosted if you installed it yourself
nanu
what about html
@honest perch smh i did say that
did you got a firewall up?
ye
i dont understand what "place to but text in html?" means
but i allowed through post 5432
tcp?
did you use correct authentification?
there is something wrong either with the authentification or your setup

how do i fix it

idk i never used postgres
i have no idea, sadly. maybe you find somewhere a 7 years old stackoverflow page with the issue
and a possible solution
(happened to me a few times)
@plucky harness I had that issue before
cant remember :p pretty sure the server isnt running or

server isnt running?
check if the service is running
Are you using the nodepg package to access the database or
5432 is
Can anybody explain why this is giving a random order?
guild.channels.cache.sort((c1, c2) => c1.name - c2.name).map(c => c.name);```
(I know I can map first and then sort, but I need the channel objects + that doesn't work either)
run it async
why am I getting these errors?
Can anybody explain why this is giving a random order?
guild.channels.cache.sort((c1, c2) => c1.name - c2.name).map(c => c.name);``` (I know I can map first and then sort, but I need the channel objects + that doesn't work either)
@nocturne grove what are you doing
Idk if the async reaction was for me, but that does not seem to work
@spare mirage missing )
what are you trying to do
Why do I have an error at the else
I want the channels to be in alphabetical order according to their counter_name property, but for the question I'm using the name property
will try Tim
wouldn't you need to do something like this for alphabetical order?
# auto: automatically start the cluster
# manual: manual startup with pg_ctlcluster/postgresql@.service only
# disabled: refuse to start cluster
# See pg_createcluster(1) for details. When running from systemd,
# invoke 'systemctl daemon-reload' after editing this file.
``` found this log file
doesn't work too
is this problem? @short siren
mine works fine using that method
flazepe is correct
you can also use localCompare
module.exports = {
name: 'kick',
description: "this is a kick command!",
execute(Discord, bot, message, args){
if (msg.member.hasPermission("KICK_MEMBERS")) {
if (message.members.mentions.first()) {
try {
msg.members.mentions.first().kick();
} catch {
msg.reply("I do not have permissions to kick " + msg.members.mentions.first());
}else {
msg.reply("You do not have permissions to kick " + msg.members.mentions.first());
}
}
}}```
Im getting an error at `else` can anyone explain?
so w3schools is wrong?
its not wrong, they dont show any advanced sorting with strings
Show code
their alphabetical example is just .sort()
@spare mirage else is on the wrong } bracket
you run it on the catch block not the if block
by the way does case matter?
its not mine but
no for me case doesn't matter
can i remove toLowerCase() safely? @quartz kindle just checked and the answer is no
host all all 127.0.0.1/32 md5
host all all 192.168.190.0/24 md5``` what does /24 or /32 indicate
their alphabetical example is just
.sort()
@quartz kindle but that's the same as I want, right?
it not mine
the size of the subnet @plucky harness
how would i chcek mine?
@spare mirage you're basically doing try {} catch {} else {
so like this @lusty quest
which is incorrect
@spare mirage yes
yes, that looks better
I have a weird feeling that .sort wont work exactly the way you are thinking it would due to categories and there names too
@nocturne grove their alphabetical example assumes an array of strings, which will work if you map them first before using sort
@spare mirage If you aren't using stuff passed to the function put underscore before it
?
oh okay thanks both
@pale vessel, your example doesn't sort aa ab ac, right? It only looks at the first char
it doesnt extract the first char, just makes the entire string lowercase
case matters when sorting, because sorting strings takes each character's ascii code points
capital comes before non-capital or not?
execute(Discord, bot, message, args){
if (message.member.hasPermission("KICK_MEMBERS")) {
if (message.members.mentions.first()) {
try {
message.members.mentions.first().kick();
} catch {
message.reply("I do not have permissions to kick " + message.members.mentions.first());
}
}else {
message.reply("You do not have permissions to kick " + message.members.mentions.first());
}
}}}
TypeError: Cannot read property 'mentions' of undefined
@quartz kindle Could you help me with this database thing im having trouble with?
uppercase chars are from 65-90, lowercase are from 97-122
okay thanks
thanks
@earnest phoenix what database thing
hmm
(node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'collection' of undefined
interesting
bot.prefix = "d-";
const find = await bot.db.collection("Deku-DB").findOne({"g_id":message.guild.id});
if (find && find.prefix) bot.prefix = find.prefix;
if(message.content == "@void zenith")
{
message.channel.send(`My prefix is \`\`` + bot.prefix + `\`\` for this guild!`)
};
``` my code
bot.on("ready", async () => {
let mongoDB = await MongoClient.connect(`URL`).catch(console.error)
console.log("Connected to Mongo")
bot.db = await mongoDB.db("Deku-DB")
})
@quartz kindle ^^
isn't it createConnection?
which npm library are you using to interact with mongodb
discord js
MongoClient so i'm assuming mongodb
the mongo library
mongoDB
this one? https://www.npmjs.com/package/mongodb
mongoose is too good
lmao
this one? https://www.npmjs.com/package/mongodb
@quartz kindle yes
ok
Anyone know how to give a user a role when someone @ them ive been having problems with it
message.mentions.has afaik
i dont exactly know what you mean tho can you elaborate tat
that
lol .txt
@quartz kindle i doesnt log
It must log something
Maybe an undefined
does "connected to mongo" log?
no errors?
only the collection aint define
defined
undefined
or smth
(node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'collection' of undefined
add a ready check on the beginning or the ready event
console.log("ready") in your ready event
(node:4) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
MongoNetworkError: failed to connect to server [cluster0-shard-00-01.6guyy.azure.mongodb.net:27017] on first connect [MongoNetworkError: connection 5 to cluster0-shard-00-01.6guyy.azure.mongodb.net:27017 closed
console.log("ready") in your ready event
@quartz kindle ok
where about? first or last
try with unified topology
where would i put that?
.connect(url,{useUnifiedTopology:true})
ok
@plucky harness many things you can use
whats the best
tmux and screen are terminal layers, they keep a terminal window open in the background
pm2 and nodemon are process managers, they manage the process for you
then you also have containers like docker and kubernetes
i personally use pm2
pm2 is not good for python it works great with java
@quartz kindle now its just saying collection undefined
any network error?
no
or any log at all
no mongodb connected thing
show full logs
show full logs
@quartz kindle how
k1 sec
did you give IP access to your machine by the way?
discord.py
How do I check for the next message from the author after a command has been run by him?
For example:
When The user says the quiz command The bot shows a quiz wiyh 4 possible options and the user needs to select one and when I used on_message event the event occurs the same time the command has been run so that doesnโt work
Ping on answer
@quartz kindle should i just make a new cluster?
@earnest phoenix thats just repeats of the same error
you need to look where your bot started
remove the code that causes the error, so it doesnt spam your logs
uhh ok
Thanks
@quartz kindle Nothing logs apart from it saying
2020-07-02T10:02:46.585121+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2020-07-02T10:02:46.692139+00:00 heroku[worker.1]: Process exited with status 143
2020-07-02T10:02:50.029095+00:00 heroku[worker.1]: Starting process with command `node Index.js`
2020-07-02T10:02:50.647637+00:00 heroku[worker.1]: State changed from starting to up
2020-07-02T10:02:50.000000+00:00 app[api]: Build succeeded
2020-07-02T10:02:59.924935+00:00 app[worker.1]: Deku Bot is online on 256 servers!
2020-07-02T10:03:00.136780+00:00 app[worker.1]: Server count posted!
you didnt remove the ready event code did you?
@quartz kindle wdym?
hey
i was watching a tuorial
on yt
if(command === "meme") {
await msg.channel.send("Fetching a meme, please wait a second!");
fetch('https://meme-api.herokuapp.com/gimme')
.then(res => res.json())
.then(json => {
let embed = new Discord.RichEmbed()
.setTitle(json.title)
.setImage(json.url)
.setFooter(`Link: ${json.postLink} | Subreddit: ${json.subreddit}`)
msg.edit(embed)
});
}```
This worked for them
but not for me
and yes i have done
const fetch = require('node-fetch');
and yes i have donwloaded the module
errors?
there has to be if it doesnt work
its not editing thats why
Your attempting to edit msg, which seems to be the input message
Not your sent message
Your attempting to edit msg, which seems to be the input message
@solemn latch
Oh
Wait
Then what's the sol ? Like
Because
He probably set it to a var, and edited it.
Just didnt show it
๐ค
YouTube programmig tutorials are like that
I checked twice

But @solemn latch it says message is not defined
You need to define it properly
Oh @solemn latch
u want to edit ur bot's msg?
It. Says rich embed
How could I then set the bot status to how many servers it is on for discord.js v11?
Is not
client.user.setStatus
I reccomend upgrading to 12 asap, v11 won't be work in a few months
What
@restive pebble i will with server count.
Does rich embed required a module ?
no
ok
client.guilds.cache.size
So why does it says that

it does but if you use { embed: { data } } then no
what is ur error
@restive pebble for v11?
oh
it does but if you use
{ embed: { data } }then no
@pale vessel
What module it needs I'll download
client.guilds.size --V11
oh
you'd want to require discord.js and use MessageEmbed if you're on v12
you'd want to require discord.js and use MessageEmbed if you're on v12
@pale vessel
But
There is no way
To insert image
In that
there is
what's the command
please read docs
.addImage?
setImage()
Then I have to replace whole code again by changing every thing ๐
just. the. replace. function. in. your. editor.
Really
replace them one by one
@restive pebble when i set it so, then is the status ${client.guilds.size}
if you want it to exist, yes there is
de-help
Ok
d-setprefix de-

@restive pebble Thank you โค๏ธ

oa
when i set it so then says its on 0 servers
is your bot on 0 servers? .-.
nope
it is
you define statuses outside of the ready event
so they are defined before the client gets ready
also, that status will never be updated
it will always reuse the same status that was defined


To be fair, it is in 0 servers before it logs in
next question
To he fair, it is in 0 servers before it logs in
@solemn latch
sry for pointing out kok
this girl is trolling me
How can I set rights for a "module.exports". Do you want to do it only for group: "SimpleVote-Perms"
Anyone that is able to help me out with oAuth? I am using the scopes identify, connections and guilds. For guilds I would like to check whether or not the user has administrator privileges or not.
guilds returns an array of the guild along with the member their permissions as bitfield. Does anyone know how to convert this back to check whether or not this user has administrator permissions or not?
you can do a bitwise and on the bitfield with the value of the admin perm and if the resulting value is non-zero the permission is granted
^ if(bitfield & 8)
Are there good explanations on bitfields on the internet, actually?
the one in mozilladocs is pretty good
ok
tf
what confussion tho
if(command === "gif"){
if(!args[1])
return msg.reply("**Kindly tell a keyword along with**")
let gifo = args.slice(1).join(" ");
fetch(`https://api.tenor.com/v1/random?key=${tenorapi}=${gifo}&limit=1`)
.then(res => res.json())
.then(json => msg.say(json.results[0].url))
.catch(e => {
msg.say('Failed to find a gif that matched your query');
// console.error(e);
return;
});
};```
can anyone help me
explanations for checking I made for xig some time ago
@delicate shore whats your problem
it's not searching
how u defined args lol
^
like this
ok
const args = msg.content.split(" ");```
what
How can set for this "module.exports = class PollCommand extends Command {" to require a groupname?
Sup
sup
@low phoenix wdym require a group name
class something extends lol{}
module.exports=something
const args = msg.content.split(" ");``` @restive pebble
How can set for this "module.exports = class PollCommand extends Command {" to require a groupname?
@low phoenix check ifthishas the property groupname and if not then throw an error
yes
const mArray =message.content.slice(prefix.length).split(" ")
const args = mArray.splice(1)
can u console.log(args)
const mArray =message.content.slice(prefix.length).split(" ")
const args = mArray.splice(1)
@restive pebble
Yes
Could somone help why my image sometimes goes out of embed?
Code:
const attachment = canvas.toBuffer()
let embed = new Discord.MessageEmbed()
.setColor(color)
.setAuthor(`Here is ${name}'s profile!`)
.attachFiles([new Discord.MessageAttachment(attachment, `profile_card_${name}.gif`)])
.setImage(`attachment://profile_card_${name}.gif`);
message.channel.send(embed)
He keeps getting rate limited
yeah
.
Hi
@delicate shore you're missing a query parameter
@earnest phoenix example?
/random?key=${tenorapi}=${gifo}&limit=1
its missing a &q
where?
and that gifo
@pure lion
When i have it so then i can't execute the command
@earnest phoenix weirdddd
ikr
@delicate shore key=tenorapi & q=gifo & limit=1
you have key=tenor=gifo & limit=1
@low phoenix I recommend using discord's permissions instead of names roles
oh
i did
ok
what do you mean goes out of embed
:thenk:
yes but if you do it again it goes out like it doesnt change
it dosent appear in setImage
the one in mozilladocs is pretty good
@quartz kindle could you link me?
if(command === "gif"){
if(!args[1])
return msg.reply("**Kindly tell a keyword along with**")
let gifo = args.slice(1).join(" ");
fetch(`https://api.tenor.com/v1/random?key=APIKEYHERE&q=${gifo}&limit=1`)
.then(res => res.json())
.then(json => msg.say(json.results[0].url))
.catch(e => {
msg.reply('Failed to find a gif that matched your query');
console.log(args);
return;
});
};```
ik
how to make my bot play music using JavaScript
encodeURI
@restive pebble ?
yrdl
what library
ytdl
eris or djs
how to make my bot play music using JavaScript
@wheat hornet Tutorials
@wheat hornet ytdl and ffmpeg
@delicate shore
and a stream dispatcher if discord.js
^
encodeURIComponent
@pure lion ya but its not playing music at all no errors also
i don't know eris
Send code
.on("finish",reason=>{console.log(reason)})
encodeURIComponent
@restive pebble what u mean?
can u link me to docs?
hmm
my pc switched off sooo ight ima unable
so, you come here, to ask for help
^
but can't provide code?
Smh
โฆ
Head my shake :e:
Ih ave this array with 1000 entries but it doesn't show the full array in the console any idea how I show it?
Uh
splice
Wut
or writeFile
No lol I need to see the whole array
yes
splice?
<array>.splice()
@pure lion and how can i set for only Administrator Permissions?
@low phoenix docs
member.hasPermission
๐๏ธ
xd

@restive pebble yes xd
๐ฅ
๐ฅฃ
Wait guys I am stupid
Are you??
I was using msg.replys
Niiice
lol
That is why gif wasn't working ๐
Jayjajayjajayjajayja
@pure lion search .
message.channel.send
I'm watching Netflix X))))
yt-search uses cheerio
so?
Wait it doe-
yes
@low phoenix captial
Boeing will you code my bot for me too
Oooo me too
lol

no

i want all the bot devs from here
fs.writeFile("./dropsarr.json", dropsarr, (err) => {if(err) throw err;}) why didn't it create a file?
to make one giant bot
Giant terrible thing
jsjsjsjjsjsjsjjsjs
Crash after crash
ceo of crash
written in like 5 different languages
yes
In my command
platform
ok im gonna make a screenshot command its gonna be hard but is it?
Make new file
I hope that english developer helps out
@misty sigil not rly it's just puppeteer
I was looking at it. Seems easy
@tulip ledge u doing on windows
English hard
I think I might use grafana to get some images for my bot
@tulip ledge u doing on windows
@restive pebble no he's doing it on French
ok
yes windows
no
console.log(fs.readFileSync("dropsarr.json", "utf8")); this is reading it
H m
so it does exist



