#development
1 messages · Page 460 of 1
```js
code
here
```
- it is mass dm code which isnt allowed
and yeah it is, which isn't allowed
ım new 😦
so
anydesk ??
mass dm is when you send a message to every single user
yes
which is against discord terms or service
it is not workgin
you can get banned from discord for doing that
What's your bot suppose to do?
I can not assign community message with botum command does not work
...
help me please
what your doing is not allowed
Bulk messaging command is not working on my bot
well
- you are going to get ratelimited
- its pretty much mass dms, which is not allowed
I can not explain the command, the command is not working corrupted
Yes, what is your bot in general suppose to do @earnest phoenix
don't make that a command
he is turkish
yes.
~~ping eggsy when @knotty steeple ~~
@steel heath can you help
what is the error
What?
🤔
as far as we can tell, he's trying to mass DM
we need you to be our translater eggsy
ok sure
you need to tell Mortal that the command he is making is against discord tos
Okay, so im making level up system and i want to make it so that you cant spam to easily level up, so how long should the ratelimit last?
:v
@earnest phoenix #memes-and-media buraya gel
prohibition cause I made
no
ye im pretty sure he is turkish
Lol
https://media.turtle-bot.com/f/lgMcv.png looks like turkish to me
Please check #memes-and-media
3 seconds is good for my ratelimit right
😅
what lib?
Library: Node.js (Discord.js)
Help Request: The Code in the picture does not give my bot the roles listed.
any errors?
very weird
why do you need to add two roles tho
1 of them is for Moderator
and the other 1 gives them staff member role
o
Do mUser.addRoles
You already should have the GuildMember object
Don't need to resolve it again
How do I check number of days user has been on discord for?
it still didn't give the roles
@earnest phoenix library
Should I remove the brackets? []
No
HMM
Change message.guild.mUser to just mUser
mUser is the GuildMember
Already resolved
@earnest phoenix Get the created timestamp and subtract it from the current timestamp then divide it by the number of milliseconds in a day (simple multiplication). And round the absolute of the solution.
Be aware of timezones btw.
you know you should probably be done for the night when you start coding a different command then the one you started with half way through.
(in the same (in this case) if statement)
Can anyone explain to me how sharding works in Discord.Net
I’d like to get it set up before my bot hits 2.5k
@rotund mesa Adapt the code to event? invoke() requires a Context object which is not passed in the event parameters
i want to check if there was any message collected in awaitmessages or no
const msgs = await message.channel.awaitMessages(msg => {
return msg.content === answers[question];
return msg.author.id === id;
}, {maxMatches: 1, time: 5000});```
@rotund mesa Oh, wait. What do you mean by "calling a cog"?
that isn't how awaitMessages works
Is it better to make the bot send the help command per pn and if the user doesnt have pms enabled, tell him to enable them? Or should the Bot then send the Help in the channel the command is executed in?
@night imp
Oh and how would I get the list of voters with the java api?
Any idea on how to track the invite link user used to join server via D.JS?
Only way to track invite on any library is to check manually to see compare difference of invite when user joined, that said you will also need to maintain a list of all the invite in the server
That's what I was thinking about
Anyone would know why a random sqlite_sequence table popped up in my database?
are you using autoincrementing?
no 
🤷
don't you love when someone mentions you in another language...
also wrong channel
@earnest phoenix #memes-and-media for Turkish..
@ruby dust groovy
GROOVY >>>
😂
@ruby dust is skysilk gonna be payed now cuz its currently on Maintenance
idk
I got an email saying that they released a premium something, didn't really read details
o ok
would actually make sense as to why they accept applications to join the free beta if they would let their beta testers to continue to use their containers for free, as long as they don't delete them which would create a new container which would then be payed
I guess they are still in beta then, since adding new functions in production isn't always a good idea
ahhh
and how is your medium container better than my small only in SSD size 
XD
yeah
it's still better to be safe
yup
not anymore
medium is the only available left in beta
well not only
but the largest container
idk what will happen once beta will be over, so I wouldn't risk it
ok
also this
SqliteError: disk I/O error what does this error mean
I mean, does it mean that the boost will be active for 24 hours or the option itself?
is it free forever
really?
idk im asking
no clue
that was my theory all this time, at least let their beta testers to keep their free containers
hopefully
free vps 
xd
The free tier would be free I guess
Idk
@neat falcon yesu derpy https://trying-to.get-a.life/P60y97Os.png
what host
Does anyone know why i'm getting this when i'm trying to find a guild with client.guilds.find() in discord.js?
TypeError: fn.bind is not a function
client.guilds.find('name', "SkyBlock | Play")
that's how i'm finding the guild
and i'm getting the error
get is only for ids
uh
yes
you can also use .filter
this is not the place for asking that i think
he told me to
we're not partner bots support server
@KJ#2551 partner bot server is trash
He left lol
Last time they banned me for nothing cause I had a good role and left and joined every time a new problem comes up
okay this isn't the channel for this nor is it even needed to be brought up.
wait for the skyslik thing if i delete my current vps and make the one thats in premium will i keep it?
cuz some in premium are free in beta
I have a problem
@earnest phoenix Doubtfully
/root/Gamer/node_modules/dblapi.js/src/index.js:138
async postStats(serverCount, shardId, shardCount) {
^^^^^^^^^
SyntaxError: Unexpected identifier
I got this Error while starting my bot up on a Skysilk VPS using Node.js
@earnest phoenix is your node updated?
you need v7.6+
depends on how you installed it, for the most part google will help you better than I can
that works
a,
@lament meteor its not nodejs.com, its nodejs.org
is this correct for grabbing a mention?
let mention = message.content.substr(prefix.length + "slap ".length)
idk what embed field I can put mentions instead of the mention id
discord.js right
yep
this is the proper way msg.mentions.members.first()
msg can be replace with message in your case
you can use it on the let mention line
ok thanks
and use mention in the embed field
ok
wait am I supposed to put something in those brackets?
let mention = message.mentions.member.first()
^
TypeError: Cannot read property 'first' of undefined
its because u didnt mention anyone
I did
Members not member as well
ok
Wait, users
member works
I always use users
so I'm supposed to put something in the brackets?
No
so it should work with me only changing to users?
Yes
Cant mention people in embed titles I don't think
anywhere where you can?
So you can do .username for their name, and in fields and descriptions I think
ok
k thanks, its harder to read but its fine
wait could I make it bold?
2018-08-08T18:33:26.175456+00:00 app[worker.1]: at Guild._addMember (/app/node_modules/discord.js/src/structures/Guild.js:1142:19)
2018-08-08T18:33:26.175454+00:00 app[worker.1]: at Client.emit (events.js:211:7)
2018-08-08T18:33:26.175461+00:00 app[worker.1]: at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
2018-08-08T18:33:26.175459+00:00 app[worker.1]: at GuildMemberAddHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/GuildMemberAdd.js:12:13)
2018-08-08T18:33:26.175463+00:00 app[worker.1]: at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
2018-08-08T18:33:26.175467+00:00 app[worker.1]: at WebSocket.onMessage (/app/node_modules/discord.js/node_modules/ws/lib/event-target.js:120:16)
2018-08-08T18:33:26.175465+00:00 app[worker.1]: at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
2018-08-08T18:33:26.175469+00:00 app[worker.1]: at emitOne (events.js:116:13)
2018-08-08T18:33:26.230274+00:00 heroku[worker.1]: Process exited with status 1
2018-08-08T18:33:26.249988+00:00 heroku[worker.1]: State changed from up to crashed What crash?
Help me
jesus
- can you put that in a codeblock
- what is causing the error
I see
I think
whats with the Guild._addMember thing?
@earnest phoenix
wait
ok
its supposed to be guildMemberAdd if your using discord.js
module.exports = member => {
let username = member.user.username;
member.send('Sunucuya Hoş Geldin!');
member.guild.defaultChannel.send('');
};
um what
```language
// code
```
@earnest phoenix default channel system has been removed from Discord, don't recommend using it.
if guild's default channel gets deleted, your bot might give an error when trying to send message to that channel
How can I solve this problem?
You can set a provider so that they can set a channel for those messages.
And the bot can send those if that provider is set to some channel
otherwise; it won't.
Will I fix her problem?
?
hey For anyone who uses skysilk. should i use the boost button?
hey @earnest phoenix , where'd you get that pfp? it looks familiar.
Does anyone have a comparison between Eris and Discordjs
Nope, glitch
So i have a profile command and im making it so you can set your own description, whats the character limit of field values in embeds on discord?
@knotty steeple is it field?
what
Is it field or description
Well, im looking for performance comparisons
eris uses about 2 times less RAM compared against d.js v11
Lol
still hold true against d.js v12 as far as i know
What about against djs v12
It will definitely hide msgs
Here idk which version I'm in lol
Then again her commands weren't used as often
a well configured v12 would compete against eris
there's really few reasons to chose eris over d.js nowadays
except that they still didn't released v12 kek
what more do they need to add just release v12 already lol
So what is Eris like d.js?
no
Well, my goal is to try and write a large bot to run on a small server
d.js has far more features
So in overall, which has more
I'm not looking for features, performance is what im looking for.
Also I asked it's a lib like d.js right
though eris benefits from a community-made sharder for large-scale bots
so if you don't want to spend time writing your own sharder for d.js you might prefer this
then i don't think you will gain anything from switching to eris
whats a load balancer
as i said v12 can compete against eris in terms of performance so ye you're better off staying with it
If I wanna switch to eris, I have to change all my codes?
what does it do
Yes
not all
most things you have to change is msg.channel.send to bot.createMessage
not much if you're switching from v11
lul
@knotty steeple The load balancer I use spawns processes evenly between all cpu cores.
Oh noes
from v12 you'll need to change a lot tho
and some other stuff
I'll better stay in d.js
just wait until v12 is fully released
Instead of all of the shards spawning on a single thread, it spawns them all on all available cpu cores.
If i change to eris, I'll have to check each cmd on what I should change lol so its better not to xhange
ye that's what the community-made sharder of eris do
so if you already have that
you really don't need to switch to eris
my profile command just keeps typing and won't generate 👀
const { MessageAttachment } = require('discord.js');
const { Canvas } = require('canvas-constructor');
const { get } = require('snekfetch')
, imgUtil = require('fs-nextra');
module.exports = {
name: 'me',
description: 'View your social profile.',
aliases: [],
execute: async (msg, args) => {
try {
await msg.channel.startTyping();
const background = await imgUtil.readFile('./profile-bg.png');
const profileCard = new Canvas(800, 600)
.addImage(background, 0, 0, 800, 600)
.toBuffer();
const profileAttachment = new MessageAttachment(profileCard, 'profile.png');
msg.channel.stopTyping(true);
msg.react('✅');
msg.channel.send(profileAttachment);
}
catch (err) {
msg.react('❌');
console.error(err);
}
},
}
const { Attachment } = require('discord.js'); @sick cloud
how do i make awaitMessages only for the person that ran the command
discord.js
@knotty steeple it's MessageAttachment, and uh, add a check to the filter
whats your current code for it?
i was just looking at an example code for awaitMessages
message.channel.send('What tag would you like to see? This will await will be cancelled in 30 seconds. It will finish when you provide a message that goes through the filter the first time.')
.then(() => {
message.channel.awaitMessages(response => response.content === 'test', {
max: 1,
time: 30000,
errors: ['time'],
})
.then((collected) => {
message.channel.send(`The collected message was: ${collected.first().content}`);
})
.catch(() => {
message.channel.send('There was no collected message that passed the filter within the time limit!');
});
});
anyone know any free vps?(not heroku/glitch)
no such thing exists @earnest phoenix
there is skysilk but its beta and needs a CC
@knotty steeple response => response.content === 'test', is your filter, change it to response => response.content === 'test' && response.author.id === <message>.author.id,
im using skysilk atm and a staff team has told me that there beta is about to end
ohk
where are the docs for awaitMessages
TextChannel#awaitMessages iirc
Does anyone understand bitwise in nodejs?
I am using this https://www.npmjs.com/package/random-quote with discord.js and would like it to send the quote as a message
client.on("message", (message) => {
const args = message.content.split(" ").slice(1);
if (!message.content.startsWith(config.prefix) || message.author.bot) return;
else if (message.content.startsWith(config.prefix + 'lol')) {
randomQuote()
.then(quote => message.channel.send(quote))
}});
theres my code
Rather than sending the message in the channel, it sends [object Object]
any help appreciated pls
use JSON.stringify(quote, null, 2); in the message.channel.send( <here> ); and see what it throws out
the quote is an object, most likely has more fields of data @fiery birch
@sick cloud thanks for help, this is what it replies with https://i.imgur.com/GJC6Cuu.png
so I would like to get the quote and author from this then only
okay, so
message.channel.send(quote[0].content);
that'd get you the content of the quote
dangit tony

Oki ty
yes i hate objects as well 
not send private massage http://prntscr.com/kgf058
they probably have their dms shut, have the bot blocked, or don't share a server with the bot
@earnest phoenix ^
Is there a way to remove the paragraph tags from the content?
some kind of .replace or .split
@sick cloud tnks but How do I turn off error console ?
or use some regex
you can't
unless you add a .catch that doesn't log
quote[0].content.replace('<p>', '').replace('</p>', '');
a simple way to get rid of it
@fiery birch ^
tnks ❤ @sick cloud
np
Alright that worked
Hopefully final issue(?) https://i.imgur.com/iB9dWcZ.png
do I need to install some unicode or something
uhhh use decodeURIComponent( <the quote code> );
How Can I send a welcome message in a picture? http://prntscr.com/kgf117
that should replace them
you'd need to learn image generation
using canvas or jimp or something
which is really hard tbh
there is a guide i know of, hold on
@earnest phoenix check out https://discordjs.guide/#/popular-topics/canvas
huh I dunno if I can get the quote codes
no, the code your using lmfao
wow tnks
message.channel.send(decodeURIComponent(quote[0].content.replace('<p>', '').replace('</p>', '')));
and np
just use regex to remove the html stuff 
how do you pull the first 3 items of an array and throw away the rest?
how do i change the style of the bot tags / vote button / invite button / bot profile picture / bot avatar / bot name?
using css
obvs
very helpful
.longdescription .content {
background-color: #2C2F33;
height: 1000px !important;
width: 1200px !important;
display: block;
margin-left: auto;
margin-right: auto;
} ``` i have this for the long description how would i change it to the rest
what would i change .longdescription to
body
const data = itemArray.first(3);
would this work and give me the first 3 in an array?
owo that worked, thankssss @inner jewel <3
in the long description i saw that html and some inline css is supported, does stuff like text align in css not work?
all css should work, just some website css may override it
so am i doing it wrong then (sorry , i dont normally use inline)
What's the variable used for the client in the developer console?
Well... anyone know the hex code to “remove” the color of an embed? Is it “#2C2F33” or something else.. I just had the idea and I’m on mobile so I can’t really test it. I’ve seen other bots do it
Yeah, i want this too!
I’ve searched in this channel with the search crap feature but.. I can find anything and probably was wording something wrong.
xD
Thanks. You’re a life saver.. cause I’m lazy... 🙃
it tells you the error
Ask the lib devs maybe?
:=1
i show you my code which is mentioned in the error
so it seems like if you leave the bot in the voice channel for 24 hours it will fail to leave
and will give an error
whats the thing
called where you share code
hastebin?
yeah
Library?
No. discord.py supports embeds. I don't mess with python.
But his can't send embed message. @gilded blaze
I don't know why
Only here
maybe it's just because bot can't delete message?
does the bot have permission to embed links?
question for the people who breathe discord.py rewrite
in async i know you have to run bot.process_commands(message)
in the on_message()
but in rewrite I don't know if that function event still exists. does anyone know the alternative in rewrite?
i'm typing my commands from the rewrite dev branch of my bot
and it just keeps responding back with this
discord.ext.commands.errors.CommandNotFound: Command "<< insert command name here >>" is not found```
awaiting approval after I removed it the first time ;-;
why did I delete it in the first place
@latent heron The same process_commands as it was in async
tried and wont work
How are you adding a command? Mind sending the code? 
# Returns back response times from the bot
@commands.command()
async def ping(self, ctx):
print("[GLOBAL] Requesting command '{}', OK.".format(command + ctx.command.name))
print("[DEV NOTE] Response time at {} ms.".format(mill))
ms_2 = round(int(time.time() / 100000000)) / 10
embed = discord.Embed(
title = "Pong!",
description = ":ping_pong: Internal: {}\r\n:heart: Server: {}".format(ms, ms_2 - ms),
color = 0xE64C4C
)
await self.client.say(embed = embed)```
this is example
i have them in cogs
What is mill?
whoops
haven't fixed it, i've been working on async to rewrite conversion
ignore that for now, it's the exact same thing as ms
<Messagable>.send
ctx is passed by default unless you do it like @commands.command(pass_context = False)
But then, you wouldn't be able to send response in the chat :^)
hmm
but the issue is that it doesn't recognize the command at all
i'm calling it with the @commands.command()
Loading the cog?
how to use a messagecollector without a filter?
(d.js)
so poni bot was added to my server and i didnt add it and the person who did left and i was wondering how do i turn off the greeting card
shit
ok cool
so now the command error is gone
but now the commands dont even work lmao
gotta love cogs
guys how to block client.token eval command
just add a line to check if input has token in it
if it does, it'd return
@earnest phoenix up
ew iphone
ew
yea
I wonder if removing the channels would break it
which channels?
"removing the channels"
📱
well they are saying it should be whitelisted
look look show how you "whitelist" channels
just like you whitelisted them, whitelist everyone i guess?
if (client.commands.has(command)) {
command = client.commands.get(command)
is this the correct way to get a specific command for specific help?
depends on your code
"logchannel": "464146525379887114",
//channel that the tip message will reply in if Multi or Role tip is used.
"botspamchannels": ["464146525379887114", "448594915841277955"]```
you shouldn't set this to a specific channel
users can be able to change those channels
like, they have to be able to set the log channel for their servers
Yeah it makes sense for sure
sounds like i need to code a module
to let the user set the log channel
you can use a provider to set channels for each guild
i know
yep
so yes, i do know
set a provider for it being enabled or not, and for the channel of it
@sick cloud then here's my code. will it work for this command loader? https://h.mayo.pw/uloromecop.js
why don't u try it before asking
i've tried it.
and
i wanted a second opiniom
nice
This isnt the place to ask for code.
it's that they wanna make you learn it, not just get copies
I guess
it's a place for when you get stuck on something and need to be pointed in the right direction.
and still show that you attempted something and explain what you tried
There are literally docs for coding discord bots
Simply asking for code here does not work
#development is for asking for advice on code
Boiz
there's one thing I'm having trouble with
discord.js; how exactly does .catch(error) work
:3
Like I wanna make it message.reply(error) instead of writing in console
oof
you can do that
Im trying to split a message into two parts as the Lyrics are quite long... This is my code:
return message.channel.send({embed: { color: green, title: `Lyrics | ${message.author.username}`, description: `*${res}*`}}, { split: true }).catch(console.error);
However, the only thing it returns in discord is:
[object Object]
oof
well I know there's a .slice thingy atleas
import discord
client = discord.Clien()
@client.event
async def on_ready():
help
me
Question on discord.py: can you make bots mute channels? (text channels)
Make it like "Bplay neffex" then it joins the room then play the song, cause currently i have a suppurate command for that
@latent heron what do you mean mute text channels?
oh but why would you want your bot to do that?
because im reading commands from every channel in servers
but i want to add a blacklist option for certain opt channels
so like you want your bot not work in other channels?
for sure you dont mute it
you copy the ID of the channel
then code a code so that you can add it to the blacklisted rooms
but not work there
how are you saying i can even blacklist it in the first place
because commands have to depend on on_message()
to even process ext.commands
im saying that
if there was something like
bot.mute_channel("channel id")
that it could theoretically ignore that channel
and not listen to it by on_message()
yeah i got what you mean
but in my bot, it can igonore channels
by copying the ID of the channel
and putting your code in
what
it's not ignoring channels
it's ignoring commands being parsed in those channels
big difference
i want to ignore the whole channel
¯_(ツ)_/¯
For IDEA, what does it mean by group ID?
@latent heron
@bot.event
async def on_message(message):
if message.channel.id != 265156286406983680:
# your stuff
about what?
The group ID for IDEA.
What does it mean by that?
Like the actual
site for your bot or?
uh, i dunno those, someone else can help you, just wait a little bit
No one will respond.
Help
app[worker.1]: at WebSocket.onMessage (/app/node_modules/discord.js/node_modules/ws/lib/event-target.js:120:16)2018-08-09T09:37:52.970820+00:00 app[worker.1]: at emitOne (events.js:116:13)2018-08-09T09:37:53.041164+00:00 heroku[worker.1]: State changed from up to crashed2018-08-09T09:37:53.016824+00:00 heroku[worker.1]: Process exited with status 1
What crash ?
a man needs help
async def cmd_autoplaylist(self, channel, author, player, voice_channel): """ Usage: {command_prefix}autoplaylist Enable or disable the autoplaylist """ self.config.auto_playlist = not self.config.auto_playlist await self.safe_send_message( channel, "The autoplaylist is now " + ['disabled', 'enabled'][self.config.auto_playlist]) # if nothing is queued or playing, start a song if not player.playlist.entries and not player.current_entry and self.config.auto_playlist: await self.on_player_finished_playing(player)
i want it to only disable the playlist for that server
not for every server
pls use codeblocks
hm ok shiv
nope
send logs
i want it to enable/disable the autoplaylist in the server
not for every server
` async def cmd_repeat(self, player):
"""
Usage:
{command_prefix}repeat
Cycles through the repeat options.
Default is no repeat, switchable to repeat all or repeat current song.
"""
if player.is_stopped:
raise exceptions.CommandError(
"Can't change repeat mode! The player is not playing!",
expire_in=20)
player.repeat()
if player.is_repeat_none:
return Response(":play_pause: Repeat mode: None", delete_after=20)
if player.is_repeat_all:
return Response(":repeat: Repeat mode: All", delete_after=20)
if player.is_repeat_single:
return Response(":repeat_one: Repeat mode: Single", delete_after=20)`
help?
use a codeblock pls
Blablabla
oh
i thought
code blocks
the software
async def cmd_repeat(self, player):
"""
Usage:
{command_prefix}repeat
Cycles through the repeat options.
Default is no repeat, switchable to repeat all or repeat current song.
"""
if player.is_stopped:
raise exceptions.CommandError(
"Can't change repeat mode! The player is not playing!",
expire_in=20)
player.repeat()
if player.is_repeat_none:
return Response(":play_pause: Repeat mode: None", delete_after=20)
if player.is_repeat_all:
return Response(":repeat: Repeat mode: All", delete_after=20)
if player.is_repeat_single:
return Response(":repeat_one: Repeat mode: Single", delete_after=20)
Use java
dont know java
If I wanted to send to console a list of unique arrays (just the ones that are arrays within the arrays within the arrays), how would I do it?
Here's a shortened version of the array:
["something", ["Any"]],
["Name", ["Grasslands", "Jungle"]]];```
http://prntscr.com/kgmcsf How to tag someone in the argument section
@ leapsoffaith
if you want to access a specific level only, for example 3rd level of the array, i'd use a for loop inside a for loop that checks for typeof
@earnest phoenix this is the way
I am not sure if you can tag in embed titles
Hello
hi
I need help with a bot
@coarse carbon
wdym?
Is there a way I can make it give out only 1 role.
oh
¯_(ツ)_/¯
.>
this isnt the place to talk about this btw
this is for bot development not support
Go to the bot's support server and ask there
i got a question about my bot
I recently got a new laptop and the bot i made was on my pc so i moved it and did the whole "pip3 install discord.py" thing and the bot should have worked but then i clicked on it and it just pulls up the command window for half a second then goes away
im using python
shift + right click on an empty space in its folder > command prompt here
try to start it from the command prompt, if it gives any error, the window wont instantly close
does Discord have an internal ID system?
Now that Nitro allows you to edit your tag number
there must be some internal id setup now, right?
i mean for a long time the discriminator (tag number) was the internal id
but now its all changed
You know you have an ID right?
@latent heron https://img.69420.me/aOEklsOF.gif
https://img.69420.me/x0vpQMmc.gif
242351388137488384
all accounts have a unique id, which is what we use in our bots to identify people
so the typeof thing works, however I have another problem now. Arr1 is const, and I'm trying to .slice() it's 3rd dimension to a var Arr2. When I have it outputted to console, it says "undefined".
Arr2 is is to output
I have been trial and erroring it for a bit with what I can find on stackoverflow, however no such luck
what exactly are u trying to do? ill see if i can help
["Grimtooth's Traps", "Infamous Wheel Trap", ["Any"], "Room", "n/a", 4, "./traps/infamous_wheel.png"],
["Grimtooth's Traps", "Roman Amphitheatre Trap", ["Grasslands", "Jungle"], "Room", "n/a", 3, "./traps/roman_amphitheatre.png"],
["Grimtooth's Traps", "Illusions", ["Any"], "Room", "n/a", 3, "./traps/illusions_trap.png"],
["Grimtooth's Traps", "Slider Spiker Trap", ["Any"], "Room", "n/a", 3, "./traps/slider_spiker.png"]];
.
.
.
var Arr2 = Arr1[l][w].slice();```
basically, where "l" and "w" are, I have a for loop searching for the 3rd dimension.
so whats the issue
the issue is, when I have Arr2 being returned to a console.log(func.run(message));, it prints out "undefined"
idk what your console.log(func.run(message)); does, but have you tried just logging arr2
try and narrow down the issue
because slice always returns an array, so if you were going out of bounds it would throw an error.
sooo if ur not getting an error, Arr2 is most likely defined, but your weird console.log(func.run(message)) probably has some logic error there
alright, I'll check into that. Thanks.
What are you trying to do with that array if u dont mind me asking? maybe i can help with some simpler way to achieve what u wanna do
I'm trying to have it return a unique list of biomes (stored within the 3rd dimension) from the available Arr1
so you want like ['Any', 'Grasslands', 'Jungle'] in that case? ^
right
let biomesArray = []
Arr1.forEach(record=> {
record[2].forEach(biome => {
if(!biomesArray.includes(biome)) {
biomesArray.push(biome);
}
})
})
Now assuming that data format remains the same that would work.
so:
for each item in that array
-for each of the biomes(index 2)
--if its not in our biomes array
---add it
That did it! Thank you so much!
👌 always try and brainstorm through it like the 2nd message i sent
eventually you notice alot of patterms and remember ways to do certain things. u get better and better
What's sad is that I'm a computer science major, and I didn't think of looking for patterns. I guess it's due to the fact that I've never coded in javascript before
same watcha learning?

learning how to return an array of depth to another file that asks for it

note that in javascript forEach is much slower than for
in most languages that's the case
yeah, but in js the difference is huge, while in php for example the difference is negligible
JIT might be able to optimize the forEach with enough executions
anyone know what code id need to add to have the current time added to the end of a message from my bot (keep in mind code is probably my least knowledgeable aspect of literally everything ever
which language?
.js is the type of bot i assume is the answer but like i said i dont know code
in javascript you can use the function Date() to get the current time
thx
by default it returns a string like this
"Thu Aug 09 2018 13:53:12 GMT-0300 (Brasilia Standard Time)"
if you need the current time/date in other formats, there are several methods for the date function
msg.edit(Session Status = Up. ${msg."where the time should go?} );
That is where im at rn
you can read more here
${msg."where the time should go?} looks like ur about to read a property of msg 
im trying to define msg right now. Pretty much what i'm trying to do is have it where we type !up it shows Patrol Session = Up @ everyone (tags everyone) than the current time
and i got most of it this time is just killing me tho
if you just need the current time, without the date, you can do Date().getTime()
so basically js .send(`your message etc date is: ${Date()}`)
tbh idk if this works with template literals, i dont actually use them, but it should
do i need to put somehting between the ()?
Can someone help me out with eris?
My problem is with that it’s not currently showing anything
Oh I found another mistake lol I’ll fix that first than try
Probably gonna go eat first
ok
hey guys, is there any way I can get in touch with whoever declines bots? They said there were no (functioning) features but it seemed to work for me so I want to see what bug caused this before I resubmit
@split lantern Oh ok thanks
If my bot was declined I cant edit it? I have to rewrite everything?
<@&264889767072628742>
I wanted to ping only the website guys
the answer is yes, next time be more courteous
you don't need to ping EVERYONE
you only need to ping 1 person
But do you need every single one of them? 
Im just mad im sorry I had a large description that I need to rewrite
@sick iron didn't need to comment
@slender lagoon that's why you wait until after approval to do complicated descriptions 👍
why was it declined
i'm here, you don't need to ping me.
Sorry. I'll remember to stay past the line. (That's just something I do and I'll fix it)
This seems to keep crashing my bot... how can i put an end to it so my bot doesnt keep fucking up its token?
17|mini-me | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
17|mini-me | Error: 404 Not Found
17|mini-me | at _response.transport.request.then (/home/node/mini-me-stable/node_modules/snekfetch/src/index.js:193:21)
17|mini-me | at <anonymous>
17|mini-me | at process._tickDomainCallback (internal/process/next_tick.js:228:7)
How do we post images in our bots desciption?
<img src="URLTOIMAGEHERE" alt="Description of Picture (Shows when picture cant get shown for example)">
ADS!
Advertisement!!
whats with that?
He can ask for help ffs
<head>
<title>How To Insert An Image</title>
</head>
<body>
<img src="Capture.png" />
<img src="Capture.png" alt="OverRealm Music playing music with a couple of commands on the line ready for use!">
</body>
</html>```
thats the html
Capture doesn't exist
Change to a url
ok
can you host it?
doesnt imgur delete after some time?
Maybe I'm not sure
Nope still the same
<head>
<title>How To Insert An Image</title>
</head>
<body>
<img src="Capture.png" />
<img src="https://imgur.com/lwa0pwP" alt="OverRealm Music playing music with a couple of commands on the line ready for use!">
</body>
</html>```
Weird
wait i think i knwo the problem
brb
Ohhh now it works
https://i.imgur.com/lwa0pwP.png%22
you need that %22 and that i.imgur.com
Uh
how much is Lavalink supposed to use normally
Mine is using like 400mb and it's not even playing
so i got the time showing on my bot but how do i get it to be a specific time zone its currently chowing GMT i have the date() right now
Language?
@vast bane it is usually close to that
Idk whats going on here xD
I usually just limit lavalink to 1gig of ram
And I managed 14 vc connections with that
400mb is low
my bot uses like 500mb
Try ffmpeg lmao
I have but
Ffmpeg eats resources
Like 1290
also i made a typo
300
not 500
so That's 300mb left to use which is partly used by the VPS
It's very good usage
Are we allowed to change the style of the Bot Name title on DBL?
can i set a provider on a user with sqlite?
like this this.client.provider.set("msg.author.id", 'destekci', "1");
this doesn't works
is there another way for it?
can someone help?
so sorry i didnt respond before language is js and i cant get it not to show GMT with my command it'll show the time when i type !time but in GMT which isnt really helpful
does it matter where my bot is from maybe? idk
It's the time of the machine the bot is ran on I believe
The bot gives such an error The bot does not open when you delete the crash file, what can I do?
2018-08-09T18:58:45.691655+00:00 app[worker.1]: at Client.emit (events.js:211:7) 2018-08-09T18:58:45.691658+00:00 app[worker.1]: at Guild._addMember (/app/node_modules/discord.js/src/structures/Guild.js:1142:19) 2018-08-09T18:58:45.691661+00:00 app[worker.1]: at GuildMemberAddHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/GuildMemberAdd.js:12:13) 2018-08-09T18:58:45.691663+00:00 app[worker.1]: at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65) 2018-08-09T18:58:45.691665+00:00 app[worker.1]: at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35) 2018-08-09T18:58:45.691667+00:00 app[worker.1]: at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17) 2018-08-09T18:58:45.691670+00:00 app[worker.1]: at WebSocket.onMessage (/app/node_modules/discord.js/node_modules/ws/lib/event-target.js:120:16) 2018-08-09T18:58:45.691671+00:00 app[worker.1]: at emitOne (events.js:116:13) 2018-08-09T18:58:45.809030+00:00 heroku[worker.1]: State changed from up to crashed 2018-08-09T18:58:45.792449+00:00 heroku[worker.1]: Process exited with status 1
what do you mean? my machine is CST and it keeps showing GMT
Chefy try toLocaleString
@floral zinc where would you recommend putting that?
ello, is there any possible way to differ a leave from a kick?
check audit logs
Audit log is not perfect tho
@vast bane i have run lavalink successfully at Xmx 64m in the past
if yours is "eating" 400mb that means that you allowed it to eat that many ram in the first place
you should look up how java and ram works
Maybe Java should stop munching
Ever since I updated to the new Discord.js 11.4, I've been getting ffmpeg not found errors despite it actually being installed along with the binaries.
Anyone else having this issue or how I can fix it?
I hear you have to sacrifice a goat to the d.js gods by pushing it throw a life sized case fan
hey guys, can I find a user by their name in discord.js?
yeah
you do that with id
client.users.get(name, "") there was something like this
or maybe .find instead of .get
why do you need this for?
I just need to find users by names, I want to add for a specific name a role
But I have like 160 ppl to add role
And I can't just find their id's and add that way
I want to user their names.
i didn't understand actually but
client.users.find(u => u.username == "name here");
wow okay
nice
what lang and lib?
what version of discord.js? They just released 11.4 today
you might a few issues without voice revolving around ffmpeg not being installed even tho it is if you do voice on 11.4
hm. I'd try to give 11.3.2 a try first then try 11.4 if 11.3.2 isn't good
alright so i got another question for y'all is it possible for me to have my command !up to say Patrol Session is Up! than whatever i type after !up be included
For Example if i Type !up It would just say Patrol Session is Up!
But if I type !up Start Time 9:30 EST it would say Patrol Session is Up! Start Time 9:30 EST
Or if I type !up for 2 Hours it would say Patrol Session is Up! for 2 Hours
language is .js
so basically make the bot repeat after you?
just add the message argument to the send
question? how would i get a bot to do a nice link like with github markdown ([Link name](link_url))
@earnest phoenix you can only do it in embeds
only in field values and description
webhooks can do it in general chat messages tho 
Would anyone be able to give me an answer to what algorithm would be the fastest and most secure at the same time? https://awau.moe/a151d8.png
i'd just go with HS256
as long as you don't leak your key and it's decently sized you'll be safe
If you are developing the app that is receiving the tokens, then you should use HS256. It is more secure, faster, and the token is smaller.
RS256 is an asymmetric algorithm, meaning it uses a public/private key pair. AuthRocket uses the private key for signing and provides you the public key to use to validate the signature.
If you don't have control over the app/client receiving the tokens, then RS256 is a good choice. The key can be used in a browser or mobile app, doesn't have to be secure, and can be shared without compromising security.```
How do you fix these text colors on your bot page?




