#development
1 messages ยท Page 343 of 1
-bots
@edgy dew
How do I avoid "TOO MANY REQUESTS" error when my bot is on a lot of servers 
does your lib not handle rate limits?
-bots
@mellow wagon
-bots
@blissful gate
-bots
This user has no bots
ok
-bots
@keen copper
owo
So what are guilds used for? the coding i mean
I mean like { "id": "41771983423143937", "guild_id": "41771983423143937", "name": "general", "type": 0, "position": 6, "permission_overwrites": [], "nsfw": true, "topic": "24/7 chat about how to gank Mike #2", "last_message_id": "155117677105512449", "parent_id": "399942396007890945" }
How to make the bot profile image to bounce?
just look at the source code
i need some help with my discord bot
await channel.overwritePermissions(role, {
^^^^^
SyntaxError: await is only valid in async function
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
it throws this error
but how do i fix it ...
hello
how can i get the count from the voice channels and text channels?
who can help me with that
what lib
js
that's language, not library
discord.js
channels.size
no, you'll have to filter the channels collection to return ones of a certain type
hmm
i have a problem again...
(node:15752) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'has' of undefined
(node:15752) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
sure
sec
.addField("Channels:", guild.channels.size, true)
.addField("Voice Channels:", guild.channels.size.voice, true)
.addField("Text Channels:", guild.channels.size.text, true)
@rich kiln
https://discord.js.org/#/docs/main/stable/class/Collection?scrollTo=filter you need to filter
@steel shoal I will only spoonfeed once 
msg.guild.channels.filter(c => c.type === 'voice').size
@earnest phoenix thx i test it
no worries 
๐
.size.voice wouldnt even be a thing.
getting an error when trying to post guild count 
StatusCodeError {name: "StatusCodeError", statusCode: 401, message: "401 - {"error":"Unauthorized"}", error: Object, op
looks like you're unauthorized
^
I would check your authentication methods
obviously not, I'm only suggesting a double check
hmmm
function postServerCount() {
return request.post({
uri: `https://discordbots.org/api/bots/${client.user.id}/stats`,
headers: {
Authorization: "token",
},
json: true,
body: {
server_count: client.guilds.size,
},
});
}
tonk
why is it Authorization instead of "Authorization" 
where's strings I want strings
I'm not used to this reeee

function hi(){
let a = "1";
const db = await sql.get(`SELECT * FROM something WHERE something= ${something}`);
a = db.something;
return a;
}
How can I make the function actually return the value instead of { Promise <pending> }? 
I can console.log a and do stuff with it fine but I cant return it
you'd need to make your own promise and then resolve it
promises are sexy
No
@jagged plume but the async/await is already a promise eh?
which is why it returns promise?
the function hi() is synchronous
(node:769) ExperimentalWarning: The http2 module is an experimental API.
anyone knows what this issue can be?
it's just a warning
Hey guys! How can I get ids of reactions in discord?
reaction event
same here
@earnest phoenix thats from snekfetch using the "new" http2, you can completely ignore that
node.js is a bitch and shows that when snekfetch requires it
i see
thanks for the help :)

any1 know the fix 2 this?
code is:
const { inspect } = require('util');
exports.run = (client, message, args) => {
const { logger } = message.client;
snekfetch.get(`http://artii.herokuapp.com/make?text=${args.input}`)
.then(ascii => {
if (ascii.text.length > 1999) return message.edit('Output too long. Try shorter text.').then(message => message.delete(2000));
return message.channel.send(`\`\`\`${ascii.text}\`\`\``);
});
}
isn't there some js module for ascii?
yes, move to py
py better
yeah ok
@elder badge i guessing that args is an array then args.input won't work
so what do i put instead? @restive silo
args is an array
yep
you want to get the array as string
so?
jeez you guys really dont know js, <Array>.join() is a thing
well actually i don't really mess around with things like this
ik i'm starting lol
k
^ if you want read more
ok
Do you know why when I use links to load tracks from yputube bot sometimes can add another track?
sendErrorMsg(event, new EmbedBuilder().setColor(Color.RED).setDescription("Invalid source"));
return;
}
String input = Arrays.stream(args).skip(1).map(s -> " " + s).collect(Collectors.joining()).substring(1);
input = "ytsearch: " + input;
loadTrack(input, event.getMember());```
you always tell it to search
This is possibly dumb but i've been trying to make something like `if (args[2] !== "x" || "y") message.channel.send("z")?
String identifier;
try {
new URL(args[0]);
identifier = args[0];
} catch(MalformedURLException e) {
if(args[0].equals("soundcloud")) {
if(args.length == 1) {
showHelp(context);
}
identifier = "scsearch:" + String.join(" ", Arrays.copyOfRange(args, 1, args.length));
} else {
identifier = "ytsearch:" + String.join(" ", args);
}
}```
@unreal tusk
args being user input
@mighty barn if (args[2] !== "x" || args[2] !== "y")
mhm
does not seem to function properly?
case "test":
if (args[2] !== "x" || args[2] !== "y") return message.channel.send("a");
else message.channel.send("z");
@inner jewel can you tell me more?
that checks if the input is a valid URL
if it is, it gives the input to the loadItem method
else it prepends the search prefix
If i enter valid url, jda can load some other video
equalsIgnoreCase
and if i enter url like www.youtube.com/... it can envoke exception
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is unavailable.
@fervent goblet It's called figlet
@elder badge That means that there is no text property in ascii variable
@earnest phoenix I fixed it anyway
k
@earnest phoenix no
yes
as a string?
args.input was undefined probably
hmm ok
@inner jewel Jda also gives me random youtube video with your code
How can I do it?
Of course, I forgot about it ๐
How i can make so the bot sends a DM to a specific user?
hi
Pyfiglet
what about it
nuttin
ok
need help
});
^
SyntaxError: Unexpected token )
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
[nodemon] app crashed - waiting for file changes before starting...
Remove ) and try again
fix your brackets
but were
i havent got line 80?

yeah
Try ctrl + f and then });
And try to remove ) on all of them
But one at a time
And then restart the bot
few
but i founded it
removed it
reloaded
C:\Users\nicolietsa personal\Desktop\security-bot\bot.js:14
};
^
SyntaxError: missing ) after argument list
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
๐คฆ
});
^
SyntaxError: Unexpected token )
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
now this
i think its this
bot.generateInvite(["ADMINISTRATOR"]).then(link => {
console.log(link);
}).catch(err => {
console.log(err.stack);
});
its 10 to 14
i did that alredy..
Hm
});
^
SyntaxError: Unexpected token )
at createScript (vm.js:80:10)
o at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
i did that on tutorial and all was right
hmm
and still error...
I don't know
and i shoud get it ready for tomorrow
i have this right, how would i be able to use the data wherever i want it
@topaz fjord Host it on a VPS
then use nginx and proxy_pass to hide IP of VPS
on a website
@earnest phoenix waht i mean is how to move a specific part of the json data
like if i make a header called Command Count, and move the command count number under that header
an HTTP header?
kk
make an HTTP request to the API, then set the data of the text to the command count
does this change if im using request
well first
the image you sent
that is not a proper API response
that is using HTML
you can't use HTML in JSON
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send({
server_count: bot.guilds.size,
user_count: bot.users.size,
command_count: bot.commands.size,
channel_count: bot.channels.size,
uptime: moment.duration(bot.uptime/1000, "seconds").format("d [D], h [Hrs], m [Mins], s [Secs]")
});
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);
});
im doing it like that
ok then
nvm
but still, make an HTTP request to that API, then set data of the element to command count
hi
hi
pass the mayo
no
how would i set the data of h1?
javascript
well
setting a element's data using node.js
LOL
don't think you quite get this
^
if you used it in the back end using Node.js, then there is no point for an API
the element modification has to happen in web javascript
^^^^^^^^^
@topaz fjord should look at a service called data dog
http://can-you-plz.givemefish.com/files/MYVm8hSvvYAd.png like this what ive got running off them
nope
just a email
im on free tier
the limit is 5 monitors and yet doing what i do doesnt even count as a monitor cause i jsut add data over api only thing i guess thats limiting is data retention is 24 hours
0_o
am i on the wrong site?
could do signup with google?
i got signed up on a promtion and got free stuff
my company as Hobby
yeah
https://www.npmjs.com/package/dogapi so this one lets you run over the api otherwise all other clients ive seen (probably more) all use the datadoglocal server which in my opionin is just luggage cause that collects stats then uses api to send :?
you had to download the installer right?

how do you make your bot edits its own message
message.channel.send().then(m => {m.edit("Edited Message here")})
spoonfeed.exe
XD
i jsut want to know how to make your bot edit its own messages mutiple times?
const hi = await msg.channel.send("hi");
hi.edit()
hi.edit()
hi.edit()

ur msg handler will need to be async tho
i use command handlers
client.on("message", async message => {
});
Oh
Then
Async
:^)
If u dont wanna use async/await, you can nest a bunch of .then() functions
Not recommended
idk whats wrong with this code or im jsut retarted
const Discord = require("discord.js");
const responses = [
'Yes',
'Absolutely!',
'No',
'Out look Good',
'What?',
'Hopefully',
'Hopefully not',
'I Dont Know',
'Ask another question',
'Haha, funny joke',
'Hell No',
'Ohhhh Yes!',
'Certain',
'Uncertain',
'Yes Baby',
'Bitch No'
];
function randomItem(array) {
return array[Math.floor(Math.random() * array.length)];
}
exports.run = (bot, message, args) => {
if (args.length < 1) {
message.channel.send('**Please specify something to ask of the magic 8-ball**');
}
else {
let response = randomItem(responses);
const ball = await msg.channel.send("8ball | .");
hi.edit("..")
hi.edit("...")
hi.edit(`Magic 8ball: ${responses}`)
message.channel.send(`${ball}`)
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [''],
permLevel: 0
};
exports.help = {
name: '8ball',
description: "Ask a question",
usage: '8ball'
}
this is right?
no
return array[Math.floor(Math.random() * array.length)
also
const ball = await msg.channel.send("8ball | ."); hi.edit("..") hi.edit("...") hi.edit(Magic 8ball: ${responses})
how do i fix it?
why are u returning an array of a random number
of an array
ah
I see
nvm
ok
next
?
this is more minor
but
when you edit the message it should really have 8ball |
before it
is there an error?
yes
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
vm.js
??
line 10 vm.js?
uuuh
i jsut want to edit my bots own message mutiple times
how do i do that with this code?
const Discord = require("discord.js");
const responses = [
'Yes',
'Absolutely!',
'No',
'Out look Good',
'What?',
'Hopefully',
'Hopefully not',
'I Dont Know',
'Ask another question',
'Haha, funny joke',
'Hell No',
'Ohhhh Yes!',
'Certain',
'Uncertain',
'Yes Baby',
'Bitch No'
];
function randomItem(array) {
return array[Math.floor(Math.random() * array.length)];
}
exports.run = (bot, message, args) => {
if (args.length < 1) {
message.channel.send('**Please specify something to ask of the magic 8-ball**');
}
else{
let response = randomItem(responses);
message.channel.send(`:8ball: | **${response}**`);
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [''],
permLevel: 0
};
exports.help = {
name: '8ball',
description: "Ask a question",
usage: '8ball'
}
you have an error with your handler somewhere
I would just use .then
i literally just told you how to fix it
lmao
XD
he is using the idiots guide
everyone using discord.js seems to use it
just letting you know that command handler is complete shit
lol
XD
and doesnt work with most functions
ive made my own one using classes now and i like it
For example
exports.conf = {
enabled: true,
guildOnly: false, <==== Does jack shit
aliases: [''],
permLevel: 0
};
subcommands with their own functions and stuff
ok
No it doesnt
yes...?
Nope
He is using the idiots guide handler
THE handler doesnt have anything for that to do
That option is completely useless
Doesnt do anything
@jagged plume Look at this
Find were it says guildOnly inside the message.js event
i found the issue and i fixed it
and i put this
const Discord = require("discord.js");
const responses = [
'Yes',
'Absolutely!',
'No',
'Out look Good',
'What?',
'Hopefully',
'Hopefully not',
'I Dont Know',
'Ask another question',
'Haha, funny joke',
'Hell No',
'Ohhhh Yes!',
'Certain',
'Uncertain',
'Yes Baby',
'Bitch No'
];
function randomItem(array) {
return array[Math.floor(Math.random() * array.length)];
}
exports.run = (bot, message, args, async) => {
if (args.length < 1) {
message.channel.send('**Please specify something to ask of the magic 8-ball**');
}
else{
let response = randomItem(responses);
const ball = await message.channel.send("8ball | .");
ball.edit("..")
ball.edit("...")
ball.edit(`Magic 8ball: ${responses}`)
message.channel.send(`${ball}`);
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [''],
permLevel: 0
};
exports.help = {
name: '8ball',
description: "Ask a question",
usage: '8ball'
}
and this is the error
const ball = await message.channel.send("8ball | .");
^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at jsfiles.forEach.f (C:\Users\narnia\Desktop\Vortex test\test.js:25:17)
how do i fix?
do you have an async message evengt
im useing a command handler
how do i put a async message event in a command handler?
nvm
hi
Hey peeps?
I has a quesstiioonnn
How can I set an interval to last only a certain amount of time?
Hows this look?
like mine execpt you got round to making it look good ๐
lol
l
the animation looks off
loooks better
can't think of any
ok
@The Darkness Soldier#1418 do not try @shy rose's method
It doesn't work
that is not proper JS
its not intended as a copy paste
i dont know the code to put in
You knew it was invcorrect?
incorrect*
but you didn't bother to fix it?
sounds like a bad coder to me
:/
thanks...
lol
its called giving a gist not spoonfeeding
It isn't a gist
not a git gist
then what is a gist?
also whats actually wrong with that code?
the setTimeout thing
The interval would immedientally stop
wouldn't get time to run
The first argument of setTimeout is a function
but you're not providing one
you're giving it an object
which it can't handle
0_o that persons left the server
var x= setInterval(stuffHere)
setTimeout(()=>{clearInterval(x)},TimeHere)
you happy now?
?
How about you make sense of what I said lol
I couldn't say it any better
You don't need the { and } around the clearInterval part
i know what you mean but whats the point even the person has left the server
if they come back then by the moring there will be like another 6 million messages here
and cause ive said that there will only be like 5 messages....
Probably not many messages yes
Do you know why JDA gives me exception when I try load music track by youtube link?
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is unavailable.
@earnest phoenix mass spamming edits can be api abuse
Can someone help me with getting a username with oAuth2
Show us how it works
Try making a ping pong bot
discord bot maker UI is better than steam's
Tbh it kinda is
^
tbh discord bot maker is shite
the audio tools are fucking awful
and makes everything 10x harder somebhow
its nothing but a super customisable bot
it would be easy to create something like this without the ui
in any language
Can anybody help me? I am trying to figure out ow to send a user's profile image with discord.js, but cannot figure out how
Ok but how does it work? I already tried this message.channel.sendMessage({file: user.avatarURL});
message.channel.sendMessage(user.avatarURL);
No it's not working
user.avatarURL is undefined actually...
wait
ok I got it thanks
This is going to sound dumb but how do I make my bot respond to mentions?
you can check if any user's first mention is the bot's
or just check if a message begins with the mention
np
How can I get the last redirect url of a url? I wanna block those spoopy discord.me discord.li discord.io links ๐
Node.js
Hey, is there any python developer in here who could help me develop a new project I'm working on? Please DM me for more information!
if(message.content.contains("discord.io"))
@thorny hinge
Validate?
yes ._.
nice
Hmm
So many bots just check if it includes something but I validate them 
cus your bot is so much better 
Found a redirect npm module ๐
lol
not***
npm is pretty much an easier and lazier alternitive to ctrl-c and ctrl-v
lol
holy fuck 2k festival coins in pokemon ultra sumo
for global event
lets participate
i need sum help
With
public static void postRequest(String url, JsonObject jo, String auth){
try {
HttpsURLConnection con = (HttpsURLConnection) new URL(url).openConnection();
con.setRequestMethod("POST");
con.addRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Authorization", auth);
con.setDoOutput(true);
con.getOutputStream().write(
jo.toString().getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}```
this code doesn't work for posting stats
public static void postStats(){
try {
JsonObject jo = new JsonObject();
jo.addProperty("server_count", Cuberz.getBot().getGuilds().size());
postRequest("https://discordbots.org/api/bots/364678314108911616/stats", jo, TOKEN);
}
catch (Exception e) {
e.printStackTrace();
}
}```
Is that java 
yes
aaaaaaaa
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
@thorny hinge know why it doesn't work ?
how can I add reactions using JDA?
is "message" defined in the same scope
ok
yeah
put args and command
inside the message event ๐
hi
Hey, is there any python developer in here who could help me develop a new project I'm working on? Please DM me for more information!
Hey gyus! How can I add reactions using JDA?
reading the docs usually helps 
nope ))
I have a question
How do the other bots have an organized command list
like each command has a separate file
Any idea how thats done?
JavaScript
Wdym?
Okay
I want to make each command a different file
Alright
Except I don't know how they will be linked.
Okay thanks
global.client = client
require('./Folder_Name_Here/file_name_here.js');
You can keep adding requires for all the files
You dont need to keep adding a global client
And if its in multiple folders
Just keep going down a layer
If you get what I mean
I do
๐
It should work I guess, thanks, I forgot to add a global var
Np and rip
Hey guys?
I have a question
How do I assign a global variable to use accross all files
How do I make the bot respond to mentions?
Jack?
Can someone help me?
?
Inb4 this is the new dapi
wut lang
But it should still send a message
ye djs
if(!message.guild)then => {
(message.channel.send("This command does not work in DM's!"))
return;
}```
Thats what I got so far
It works in a guild but I get ```
if (nowplaying[message.guild.id]) {
^
TypeError: Cannot read property 'id' of null```
if its not in a guild
I dont know anything at this point
do you come from vb?
vb?
just curious about your use of then
I dont know how to use then
then isn't a keyword in javascript
conditionals are just
if (/* condition */) {
//action
}
Ok
but did the message send?
can we get some more context?
perhaps you aren't registering the listener properly or something
Sure
case "queue":
if(!message.guild)then => {
(message.channel.send("This command does not work in DM's!"))
return;
}
var iconurl = bot.user.avatarURL;
if (nowplaying[message.guild.id]) {
var video = nowplaying[message.guild.id];
var server = servers[message.guild.id];
var desc = `**Currently Playing:**\n${video.title}\n\n`;
for (var i = 0; i < server.queue.length; i++) {
if (i == 0) {
desc = desc + "**Queue:**\n";
desc = desc + `**${i + 1}.** ${server.queue[i].title}\n`;
}
else {
desc = desc + `**${i + 1}.** ${server.queue[i].title}\n`;
}
}
var embed = new Discord.RichEmbed()
.setAuthor("Queue", iconurl)
.setColor(0x7289da)
.setDescription(desc)
message.channel.send(embed);
}
else {
var embed = new Discord.RichEmbed()
.setAuthor("Queue", iconurl)
.setColor(0x7278da)
.setDescription("No music is currently playing.")
message.channel.send(embed);
}
break;```
Thats the entire command
if (message.channel.equals(Discord.DMChannel)) return (message.channel.send("This command does not work in DM's!"));
That shall work shouldn't it?
I can try it
but why bother
checking for the existence of message.guild should be enough
navigating up the prototype tree is just wasting cycles
mhm probably, just giving some other ways it could work with
That didnt work
@quiet bobcat are your other commands working?
The ones that arent based around guild actions are
remove the then => and see if it works
there's absolutely no reason it shouldn't
I hardly understand why that doesn't throw syntaxerror in the first place
Is there a RPC extension for Eris?
no
for real :(
How to make so the bot sends a DM to a specific user (not the message author)?
well what specific user is that
me
on startup, retrieve and store a reference to your own user
then just use that to send dms
Why is general locked?
spam
Oh
@lethal sun js bot.users.get(userID).send("blah");
how do you download ffmpeg?
like how to set it up and all that
lol
ok
k
but
when i downloaded it
it says it cant fined ffmpeg as an error
nvm
nvm
wait
XD
yea
ut says it cant fine ffmpeg
y?
you're running a *nix os?
are you running the bot on your windows machine then?
what?
like, where are you running your bot
on my computer XD
...your windows computer?
yep
so open command prompt and run ffmpeg -version
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --e
e-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --e
e-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm -
ble-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-l
enh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-l
xr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-lib
is --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-
vid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
rip ffmpeg
all i would do is download ffpeg
from the site
so obviously you wrote some code that throws the error "FFMPEG not found"
we want to see that code
ok
client.on('message', async msg => {
if (msg.author.bot) return undefined;
if (!msg.content.startsWith(prefix)) return undefined;
const args = msg.content.split(' ');
if (msg.content.startsWith(`${prefix}play`)) {
const voiceChannel = msg.member.voiceChannel;
if (!voiceChannel) return msg.channel.send('You need to be in a voice channel!');
const permissions = voiceChannel.permissionsFor(msg.client.user);
if (!permissions.has('CONNECT')) {
return msg.channel.send('I can not connect to your voice channel!');
}
if (!permissions.has('SPEAK')) {
return msg.channel.send('I can not speak in this voice channel!');
}
try {
var connection = await voiceChannel.join();
} catch (error) {
console.error(`I could not join the voice channel: ${error}`);
return msg.channel.send(`I could not join the voice channnel: ${error}`);
}
const dispatcher = connection.playStream(ytdl(args[1]))
.on('end', () => {
console.log('song ended!');
voiceChannel.leave();
})
.on('error', error => {
console.error(error);
});
dispatcher.setVolumeLogarithmic(5 / 5);
}
});
bro it took you like 3 sec to look at it XDD
then y doe it say
ok
Any python developer interested in working with me on a new project? DM me if you are interested!
you're using ytdl-core, I assume?
yeah
he is
yesim using ytdl-core
thne y does it sayyyyyyy ffffmmmpeeeeeggg notttt foooouuunnnndddd
lol
i did that dosent work
u have to be kidding
?
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --en
e-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --en
e-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --
ble-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li
enh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-li
xr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libv
is --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-l
vid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
i did ffmpeg -v
npm i -g ffmpeg-binaries
@blazing star did that doesnt worrrrk
just do it
i already told you
IT WORKS
omfg
soz im getting triggered
I don't get it
dont say something if you know it doesnt work for me cuz i said "It doesnt work"
neither d.js nor ytdl depends on ffmpeg
yeah
im saying that to @blazing star
where is your error coming from
Any python developer interested in working with me on a new project? DM me if you are interested!
@earnest phoenix seriously nothing in that code can ever throw FFMPEG not found
aren't you logging the error or something
omg nvm i dont even know wtf you guys are saying
fuu fuu
Spotlight
same tbh
how would you set a mention prefix in discord.js?
if message.mentions.members.first().id === client.user.id ?
@low niche use a RegExp
ok
How to add Servercount?
Ok ty
so uh
ill ask here
need to make a mute command
ive created a mute role but im not sure how to change channel permissions using js
@floral stump something like this
message.guild.channels.map(e =>{
message.guild.members.map(f =>{
e.overwritePermissions(f, {
SEND_MESSAGES: false
})
})
});
@low niche don't use @languid dragon's example, it is broken
that won't work either
honestly its untested and im not 100% sure
@sinful meadow can you explain what map does
so imma continue doin my thing ๐
map iterates over an array
And sets the values to the result for the function of the map argument
im actually having a hard time understanding the code he sent me
you know im on it
look at MDN
no i get the code
but im trynna change perms for a role and he didnt define it in the code which is why im havin a ahrd time
a!invite
@sinful meadow not true
yes it's faster but it's different
It can fuck up your whole array if used incorrectly
how do I make this work?
if variable in (list or list or list):
print("hi")
so, you want to iterate through 3 lists at once?
yeah kinda
ah I see, thanks
Lib? @earnest phoenix
that has nothing to do with lib
Im asking because i could of help lmfao @fervent goblet
the lib has nothing to do with this
eh
you won't be able to support more if u know the lib
it's just on the programming language side of things
oh ja tuurlijk, vergeten ๐ฆ
thank you all!
actually that's a really bad solution
?
you should just do
if thing in list1 or thing in list2 or thing in list3:
pass
concatenating the lists is inefficient
But that's a messy "if" statement, I'd rather go with zip
looks cleaner, is cleaner
How do I get my bot back onto this server?
It got kicked for a token leak, which got fixed (weird cause we didnt see any token on our github)
DM mods
ah okay
I fixed sniperbot. How do add it back?
By going to the website and re adding it?
ok
lol
somehow, my bot isn't responding with any errors with the eval command here: https://hastebin.com/qelodenita.js
let ids = client.config.bot.ownerids
for(var id in ids) {
if(msg.author !== id) return;```
should be continue
lmao
uh...cant ppl read? this is a channel for development not a bot-support channel 
๐ค
@low niche oml
that eval is cancer
You dont even hide any sensitive information
neither i
No people cant read at all welcome to Discord
lol
i mean who really every reads them theve been around for ages
oi, ik this isnt related to any topic but how do I create a request api? 
@earnest phoenix you mean you want to make a restful server?
oh restful that makes more sense
Yeah well sort of
An api that you can post to and also get information from
sort of like DBL's api
yes that would be a restful server
thats a resful one then?
except think of it as a blocked list
what language do you plan on using for it?
try express
ay know that
Ok
yeah express is good
there's also restify
i think it's meant to be more lightweight than express
whats the diff in output?
but i've never done a comparison personally
(ive never looked at or heard of restify)
Is there any way to store a php api in a json based bot?
what does "store a php api" mean anyways
who here knows bulma
mhm, I know
trying to find the right item for something that will eventually be a soundbar (e.g. play/pause buttons, volume slider)
I mean, is there any way i can use a php api with json discord.js based system?
looked at columns, but those auto-center
@earnest phoenix what kind of storage format does your PHP API return
is it XML, is it JSON
i'm looking to get an api at rule34.xxx
/index.php?page=help&topic=dapi
don't want to link as it it'll embed
they return in JSON IIRC
so the fact that it's a "php api" doesn't matter



