#development
1 messages · Page 372 of 1
nep
For some reason my FFMPEG keeps uninstalling for my host
content?
content is a thing in css
and that should work
cascading style sheets its used for designing webpages
@digital stratus DMs
what
Sorry i am french x)
X)
ban all french people kthxbye
OwO what's this
OOOOOOOOF
Same
yes
well if youre referring to this monstruosity
{if boolean join == true
say "Hy {Playername} "}
I kinda agree its shitpost with code here
what lib is that
lang I'm guessing you mean
idfk the french guy posted
i don't think that is any actual lang
it's a mess
It is an actual lang
even python looks better than that 
because if == true
Its the "Spaghetti Code" lang 
🤦
hey its ugly that's a valid reason
🆗 sir 
but i mean yeah what lang is that 
ask ur friend, he's french
Spaghetti Code my guess would be JS
i will never have any french friends ffs
this is just not JS
i mean nothing looks like it
oof
needs to be a new lang
well i thought he asked for help with it
so yeah knowing what lang is it could help lul
could we actuall stop now discussing which lang this code is and go on, aslong as he doesn't provide any usefull info we cant help anyways
System.out.print "trolololololololololololo"
Sorry but i less the System.out.print ...

okay so this chat is for actuall developemnt discussion/help, if you just meme around or cant properly speak english you should move to #memes-and-media
...
package fr.discord.bot;
import net.dv8tion.jda.core.JDA;
import okhttp3.*;
import org.json.JSONObject;
import java.io.IOException;
public class PostStats {
private static final OkHttpClient CLIENT = new OkHttpClient();
public static void toDiscordBots(JDA jda, String api_key) {
System.out.println("Posting servercount to discordbots");
String url = "https://discordbots.org/api/bots/"+jda.getSelfUser().getId()+"/stats";
JSONObject data = new JSONObject();
data.put("server_count", jda.getGuildCache().size());
RequestBody body = RequestBody.create(MediaType.parse("application/json"), data.toString());
Request request = new Request.Builder()
.url(url)
.post(body)
.addHeader("User-Agent", "DiscordBot " + jda.getSelfUser().getName())
.addHeader("Authorization", api_key)
.build();
try {
Response r = CLIENT.newCall(request).execute();
System.out.println("Posted server count, response: " + r.body().string());
} catch (IOException e) {
e.printStackTrace();
}
}
}
``` I don't understand, how that fonction
require 'discordrb'
bot = Discordrb::Bot.new 'email@example.com', 'hunter2'
bot.message(with_text: 'Ping!') do |event|
event.respond 'Pong!'
end
bot.run
@earnest phoenix okay so the fun is over now, if you continue posting code with no context in here and meme around i will mute you
Sorry :/
How do you add an item to an array I forgot lmao
you can look it up there 
I wonder about bot best practises, if I have no permission to send the help document in the current text channel, should I silently fail or use the DMs?
¯_(ツ)_/¯
preference i'd say but it is useful to alarm a guild if your bot doesn't have the correct perms to avoid confusion
hmmm
I will default to the text channel
use DMs as fallback
and silently fail if I cannot send in either
yeah, defaulting to dms is extremely annoying so I suggest setting your bot's default to text channels
yw
I use default for dm
same
send nude
Hello! How can i get through JDA amount of online users? Any method?
from guild?
Yes
sec
guild.getMembers().stream().filter(user -> user.getOnlineStatus() == ONLINE).toArray().length
Thank you very much!
np~
no need to use toArray
you can and should just use count()
it won't create a temporary unneeded array
@opaque zinc @earnest phoenix
@fathom zodiac

😢
@modern kelp get out of here if you aren't going to stay on topic
k
how do i see if discord message contains something
message.content.includes
thanks
Is it possible to see if the user voted today using dblapi.js?


yes it is with the "days" field on the Get Bot's Votes endpoint
@restive silo thanks


This might sound stupid but how do I send a message in a text channel
msg.channel.send (depending on your lib)
Like when a guild is added then in this channel it sends a message
Ik how to do that
guild.channels.useAMethodToGetTheChannelYouWant().send(...)
useAMethodToGetThrChannelYouWant wow that’s long
guild.channel.find(‘18849939187384’).send(...) ????
@uncut slate
It says Cannot read property or send of undefined
Of
Does it matter if I put it around speech marks? @uncut slate
what?
If I put the channel id in speech marks does it matter
what's a speech mark
no, it doesn't matter unless you have '"
So it has to be ‘
no
if the guild you're running .get(ID) doesn't have that channel in it, it won't find the channel
what are you asking
guys how to make bot
whats wrong with this
// This event triggers when the bot joins a guild.
console.log(`New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
guild.channels.get("413075117338525696").send(`New server added:\nGuild name:\n${guild.name}\nID:\n${guild.id}\nMember count: ${guild.memberCount}`);
client.user.setGame(`on ${client.guilds.size} servers`);
});```
@drowsy yarrow get out of here
okay sorry ┬─┬ ノ( ゜-゜ノ)
if that guild doesn't have that channel, it'll throw
if that throws "cannot read property send of undefined", that channel doesn't exist on that guild
unless you're screwing with the cache or something
Where do put the guild
I want it to send a message in my choice of Text channel
then just do client.channels.get(id).send(...)
No error and said nothing hing
I blame PEBKAC
I blame aetheryx
Why it not send message
pebkac
Wat
patat
That’s makes no sense to me
I don't know why it didn't send it
if it didn't log an error, assume the code wasn't ran
show code m8
console.log(`New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
client.channels.get("413075117338525696").send(`New server added:\nGuild name:\n${guild.name}\nID:\n${guild.id}\nMember count: ${guild.memberCount}`);
client.user.setGame(`on ${client.guilds.size} servers`);
});```
Nothing wrong with it
what are you doing to trigger it
When a guild is joined
no but, how are you triggering it yourself
I’m adding it to my guild then removing it
no need to remove your bot every time
And when it joins is triggers a error or nothing
just restart it
no? @trim plinth
?'
for guildCreate events you need to kick and reinvite the bot, or use eval to emit the event synthetically
o ok
I don’t have eval
what's the error
then your client doesn't have that channel cached or the ID is wrong
cached what you mean
would Java work for bot
sure
sure, whatever you prefer
ok
hey
btw has therebeen java things in this channel?
We don't get many Java questions, no
Hello, would anyone here like to be a bot-tester for @dense inlet. Helping will result in extra permissions and perks on my bot.
#development isn't the right channel for this
ok
msg.mentions.members.first().user or something similar 
seems legit
.
Do collections have a .first() method
yeah
How can I create music commands, with queues and those things? Discord.js
Is it ethical to have my bot create a 'Muted' role on server join or should I make it so that the server has to make the Muted role because I'm currently having trouble making my bot create a role so I was wondering if I could just make it so the server has to make the Muted role (I would like some input on this)
Server admins should setup the role
mk, ty
ok so I have this code but it brings back a promise rejection when I run it (this is an unmute command)
im bringing the error one sec
MANAGE_ROLES_OR_PERMISSIONS is not a valid permission string 
thats the error right 👀
ok that wasn't the error lol
I swapped the permission string and got this same error
yes
and if I don't it returns a message saying so
the mute command works fine for some reason though
which is weird
wAIt
I spot a fuckup in my code once more
:/
related to development: how do I heccing use log
¯_(ツ)_/¯
i need help don't know my error
what is the error?
^
('unexpected indent', ('/home/maxguest2002/Documents/Bot/cogs/natsu.py', 48, 12, ' await self.bot.say("ฅ^•ﻌ•^ฅ 🐱 {} ,Miaw ฅ^•ﻌ•^ฅ ".format(author.mention))\n'))
and am using python 3.6
Guys, how can I get total permissions count for my bot in some guild?
Which lib
Custom, php
so.. no lib..?
let helpcommand = args.slice(0).join(" ");
if(helpcommand === "invite") {
message.channel.send("It works");
return;
}
if(helpcommand === 0) {
message.channel.send("...");
return;
}
}```
how do i define the 0
like if i just type !test
wait. .
wat do u want???
oh. . .
u want it like this
!help <type of command>?
@XkijuX#6667
yea @earnest phoenix
but i want !help alone to aslo type something
so how do i define the `null`
ok. . .
🤔
try to use
if(!args[0]) return message.channel.send(":x: Memes enter a type of command pls")
if(args[0] === "help") return message.channel.send("Usage: !help - Opens this menu")```
It works thx
var typeofhelp = args[0].toLowerCase(); //this will make the command not CaSe SEnsiTiF
//example: !help HELP it will swicth the "HELP" -> "help" making this much nicer
if(!typeofhelp) return message.channel.send(":x: Memes enter a type of command pls")
if( typeofhelp === "help") return message.channel.send("Usage: !help - Opens this menu")````
ahh i see
i forgot about the case sensitive
@earnest phoenix but whats the difference between using var and let
im not sure
ok
@low rivet yeah, no lib
@earnest phoenix why do i get this error TypeError: args.slice(...).toLowerCase is not a function at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\test.js:3:33) at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17) at emitOne (events.js:116:13) at Client.emit (events.js:211:7) at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34) at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65) at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35) at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17) at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16) at emitOne (events.js:116:13)
u dont need to cut the args
you're trying to use toLowerCase on an array
also. . . u need to hv 2 vars
forget that
this is the errorTypeError: Cannot read property 'toLowerCase' of undefined at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\test.js:4:26) at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17) at emitOne (events.js:116:13) at Client.emit (events.js:211:7) at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34) at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65) at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35) at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17) at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16) at emitOne (events.js:116:13)
if(!typeofhelp[0]) return message.channel.send(`These are the commands you can use \`8ball, invite, logo, member, ping, plans, request, say, setgame\``);
that line is the problem
it wont understand the tolowercase function
Can anyone help me with forEach?
ask away
this is #development ask any dev question @gleaming summit 😃
@versed cliff python is VERY strict on indentation
guide??
var messageToBroadcast = args.slice(0).join(' ')
const guild = member.guild
const channel = guild.channels.find(c => c.permissionsFor(guild.me).has("SEND_MESSAGES"))
guilds.forEach(c => c.permissionsFor(guild.me).has("SEND_MESSAGES") {
channel.send({embed: {
color: 3447003,
title: 'broadcast',
description: `${messageToBroadcast}`
}})
})
guild
mistake
But other guy said to me
🤔 the only way u can do it as i remember is find a channel and send it
forEach was incorrect
.has() returns an boolean
🤔
@frail kestrel Thanks
push the circled bit back to where author = is
@gleaming summit your syntax is a bit strange
@restive silo is || does it mean or or and? in js
Yea. I didn't learn JS
|| means or
u copy/paste??
ye
ok ty
@gleaming summit if u didnt learn js u mean u copy/paste?
@gleaming summit then you need to learn it instead asking in here 

I didn't copy/pasted
So I make a code by some other codes
I can write some codes
like
simple
things
pls send the message in 1 sentence pls. . .
k
okay so i give you the actuall best tip i can give anyone in here rn, if you dont understand javascript completly, making a good Discod bot will be a pain in the ass and you will actuall not get quite far.
🤔 u will only get to an auto responder 😆
But I am understanding York's guide.
ok. . .
yea because he made it for idiots but you should still know all of the basics to improve yourself
k
or read the docs
because yorks code might be simple but is not the best way at all
unless youre me
🤔
u get eaten @earnest phoenix
it has a lot of redundant/useless stuff or other stuff you shoulnd't do
you dont "must" learn es6 or es5 rather learn the basics of JS
what are types, what are functions, what are clasess, what does the sytax of an if/try catch/witch statement looks like
you should learn that rather than looking at examples
yes
all
ES5 and ES6 is just a specified JS version what introduct new stuff
doesn't change the basics
nah not yet you learn basic Js first then you learn the newer syntax
k
forEach is there since ES1
🤔
hey yukine, do you know lavalink decently?
nah never used it devin
oof
Then why people uses for instead of forEach?
because for is syncrous while forEach is asyncrous
a for loop is blocking the current script execution while a forEach isn't
should take around 1-2 weeks if you wanna learn everything
JS is pretty easy in comparison to other languages
I learned web part first.
I think JS is so difficult for me 😭
ok
I am gonna learn it
bye

the basicsof js is not dat hard tbh
depends on your pre knowledge of other programming languages and programming at all
python is the most basic if im not wrong
Python is nicer, than JS
okay so i dont wanna start that shitty argue again so let us just not do that now 👏
@earnest phoenix ```exports.run = (client, message, args) => {
//et helpcommand = args.slice(0).toLowerCase().join(" ");
var help = args[0].toLowerCase();
if(!help[0]) return message.channel.send(These are the commands you can use \8ball, invite, logo, member, ping, plans, request, say, setgame``);
if(help[0] === "test") return message.channel.send("Usage: !help - Opens this menu");
if(help === "invite") {
message.channel.send("It works");
return;
}
}
it wont work
who mention me?
oh. . .
wats the error?
u dont need the [0] in the help
so
if(!help) return uhaushdioajdioajdaiojdaio```
thats not the problem
at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\test.js:4:20)
at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16)
at emitOne (events.js:116:13)```
[0] is indexing
actually
what r u trying to do
For your error, it doesn't know what you're doing with slice(0)
toLowerCase is like
tf r u using me for?
@frail kestrel no because thats a comment //
0 w0t
var help = args[0].toLowerCase();
w0t line does it say
var help = args[0].toLowerCase();
TypeError: Cannot read property 'toLowerCase' of undefined
at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\test.js:4:20)
at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16)
at emitOne (events.js:116:13)
what's args defined as
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
yea
the args = 0 so i want it to run this command. if(!help) return message.channel.send(`These are the commands you can use \`8ball, invite, logo, member, ping, plans, request, say, setgame\``);
but when i have the tolowercase()
it wont handle that theres nothing there
because its caps sensetive
//let helpcommand = args.slice(0).join(" ");
ive never used regex in split so im not sure if it even works
that worked
yea
ah okay
it wont handle a null
sorry about that
np
when you are doing args.slice(0), args is still an array
so you are doing toLowerCase on an array
it workes with the !command [the command i want to run]
that works
but the !command dosnt
is it because you are doing slice(0)
slice removes the indexed item from the array
ok
try it without that maybe 
like thisvar help = args[0].toLowerCase();
is args[0] a string?
ideally, args would be an array like ["test", "argument"]
then args[0] would be "test"
n0pe

W E C A N L A V A L I N K T O G E T H E R
let helpcommand = args.slice(0).join(" ");
let member = message.mentions.members.first();
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Muted');
if(helpcommand === "1") {
message.channel.send("it works");
message.member.addRole(Role);
return;
}
}```
how can i make the mentioned person get the role
because now i get the role
use
let aaaa = message.mentions.users.first();
if (!aaaa) return message.channel.sendMessage("fuk off")
aaaa.addRole(do this urself);```
das spoonfeed
🤔 ok next time ill give less information :/
i like how he gives info and i learnes from it because i try to understand the code he put out and then i edit it to fit in my code
dont use sendMessage :/
its deprecated
why is it even a thing in v11
its been deprecated for years
send('string')
iirc its not even in v11.3
@austere meadow it was removed in 11.3 already
ikr
ok btw
i heard d.js's v12 was soon btw
seems like internal sharding will be merged
soon = never best qoute
@heady zinc well it will still take some time since hydar wanted to look over it himself first
OwO
i wonder wat it will add thou
winter is ages away
that aren't real leeks
its the end of the year
idk
ive never really fully understood it
i should leek staff chat
nah it will still take some time since V12 also includes AutoFetch and caching improvemnts (external caching and stuff)
do the same thing than eris
is there any eta on those caching improvements 
what about the thing about extending d.js's classes in v12
you can shard without using of the ShardingManager and everything is done internally so you code like its a 1 process thing but its sharded internally
@heady zinc already done
^ i use that
is it
its neat
it looks cool
it is cool
guess i'll implement it to eris
👏 do that
https://please.zbot.me/r8o3VUye.png
i use it for prefixes in Guild
sexy af
i mean i extend D.js classes on stable already but i overwrote ptototypes what is edgy imo
ahh
that's what i do with eris
not
no u
b-but
h o w t o r u n a b o t o n h e r o k u (I tried 3 times so far but I have had trouble 👀 )
r u n i t o n g l i t c h
speak london
So, I have no idea what just happened, but I was learning to make a bot in C# recently. I ran it twice without incident, it did exactly what I programmed it to do.
ok
Today I ran it, and shortly after, it banned everyone from the server for reason "rekt", changed the server name to "be here if gay" and other things, things I definitely didn't program it to do
No-one had access to the bot's programming but me, I was running it on my computer, and the only ones with admin were me and the bot.
Thankfully it was not an important server, but has anyone heard of anything like this?
Oh, it also sent me DMs that, when I tried to look at them, caused Discord to crash.
did you leak your token
^ that is most likely what happened
mm yeah this stuff doesn't happen like magic so you leaked your bot token
reset your token on your bot's application page and paste the new token into your code
I did put the bot up on a github about 10 minutes before this happened, might someone have just happened upon it?
just reset your bot's token on the application page
lol, okay thanks guys
He must hv... hosted the bot on Heruko and put the token xD
need help 😦
@earnest phoenix https://someone.pls-date.me/Qve8H70.png

omg
kkk
I need to sort this out.
python nods js 😂
Also that embedded YT video at the bottom is so triggering
Just make it invisible
There are no people who do not like music I'll keep it so they can pause it
fixed 😄
well that information is kinda misleading since these apps/libs/projects/langs aren't partnered with you
@earnest phoenix
use something like "Powered by"
dunno
Are there some restrictions on what CSS you can use on your bot page? The CSS I used didn't seem to work
I dont think they are
but there are terms on what needs to be on that edited site
Please what's the error in this code ?
Hmm I wonder if the display: none's are a problem
Thanks @tawny lava, the ( !
https://please.zbot.me/FMkNlQCV.png
anyone here good with SandySounds or lavalink? ive been getting Voice connection timeout and i remember getting the issue before and being able to fix it, but ive been trying for a few hours now and i just can't really understand why this is happening, any thoughts or help would be appreciated 
havent been using it for a whilte rusty u know
@prime geyser the error is that your token is on github 


@prime geyser bad idea. . .
var helpembed = new Discord.RichEmbed()
.setColor("#01B0F0")
.addField("Carnet de liaison | aide", " ")
.addField("Utilitaires", " _")
.addField(prefix + "timetable", "Affiche votre emploi du temps")
.addField(prefix + "help", "Vous affiche ce menu")
.addField(prefix + "stats", "stats du bot")
.setFooter(basefooter)
message.channel.sendEmbed(help_embed)
pls. . .
helpembed
and
help_embed
discord.js?
a field can't have no value, add a 0 width space
no..? 
- @prime geyser dont have ur token on github
- Hope ur server hasnt. . . been grief(i didnt touchy ur token)
- Hope ur bot doesnt hv perms to delete channels on the servers it is on. . .
how do you add a user to a role on d.js master
🤔
message.author.addRole();```
well u do watever is in the ()
Anyone can teach me how to detect messages being deleted(making logs) using discord.js
@prime geyser hey fam, just to let you know that, as your real bot token was on github, i went ahead and got it reset, no need to thank me kthxbai
@earnest phoenix that won't work since you can't add roles to users, only guildmembers
and listen to the messageDelete event
@heady zinc @earnest phoenix @low rivet who of you 3 has used my token for post 🔞 images ?
It's you, @heady zinc ?
I have posted that because I don't know how to use other.
How to hide my token on GitHub, I don't know other possibilities.
well you don't put your files on github in the first place?
or remove the token from them ???
So it's you or not ? @heady zinc
that is not the question here
you are 100% the one to blame for what your bot posted
honestly why french people are that much retarded
Ok so it's you
@heady zinc rule 3
its not discrimination
riiight
also here's the hardcoded thing i ran
no nsfw stuff
okay right it is discrimination
buutt
as i am french
its k
Do'you want I signal you to the web police @heady zinc ?
it is one
Should it be protected
i just connected and disconnected with it 1000 times
idk eris
to get it reset
ok
afaik eris take the token in the constructor and not in the connect method
Alright
@heady zinc I signal you to the web police if you don't tell me the verity
Je vais te signaler à la police du web si tu ne me dis pas la vérité
bruh
holy fuck
what
lol if u leaked your own token, don't blame people for using it
i even spent 5 minutes in protecting the guilds with a reset
you should be grateful
(╯°□°)╯︵ ┻━┻
For posting 🔞 images on a servers on miners has here, I can blame pepole.
@low rivet
what
what?
@uncut slate leaked his token voluntarily and he's blaming other people for what they did with it
That engrish 😂
. . . 1. never post ur token on github
yeah I've been here, but what the fuck do 18+ images have to do with it
lol i didn't even use the token 
- do u even know how to use heruko?
heruko
how is this related to heroku
Heroku 
it was actualy a clone
lemme translate from french
no shit 🤔 @earnest phoenix
but dat time he took to remove all the FredBoat xD
"i can blame people as they posted nsfw images on servers with underage members"
ez... find and replace
Ok so I leave this server. @heady zinc, if you want some explications, go in PM. Bye bye everyone.
bye bye
K
so if u leaked your own discord user token, someone used it and abused, and your account got disabled, that's a good reason for a un-disable?
anyway bye :/
:kek:
.....
"do u know heruko has a function. . . to keep ur token safe"
why do you keep saying heruko
block them and be done with it
idk
ehh how could i block my fellow french
still don't get why he blames others for leaking his own token when there's a bunch of guides that says not to and blames the people who warn him on his token being ab00sed
there's not a compelling reason to continue this Drama™

im using superagent api and it shows "await is not defined"
can someone help?
ok nvm
got it
👍
How much ram should I get for my server if my bot’s going to have the capability of playing music?
1gb would be okay with how many servers?
(Oh and I got an unlimited budget-I’m getting one from the school I’m attending)
???
Paradox 
you can edit the default d.js caching options and reduce that by 70% if you actuall need anyways

every ducking baguette in the world is cached 

D.js boats can run even with outages because they cache heartbeat events
And future messages
D.js is magic
d.js is trash
my eris bot has never gone down because of an outage before
same
fair
also if discord is down how is your eris bot not ?!?!
is it connected to another discord server or what
I think he means as in, it recovered
oh that
i mean my d.js bot also doesn't need any restart with an outage because i use the disconnect event 
disconnect event emit => process.exit() => pm2 restarts

insane
doesn't d.js automatically reconnect
it tries like 15 times and then stop to not spam
then why do you need to restart 
well the "stop" is permanent for that i could aswell just call .login() again but restart is esier when i use pm2 anyways
-> sneekfeetch
?
ya i forgot to remove even
it still says something went err undifined
JS?
s
s?
yes
Language: JavaScript
Library: Discord.js
Note: client variable may be different for you
Code:
// Default modules :^)
const { stringify } = require('querystring');
const { request } = require('https');
const update = () => {
const data = stringify({ server_count: client.guilds.size });
const req = request({
host: 'discordbots.org',
path: `/api/bots/${client.user.id}/stats`,
method: 'POST',
headers: {
'Authorization': 'API TOKEN',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(data)
}
});
req.write(data);
req.end();
};
client.on('ready', update);
client.on('guildCreate', update);
client.on('guildRemove', update);
Hmm so Sneekfecth Don't work?
Not that I know
change content-type to application/json
you dont need content-length
and dont stringify data
snekfetch.post(`https://discordbots.org/api/bots/stats`)
.set('Authorization', 'YOUR DISCORDBOTS.ORG API TOKEN')
.send({ server_count: client.guilds.size })
.then(() => console.log('Updated discordbots.org stats.'))
.catch(err => console.error(`Whoops something went wrong: ${err.body}`));
this works or not?
yes
no client will be undifiend
idunno
I am trying to update my discord.js version and I am hosting my bot on Heroku
How would I do this
Does anyone know how to make the bot 'watching' something (in python)
On the official discord api-page isn't a 'watching' type
yes it was removed from the docs
it will be removed from the API soon I suggest not using it
Oh ok, thx
👍
Guys , can anyone help me? When my bot say @here he dont mention everyone. OBS : Im using eris.
Try <@here>
Just fucking mention @everyone already
I think you have to use @stuck marsh (channel id)
Did you try <@here>?
eris has a disabled everyone/here feature
another dev was having the same issue, im not sure how you enable it tho so, yeet
Maybe try this <@&id>
you can enable everyone and here within the constructor
or override the default settings in the parameters that createMessage() takes
ouch my eyes
fuck your eyes tbfh
no u
need help ! :('invalid syntax', ('/home/maxguest2002/Documents/Bot/cogs/natsu.py', 76, 24, ' await client.send_message(message.channel, "📨 Help as been send in Private you can go check!")\n'))
python 3.6
please use code blocks when sending code
is diponible on ubuntu ?
how do i make a timer like after this time do this?
what language?
js
setTimeout(someFunction, 1000);
takes a function and a number of milliseconds
yes, functions in the global scope are bad, but that's js for you
ummm
I'm finally changing my bots name
xD
this is gonna be wrong but this?
client.user.setPresence({ game: { name: `D-help | ${client.guilds.size} servers`, type: 0 } }); setTimeout(, 1000); client.user.setPresence({ game: { name: `hi`, type: 0 } });
yes that's absolutely wrong
Are you trying to change the presence after a certain amount of time?
setTimeout runs the callback you pass it asynchronously
yes
it doesn't actually pause execution or whatever it is you're trying to do
Why not make an array of states for the presences, then make a counter = 0, if the presenses[counter] = 2, in your case, then restart it
makes no sense to me
That's not exactly how it is
And it's very easy
i dont mess with that sort of thing
Lol
Welp, I guess I can't help then xD
:(
ik
it's 5/60s
5 * 60 * 1000
300000 is 5 mins
ok you probably want to use setInterval(func, time)
how
if you pass it a function and a number of milliseconds, it'll run that function every time milliseconds
i get that but the rest means nothing to me
what
setInterval is a function on the global scope
it accepts two parameters
the first is a function
the second is a number
how do i use it
when you call it, it schedules a task to execute a function f every n milliseconds
for parameters setInterval(f, n)
so setIntercal(client.user.setPresence({ game: { name: D-help | ${client.guilds.size} servers, type: 0 } }), 300000)
idk
im bad
:(
that's called a "function expression"
do you know how to code
it's a literal that produces a value of type function
0-0








