#development

1 messages · Page 328 of 1

north fog
#

like (e) => { e.guilld.ownerId} (note: I dont use discord.js)

scenic crest
#

event.guild I presume

stone kiln
#

@north fog that is a correct way to make an event

shrewd field
#
client.on("message", message => {
  if(message.content.startsWith(prefix + "get")) {
    message.channel.send(guild.ownerID); //owner id

    
  }});```
#

correct

#

for owner id

scenic crest
#
var owner = event.guild.ownerID
if(owner === event.message.author.id) 
{
    // step 5
}
else
{
    // send a m,essage to the channel and say that you're not allowed to do it
}
#

I'm using allman for JS now

#

I'm beyond caring

#

😉

north fog
#

Deni, I got a question, do you know any coding (just to be sure) like javascript ¿

shut remnant
#

@shrewd field you should also get a linter... it'll help u to detect sum brackets nightmare.

shrewd field
#

i know coding @north fog

#

and @shut remnant i have linter

#

hye

#

403

#

this gives me

#
var owner = event.guild.ownerID
if(owner === event.message.author.id) 
{
    // step 5
}
else
{
    // send a m,essage to the channel and say that you're not allowed to do it
}```
languid dragon
shrewd field
#

event is not defined

scenic crest
#

ah

#

I mean

#

close enough for never having used d.js

shrewd field
#

ok

languid dragon
#

you would know that, if you looked at the documentation Deni

shrewd field
#

know what

languid dragon
#

how to do anything you ask

scenic crest
#

docs are for losers

#

!!!

#

nah read the docs

north fog
#

it also depends how you declare the fields

scenic crest
#

they tell you everything you need to know

shrewd field
#

ok

tawny lava
#

are you trying to get the owner's id?

#

of the guild

prime cliff
#

^

scenic crest
#

he is

shrewd field
#

yes lizard

prime cliff
#

Which one

#

REEEEEEEEEE

tawny lava
#

const owner = message.guild.owner gives you the owner

#

if you want the id do owner.user.id

shrewd field
#

ok

#

get command person's id
get guild owner
check if command sender's ID === guild owner ID
if it isn't, error
if it is, do what we said earlier for getting IDs

#

i want this lizard

tawny lava
#

ok so then check if the author's id equals the owners id

shrewd field
#

ok

#

wait

#

const owner = event.guild.ownerID;

tawny lava
#
if(message.author.id === owner.user.id) {
// stuff
} else {
    other stuff
}```
shrewd field
#

where i put this ^^

tawny lava
#

you don't

shrewd field
#

ok

prime cliff
#

Deni its guild.owner

tawny lava
#

that's not how you get the owner

shrewd field
#

ok

#

how to get owner id

scenic crest
#

he has a var defined called owner

prime cliff
#

_> oh god back to step 1 again

tawny lava
#

const owner = message.guild.owner gives you the owner if you want the id do owner.user.id

north fog
#

Deni, you can always try to look in the Discord API guild, there is a channel dedicted for Discord.js (and many more library's) you should try to look/ask there

languid dragon
#

i suggested that 2

north fog
#

there are more people that can help you, here is a mix of everything that try to help, its nice, but does not work always

stone kiln
#

^

supple ocean
#

guys

#

In d.py
I had a elif message.content.startswith("Help") command but I've made a $help [command name]

#

Well it sends the $Help command text

#

How can I fix it?

#

I know I need to use ctx.send but it doesn't work

#

(rewrite)

#

If somebody is able to help me than thanks

round solstice
#

Well, I only know discordrb, but let me try: You need to pass the message.content split from the help to $help as far as I get it.

lime falcon
#

Just out of curiosity, if you're using discord.py, are you not using the built in help command?

dense seal
#

do you know how does this streameur to make appear the people who speak on his stream? (It uses discord)

north fog
#

discord overlay ¿¿

dense seal
#

I tried to find but impossible

karmic parcel
#

It was most likely something custom that tracked the voice events for them and used a web source that had the html/js to handle it and make it look like it belonged with his overlay

#

It may sound complicated, but it's actually easier than it looks

#

a bot could track the voice events and handle it fairly easily

fickle solstice
#

Discord streamkit @dense seal

dense seal
#

I have seen but I doubt that this is just this simple plugin. Are you sure @fickle solstice ?

wide basalt
#

Hi @everyone I'm a newbie and I try to create my own bot but I've got a strange error :/

scenic crest
#

@wide basalt what did you set the ID to?

#

it needs to be the client ID which can be found in the application at the top

wide basalt
#

oups my bad XD

#

so the number after the # ?

scenic crest
#

at the top

#

it says "Client ID"

wide basalt
#

the fact is I'm not on this page x)

bitter sundial
#

you need to go get the ID from the page @scenic crest screenshotted

scenic crest
#

well you need to go on the page to get the ID

#

what you have is called a "Discriminator"

#

it's something else

bitter sundial
scenic crest
#

IDs are unique -- discrims are not

wide basalt
#

thanks a lot but where is the page ?

scenic crest
#

then click on the application, or create a new one if you have to

#

IMPORTANT: If you create an application, make sure to add a bot user to it!

bitter sundial
#

and um

#

make sure you have code running the bot

wide basalt
#

Thanks you 😃

scenic crest
#

no problem

#

if you need anything else just ask :)

barren brook
#

Can you guys help me?

wide basalt
#

a public bot or double OAuth for the user bot @scenic crest ? 😃

scenic crest
#

@wide basalt don't make a userbot

#

they are against the Discord ToS

#

and sure @barren brook

bitter sundial
#

public bot no oauth requirement

barren brook
#

Ok so

wide basalt
#

you said I needed to add a bot user ? x)

barren brook
#

Can you help my developer of discord with a command that Is hard @scenic crest

scenic crest
#

I can try

barren brook
#

Ok dm me for a link

scenic crest
#

ooo thats what you mean @wide basalt

#

sorry I misunderstood

#

and nah why can't we talk here

#

it's easier

#

ig not then .w.

wide basalt
#

in which language do you develop bot ?

lucid mesa
#

english

earnest phoenix
#

lol

scenic crest
#

Java and Kotlin

earnest phoenix
#

python for me

scenic crest
#

JS and Python are easy

tawny lava
#

I only develop bots in swift

scenic crest
#

weirdo

tawny lava
#

Rude

wide basalt
#

Nobody in C# ?

earnest phoenix
#

whew

tawny lava
#

Swift is actually really nice kek

scenic crest
#

a few people do C# yeah

#

there's a c# library for discord too

uncut slate
tawny lava
#

There’s a library for everything now

#

Well almost

wide basalt
#

if there a possibility to add the bot to one of my server ?

#

even if he is empty

scenic crest
#

yes

#

replace "YOUR_ID_HERE" with your client ID

#

@wide basalt

wide basalt
#

ok ty

#

I did find but i have unkonw error XD

scenic crest
#

can you send the link you used?

wide basalt
scenic crest
#

double check the client ID

wide basalt
#

ok ^^

#

work better with mi ID ^^

topaz fjord
#
div {
  background-image:
      url("https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png");
}
#

so anyone

median lintel
#

no

topaz fjord
#

ive done that but it doesnt work

loud verge
#

Do it to the .profile

median lintel
#

body { }

loud verge
#

Maybe add !important

#

Body will make the image distorted and shit actually anywhere

#

If height and width isn't added and what not

topaz fjord
#

split

#
body { background-image: url("https://i.imgur.com/SvnuN4M.png"); }
#

it comes out like that in text

loud verge
#

Ok now add important

#

Before the ; add !important

#
<style>
body {
    background-image: url("LINK TO DIRECT IMAGE HERE");
}
</style>```
#

Here

#

Add that to your description just add the link

#

@topaz fjord

topaz fjord
#

oh i see ty

barren brook
#

Can I have a script,For a ! support so that a HR can gi ti the server to help?

earnest phoenix
#

I'm bad at css tbh

#

changed nick

#

;P

barren brook
#

My friend is a trusted and I know him as a friend putside of discord and he works with me and I want him to put a command in thst I cant do so is there a way to do so?

lime falcon
#

Well you can allow them to turn off the bot pretty easy, to allow them to turn it on would require them having a way to talk to whatever is running the bot

barren brook
#

Ok.

#

Craft can we talk with my friend and have you and him help me?

lime falcon
#

To allow them to turn off the bot you just need to make a command that checks if the user ID of the person calling the command is equal to the ID of your friend, then calls logout or whatever your library uses

barren brook
#

Ok,How do I do the command like the script for it?

lime falcon
#

What language is your bot?

barren brook
#

I forgot can you tell me the languages to remember?

trim steppe
#

wat

#

you can't add features in

#

without having a bot

lime falcon
#

As said

trim steppe
#

or even knowing any languages

lime falcon
#

True. Explaining how a library works is difficult if I have to explain the language underlying the library at the same time. It's best to learn the language first then learn the library

barren brook
#

How to learn the library?

trim steppe
#

learn a programming language first

#

then learn a library

#

for discord

#

then make a bot

#

then implement features you want

barren brook
#

What are the languages?

lime falcon
#

Just about any works, but Python and Javascript are two favorites

trim steppe
#

there is no comprehensive collection of "the languages"

#

however, there are a limited subset you may like to use

#

that are the best for discord

barren brook
#

Ill give a script to have you tell me the language.

lime falcon
#

There are a whole lot of programming languages. If feeling vindictive, I could recommend Piet or Malbolge

barren brook
#

const Eris = require('eris');
var bot = new Eris('YOUR TOKEN')
bot.on("ready", () => { // When the bot is ready
console.log("Ready!"); // Log "Ready!"
});
bot.on('message', (message) => {
if(message.content.startsWith(";support")) {
bot.createMessage(msg.channel.id, "Insert stuff");
}
});
bot.connect();

#

Is the script.

lime falcon
#

That's JavaScript it looks like

#

Or not

barren brook
#

Ok,Im quit good at javaScripts.

lime falcon
#

One sec...

barren brook
#

Ok

lime falcon
#

Yep that's JS

trim steppe
barren brook
#

So how do I add the scripts?

trim steppe
#

wrong wrong wrong

barren brook
#

?

trim steppe
#

learn how to use nodejs first

#

heck

#

even javascript

#

learn that first

barren brook
#

I have Javascripts.

trim steppe
#

do you have node?

barren brook
#

No. I dont think so,I get the scripts from a friend of mine.

trim steppe
#

does your friend know how it works?

barren brook
#

Yeah.

trim steppe
#

you need to get node.js first

barren brook
#

Ok.

#

It says

trim steppe
#

really?

prime cliff
#

Did you just....

trim steppe
#

omfl

#

Google nodejs

barren brook
#

Ohh

trim steppe
#

not literally send a GET http://node.js

barren brook
#

.

#

Im at it know what?

#

Download it?

trim steppe
#

no

#

because you're on your phone

barren brook
#

Ill go on laptop at 7:30 EST.

prime cliff
#

@barren brook Why are you trying to code on a phone anyway >_<

trim steppe
#

everyone knows that discordblocks for android is the best development environment on mobile phones for making discord bots

prime cliff
#

same

trim steppe
#

thanks

barren brook
#

Ima ask my mom for my laptop.

trim steppe
#

wait what

#

how old are you?

#

owo

median lintel
#

LMAO

trim steppe
#

how do i write an email to discord

median lintel
#

ur not even supposed to be on discord

#

i think support@discordapp.com @trim steppe

barren brook
#

Theres a 7 year old I know on discord tho.

#

Lol kiding im 13.

trim steppe
#

you and that 7 year old are violating the Discord terms of service

barren brook
#

I never new.

#

Btw im 13 I lied about me being ten.

median lintel
#

yeah right

trim steppe
#

If you're such a good Roblox scripter, why don't you use lua instead of JavaScript @barren brook

earnest phoenix
#

Wait im god at roblox

#

Reading this hurt my heart a tiny bit

median lintel
earnest phoenix
#

Anyone interested in helping with my bot? You need to be good with working on stuff using many API's OR you can help with the back end database systems... I'm making a bot that acts as a bridge between Discord, normal phone calls, SMS and many other messaging platforms such as Telegram, Email, WhatsApp, Facebook Messager, a Socket.IO chatroom, IRC, and more. We're using twilio for SMS and voice calls right now, but we're open to change. We haven't decided on a database yet, so if you'd like to use a certain database, be prepared to explain the pros and cons of it as well as why it will fit our needs better than another option. Knowledge of server-side JavaScript is required. DM me on Discord (moose#3054) or email me: cooper@moosehub.xyz

#

interested.

glacial lance
#

Eh.. too busy with KawaiiBot, Hatsuse Izuna, my own site, work... Etc

earnest phoenix
#

👀

prime cliff
#

What happened with KawaiiBot you got it back now?

earnest phoenix
#

@inner jewel What do I do now?

inner jewel
earnest phoenix
#

hmm

inner jewel
#

i guess that's jdk 9

earnest phoenix
#

downgrade?

inner jewel
#

yeah

#

jdk 9 is most likely full of bugs anyway

#

was released 2 weeks ago

earnest phoenix
#

If I downgrade, can I also change the version of the project?

#

I meant like JDA for the project

#

unless you dont do that

inner jewel
#

JDA was built for java 8

earnest phoenix
#

kk

inner jewel
#

downgrading to it won't affect jda

earnest phoenix
#

kk

inner jewel
#

o btw

#

change the JDA version

#

to 3.3.1_284

earnest phoenix
#

@inner jewel Ok got Java 8

inner jewel
#

make a folder "src/main/java/space/passthemayo/testbot"

#

wait for it to mark as sources root

#

(should show up a blue icon)

earnest phoenix
inner jewel
#

didn't mark as sources root

#

lol

earnest phoenix
#

¯_(ツ)_/¯

topaz fjord
#

anyone good with js can help me

#
if (!message.member.voiceChannel) return message.channel.send('You are not in a voice channel!');
        if (!serverQueue) return message.channel.send('There is nothing playing that I could skip for you.');
        serverQueue.connection.dispatcher.end('Skip command has been used!');
        return undefined;
#
(node:36060) [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.```
#

it skips twice then when i try to skip again i get this

tawny lava
#

Add a slight delay to your play function

wanton plover
#

Dunno if java9 related but my bot use 800mb more ram :/

jagged plume
wanton plover
#

🤔

tawny lava
#

lol

weak parrot
#

800mb wtf Thonk

scenic crest
#

@wanton plover do jda or d4j evrn support j9

surreal peak
#

shouldn't we kick mister 10 year old

wanton plover
#

If coded properly everything support j9

shrewd field
#

guys

#

how can i make the guild audit logs

bitter sundial
#

you fetch them

shrewd field
#

give me the target

#

yes

#

how

shrewd field
#

like this

#

when i do for example "logs" it gives me the type of the audit log that happened a while ago

#

@bitter sundial

#

this is what i mean

#

^^

bitter sundial
#

I don't get what you mean

shrewd field
#

i mean

#

if i type

#

-logs

#

i will get the target of the last made audit log

#

huh

#

tonkuu

bitter sundial
#

so are you wondering how to make that command

#

or a specific part in it that you don't understand?

shrewd field
#

how to make it

bitter sundial
#

so first of course you fetch it (see what I linked above)

shrewd field
#

ok how to fetch

bitter sundial
#

look at the docs

shrewd field
bitter sundial
#

it's optional

shrewd field
#

and how to make it

#

so what to do

#

like this

#

@bitter sundial i have this what to do

languid dragon
#

message.guild

shrewd field
#

message.guild

#

ok

#

this is what i got

#

i want it to say what is the last audit log entry that happened

bitter sundial
#

you can't put it inside the reply

#

you have to call the function

#

wait for the promise

shrewd field
#

huh

bitter sundial
#

get the last one and send what you want from that

shrewd field
#

what do u mean by call the function and wait for promise

#

what is a promise

#

get what last one

bitter sundial
#

calling function fn means fn()

#

and waiting for promise means using then or await in an async function

finite sky
#

When will someone look at my bot?

tawny lava
#

never

uncut slate
#

or await

finite sky
#

:c

shrewd field
#

ok

#

how do i do them tonkku

#

give me an example

languid dragon
#

message.channel.send().then(()=>{})

uncut slate
#

um, no

#

first one isn't even a call

lapis beacon
#

!help

#

?help

scenic crest
tawny lava
scenic crest
#

^

indigo notch
#

THE FUCK

#

Learn the lang

#

you are using

shrewd field
#

with this how can i make a command that gives me the last audit log entry that was made
message.channel.send().then(()=>{})

scenic crest
#

sometimes it's better to learn by doing

#

but if it's your first lang then deffo learn it first

shrewd field
#

look

#

the thing is

#

i dont know how

#

if i know how i would start trying then if i dont succeed i will come here ok

bitter sundial
#

you don't know because you haven't learned the language

#

you should study that more and you could understand the docs and know what you're doing better

#

we can't just spoonfeed you and code your bot for you

shrewd field
#

ok

#

how can i add my bot here

#

what is the star for

scenic crest
#

wise words

#

and you can add the bot on the website

shrewd field
#

can u give me

scenic crest
#

there's a button for it

shrewd field
#

nvm

#

who knows good websites i could learn javascript in

languid dragon
scenic crest
#

depends your learning style

shrewd field
#

ken

#

begginer

#

403

languid dragon
#

sry ur right, google is too advanced

shrewd field
#

lol

#

ok

#

who knows websites

bitter sundial
#

if you want to learn by doing, codecademy's good

shrewd field
#

ok what else

languid dragon
bitter sundial
#

if you wanna read a series of "books" there's that option as well

shrewd field
#

ok thx

#

tonkku

#

i submitted my bot now when it will get approved??

restive silo
#

in some hours or maybe a day

#

wait

#

wasn't you the guy who got banned on d.js for not knowing js and always want spoonfeed

#

i remember FeelsKek

shrewd field
#

huh

earnest phoenix
karmic parcel
lapis beacon
#

-help

tawny lava
#

use !help it's better

keen nest
#

How do I bot

prime cliff
#

I went roblox bot any bot mekar plz halp

earnest phoenix
shrewd field
#

hey how can i make this in a rich embed

bitter sundial
#

that is the footer

#

refer to embed docs

shrewd field
#

ok

#

the command for it is`

#

client.user.username

#

huh

#

tonkuu

#

@Tossdsnkku#0950ssss.

bitter sundial
#

that is how you get a username yes

shrewd field
#

ok thanks

#

but it doesnt work

bitter sundial
#

except it is your bot's username

shrewd field
#

huh

#

i want the member

#

the human

#

not the bot how

prime cliff
#

If you read the docs you would have understood some of this

shrewd field
#

i read

#

see

prime cliff
#

Are you trying to get the author of a message or from a user ID?

shrewd field
#

i am trying to make something like this.

faint jetty
#

Please read docs

#

...

shrewd field
#

read it

#

adam

faint jetty
#

No

shrewd field
#

like this ^^^

faint jetty
#

If you did you’d see how to set it

shrewd field
#

how do i get the "deni#0274" part

#

here is what i saw

prime cliff
#

Get the author of the command used

shrewd field
#

message.author

prime cliff
#

message.author.username

shrewd field
#

when i do that i get message is not defiend

faint jetty
#

o m g

#

I can’t

shrewd field
#

how is message not defined and it is in the message handler

bitter sundial
#

because it is outside the event listener

shrewd field
#

how can i get it inside like this

faint jetty
#

you move the embed calls

keen nest
#

They added that

#

Tbh I gotta admit that's pretty badass

faint jetty
#

?

shrewd field
#

what is

keen nest
#

That embed builder

faint jetty
#

yeah most libraries have it now

keen nest
#

May have to add something to my lib like that 🤔

prime cliff
#

You dont have that in your lib wew

keen nest
#

Don't need it

#

Since it's purposely lowlevel

shrewd field
#

v

karmic parcel
#

You have a lib? eyers

keen nest
#

It's mostly for internal use

shrewd field
keen nest
#

Hell I dread the day people start using it.

karmic parcel
#

I'm excited for when people use mine

#

Crystal is using it rn

faint jetty
#

xd

tawny lava
#

same

keen nest
#

I don't have enough time to fully support it

#

Especially since it was mostly designed for us and our uses

#

Why it's lowlevel. On the teir of DIO

#

We provide high-level support via another lib.

earnest phoenix
#

How do i add a command to change the bots name in node.js???

keen nest
#

Like command parser. Server list uploading. Etc.

#

Wat lib?

fringe flame
#

@earnest phoenix library?

earnest phoenix
#

node.js (discord.js)

fringe flame
#

hmm

#

you use client or bot?

prime cliff
#

I have never used js but do you have to wrap the (message.author.username) instead of without the brackets thonkku

earnest phoenix
#

Wat

inner jewel
#

i need to fix my broken lib

earnest phoenix
#

I use a bot

fringe flame
#

@earnest phoenix you have: const client = new Discord.Client()

#

or

#

const bot = new Discord.Client();

prime cliff
#

He was talking about the message event

inner jewel
#

what if he has const somethingelse = new Discord.Client()?

earnest phoenix
#
 msg.channel.send(`Hello there!`)
},```
inner jewel
#

:^)

umbral pelican
#

mmLol what has this channel turned into

earnest phoenix
fringe flame
#

how can i explain....

prime cliff
#

This channel has turned into the 24/7 Deni helpline

earnest phoenix
fringe flame
#

@earnest phoenix to change the nickname is: client.user.setUsername('username here')

earnest phoenix
#

As a command that is

#

xD

#

If i put ('username here') its gonna say that

fringe flame
#

no

earnest phoenix
#

I want it to change its global name for events like i put a halloween name

fringe flame
#

but you want to do like: -username hello

#

and change to hello?

earnest phoenix
#

Yes

fringe flame
#
 const args = message.content.split(" ").slice(1);
 const client = new Discord.Client();
 client.user.setUsername(args.join(" "))
},```
earnest phoenix
#

Is that to change the name

fringe flame
#

yes

earnest phoenix
#

Thx

shrewd field
#

how can i make the bot's avatar appear in the footer like this

faint jetty
#

Dude

#

There are docs

bitter sundial
#

check the docs

shrewd field
#

i didi did

prime cliff
#

He never checks the docs Thonk

shrewd field
#

my code

faint jetty
#

If you did

#

You would know

shrewd field
#

.

faint jetty
#

BECAUSE IT IS AN ID

prime cliff
karmic parcel
prime cliff
#

Literally right next to it

bitter sundial
#

also

#

he's putting it in the text part

#

clearly not reading docs

faint jetty
#

@shrewd field read the docs before asking questions please

shrewd field
#

ok

faint jetty
#

All your answers are probably there

shrewd field
#

which part of the docs

bitter sundial
#

RichEmbed

faint jetty
#

..

#

whatever class that you need docs from

#

in this case it’s RichEmbed as tonkku said

shrewd field
#

ok

prime cliff
#

The discord.js docs are the best i have seen how can you not understand it >_<

faint jetty
#

they’re readable and clearly explained

#

which is the entire purpose of documentation

shrewd field
#

ok

#

i read but

#

i dont think it is .avatar

fringe flame
#

@shrewd field you can only do it with the old embed system

shrewd field
#

ok

#

so

#

this

#

with

#

the url as

#

\

scenic crest
#

what

shrewd field
#

nvm

earnest phoenix
#

Hey guys, I'm trying to figure how to make an on/off toggle for commands per server. How would I accomplish this?

scenic crest
#

@earnest phoenix are you using some kind of data storage yet

earnest phoenix
#

In Python, forgot to add that

#

I can do JSON storages

#

That's as far as my knowledge has taught me

prime cliff
#

You just store the allowed commands with the guild id

#

Easy peasy

scenic crest
#

I personally hate it for mass storage but it's your pick

#

so this is what I'd do

#

in the per guild storage file

#

have an array of disabled command names

#

and in your command executor

#

if the command name is inside of the disabled command names array

#

then the command is disabled

earnest phoenix
#

Okay I see what you mean

#

That's doable then, I just wasn't too sure where to start but that gives me a good foothold of what I should do

#

Thank you <3

scenic crest
#

nws ❤

prime cliff
#

https://i.imgur.com/mDKllvq.png I like using class structures with json its so good and easy since public objects are saved to json and private objects can still be used in functions for temp data

earnest phoenix
#
@welcomeset.command(pass_context=True)
    async def toggle(self, ctx):
        """Turns on/off welcoming new users to the server"""
        server = ctx.message.server
        self.settings[server.id]["ON"] = not self.settings[server.id]["ON"]
        if self.settings[server.id]["ON"]:
            await self.bot.say("**I will now use welcomeimg.**")
            await self.send_testing_msg(ctx)
        else:
            await self.bot.say("**I will no longer use welcomeimg.**")
        fileIO("data/welcome/settings.json", "save", self.settings)

Would this seem right?

scenic crest
#

UH

#

my python is terrible

#

I'll try to decode

earnest phoenix
#

ok haha

scenic crest
#

is "ON" in JSON?

earnest phoenix
#

yea

scenic crest
#

it's general bad practise to use uppercase letters in JSON

#

just saying that

earnest phoenix
#

I have an ON and OFF in the json, with guild ID's in the corresponding list

#

okay

#

I'll correct that then

scenic crest
#

hmm might work

#

run it ;D

earnest phoenix
#

oki doki, thought I'd check in for corrections before I ran it c:

lime falcon
#

Quick question: is it possible for user ID's and guild ID's to ever conflict?

bitter sundial
#

no

lime falcon
#

Alright, thanks

#

"Snowflake" type implied that but I didn't see it stated, so wanted to double check

shrewd field
#

how can i get this ^^

#

i tried

#

work

#

i want the name and the discriminator

scenic crest
#

are you getting an error?

#

also, you use "author" and "user"

#

make up your mind Thonk

tawny lava
#

Just do message.author.tag

topaz fjord
#

how do i warp this in a timeout

#
  const dispatcher = serverQueue.connection.playStream(yt(song.url))
    .on('end', reason => {
      if (reason === 'Stream is not generating quickly enough.') console.log('Song ended.');
      else console.log(reason);
      serverQueue.songs.shift();
      play(guild, serverQueue.songs[0]);
    })
    .on('error', error => console.error(error));
  dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);

  serverQueue.textChannel.send(`🎶 Start playing: **${song.title}**`);
}
faint jetty
#

@Deni#0274 the docs tell you

#

what

#

@Deni#0274

prime cliff
#

He is offline

faint jetty
#

He’s not in the server?

prime cliff
#

No he is just invis or offline so you cant mention him

faint jetty
#

You can mention offline people

#

and invis

prime cliff
#

No not invis people see look at my status and ping me

trim steppe
#

@prime cliff

topaz fjord
#

so anyone have an idea

prime cliff
#

Oh Thonk idk why its not working then

topaz fjord
#

to wrap the .on in a timeout

sinful meadow
#

@shrewd field mate

#

do message.author.tag

barren brook
#

I have a developing question.

sinful meadow
#

Sure

barren brook
#

I want to know as I know how to make a bot I just I have scripts but I dint know how to put the scripts in...

sinful meadow
#

What language are the scripts

barren brook
#

Java.

sinful meadow
#

~leaves~ @inner jewel

#

Ask him^^^^

inner jewel
#

java
script

sinful meadow
#

lel

barren brook
#

What one of the java scripts?

inner jewel
#

what's the file extension?

#

.js?

#

inb4 it's javascript

barren brook
#

Umm... (I dont really think I can ansee that question)

inner jewel
#

what

sinful meadow
#

He cant see the extenstion @inner jewel

inner jewel
#

also want to know as I know how to make a bot I just I have scripts but I dint know how to put the scripts in... what is this supposed to mean?

sinful meadow
#

@barren brook

inner jewel
barren brook
#

I would like to say,I use node.js. If thats the answer to the question.

sinful meadow
#

kk

karmic parcel
sinful meadow
#

Soooooo

#

javascript

barren brook
#

Ya.

sinful meadow
#

Send the code

barren brook
#

So the script?

inner jewel
#

node.js isn't java btw

sinful meadow
#

Yea

inner jewel
#

java and javascript are completely different languages

barren brook
#

I Javascript.

sinful meadow
#

Send the script

barren brook
#

Ok.

#

'help': (msg) => {
const helpMsg = [
`Prefix is `${keys.prefix}``,
`(Any message)`,
];
msg.author.send(helpMsg.join('\n'));
msg.reply(`Message sent to ur DM's!`)
},

sinful meadow
#

um

barren brook
#

Um?

sinful meadow
#

kinda confused

#

on why you have the help

#

in a weird ass case

median lintel
#

that is not proper js

sinful meadow
#

^^^

barren brook
#

Let me try fixing it.

median lintel
#

1st of all, its not an array and u use []

barren brook
#
 const helpMsg = [
     `Prefix is \`${keys.prefix}\``,
     `(Any message)`,
   ];
   msg.author.send(helpMsg.join('\n'));
msg.reply(`Message sent to ur DM\'s!`)
},  ```
median lintel
#

ok

sinful meadow
#

nope

median lintel
#

it is array

#

lool

sinful meadow
#

wait

#

ok i understand that alittle now

median lintel
#
    'help': (msg) => {
 const helpMsg = [
     `Prefix is \`${keys.prefix}\``,
     `(Any message)`
   ];
   msg.author.send(helpMsg.join('\n'));
msg.reply(`Message sent to ur DM\'s!`)
} ```
#

u dont put a comma at the end of the array

#

do i want it to randomize the messages in the array?

faint jetty
#

yes

median lintel
barren brook
#

Um; Should I go to it?

median lintel
#

yes

barren brook
#

Ok.

median lintel
#

pls learn basic-er javascript

barren brook
#

Ok.

trim steppe
#

or use lua

sinful meadow
#

ew

trim steppe
#

because roblox scripting uses the same language

barren brook
#

I'm also a roblox scripter.

topaz fjord
#

another roblox scripter....

earnest phoenix
#
const Discord = require('discord.js')
const fs = require('fs')
const moment = require('moment')
exports.run = (client, message, args) => {
    if (userData[sender.id + message.guild.id].lastDaily !=moment().format('L')) {
        userData[sender.id + message.guild.id].lastDaily = moment.format('L')
        userData[sender.id + message.guild.id].money += 500;
    let embed = new Discord.RichEmbed()
        .setAuthor('Daily Reward', client.user.displayAvatarURL)
        .setDescription('You got $500 added to your account')
    } else

        .setAuthor('Daily Reward', client.user.displayAvatarURL)
        .setDescription('You already collected your daily reward! You can collect your next reward ' + moment().endOf('day').fromNow() + '.')
        message.channel.send({embed})
    }
#

im getting an error for the .

#

for .setAuthor

#

after the } else

#

i dont know what i can do

trim steppe
#

here you dropped this {

frail terrace
#

ecks dee

earnest phoenix
#

nice indentation

jagged plume
#

needs some visual studio code™

earnest phoenix
#

@languid geode

#

;3

earnest phoenix
#

xD

#

i do use visual studio

#

code

#

now

#

i fixed that but i failed here

#
const Discord = require('discord.js')
const fs = require('fs')
const moment = require('moment')
exports.run = (client, message, args) => {

    let userData = JSON.parse(fs.readFileSync('Storage/userData.json', 'utf8'))  
    let sender = message.author
    let embed = new Discord.RichEmbed()

    if (userData[sender.id + message.guild.id].lastDaily != moment().format('L')) {
        userData[sender.id + message.guild.id].lastDaily = moment().format('L')
        userData[sender.id + message.guild.id].money += 500;

        let embed = new Discord.RichEmbed()        
        fs.writeFile('Storage/userData.json', JSON.stringify(userData), (err) => {
            if (err) console.error(err);
        })
        embed.setAuthor('Daily Reward', client.user.displayAvatarURL)
        .setDescription('You got $500 added to your account')
    } else 
        embed.setAuthor('Daily Reward', client.user.displayAvatarURL)
        .setDescription('You already collected your daily reward! You can collect your next reward ' + moment().endOf('day').fromNow() + '.')
        message.channel.send({embed})

}
#

the embed isnt showing and im not getting any money eitehr

#

help

#

step one

#

dont store data that is frequently changed or accessed in json

sinful meadow
#

^^^

#

Love the copy+paste from an idiots guide @earnest phoenix

earnest phoenix
#

?

#

i got this from watching truexpixels @sinful meadow

sinful meadow
#

Well he copied and pasted

earnest phoenix
#

and this is money

#

/balance

#

anidiots guide doesnt have that

#

just a points based system

sinful meadow
#

Yes is does

#

og

earnest phoenix
#

link?

sinful meadow
#

omg

earnest phoenix
#

xD

sinful meadow
#

its the same shit

#

just renamed

earnest phoenix
#

thats a levelup

#

system

#

:3

#

this isnt leveling up

#

:3

sinful meadow
#

omg

#

Its stil the same system

earnest phoenix
#

xD

#

lel

#

well

#

cant u stop criticizing and help?

sinful meadow
#

Im not critcizing im just saying

#

dont copy and paste

#

you wont learn anything

earnest phoenix
#

i didnt

#

copy and paste -.-

sinful meadow
#

To me it looks like it

earnest phoenix
#

-.- can u help

#

or no

sinful meadow
#

What are you trying to fix

earnest phoenix
#

its not sending the embed or adding any money

sinful meadow
#

What does it do

#

like err?

earnest phoenix
#

no error

#

wait nvm

#

{"258970604005359616343572980351107077":{"money":1000,"lastDaily":"Not Collected."}}

#

TypeError: Cannot read property 'lastDaily' of undefined

sinful meadow
#

its not a vaue

#

Make it eaiser

#

Do lastDaily = 1

#

Means they have got it

#

0 is false

earnest phoenix
#

so

#

let lastDaily = 1

sinful meadow
#

Plus

#

What is that id or giant string

#

258970604005359616343572980351107077

#

What is that

earnest phoenix
#

thats senderid + guildid

sinful meadow
#

Why combine it

earnest phoenix
#

idk

#

its for

#

guilds

#

so it can seperate it so when i do a command that shows global highest

#

and guild highest

sinful meadow
#

Dont combine it then

earnest phoenix
#

@sinful meadow

#

i gave up on that

#

but

sinful meadow
#

wut

earnest phoenix
#

now im trying to add subfolders

#

let commandFile = require(./commands/administration/${command}.js) || require(./commands/developer/${command}.js) || require(./commands/information/${command}.js) || require(./commands/moderation/${command}.js);

#

how could i loop this

#

im trying to loop it with fs

sinful meadow
#

setInterval

earnest phoenix
#

loop all the folders

#

with fs

#

:3

sinful meadow
#

You can loop with normal js

earnest phoenix
#

i dont know how to loop them

sinful meadow
#

not fucking fs

earnest phoenix
#

evie.codes

#

told me

#

xD

#

that

#

how

#

@sinful meadow

sinful meadow
#

setInterval forEach For loop @earnest phoenix

earnest phoenix
#

example?

sinful meadow
#

Nope

earnest phoenix
#

.-.

sinful meadow
#

Im not going to spoon feed

earnest phoenix
#

.-. its a small code

#

so i can use subfolders

sinful meadow
#

Your point is

#

Its still code

#

im not spoon feeding

earnest phoenix
#

k

#

then dont help

sinful meadow
#

Im helping just not spoon feeding

earnest phoenix
#

um

#

well

#

how about you learn js before you try making a bot

sinful meadow
#

^^^^^^

earnest phoenix
#

lol 6 bots

keen nest
#

No

#

Make bot then js

#

-bots

gilded plankBOT
#
VictoryForPhil#4759
Bots

@timber jungle
@trail wing

keen nest
#

(just Disnode bot 😛)

#

Need more.

#

Need empire.

keen nest
#

Okay

#

+1 to empire

rustic walrus
#

hi

shrewd field
#

guys how can i make a command that responds with the owner name

bitter sundial
#

the owner is an object

#

get the username from that object

shrewd field
#

what could i put before

#

guild.owner

bitter sundial
#

and member?

#

probably undefined

shrewd field
#

remove member

bitter sundial
#

should be message

#

right?

shrewd field
#

idk i will try

#

i want the owner of the guild

#

nope

#

it is an error

#

tonkku

#

@bitter sundial

#

what do u think

bitter sundial
#

you are sending an empty message

shrewd field
#

ok

#

how can i get the owner of the guilds name

bitter sundial
#

because you have the owner object not the username

#

see the docs again

stone kiln
#

RTFM

shrewd field
#

username

#

??/

stone kiln
#

RTFM = read the fucking manual

#

manual = docs in this case

shrewd field
#

i did

stone kiln
#

...

#

not correct it looks like

stone kiln
#

🤦

#

that is an object

shrewd field
#

what do u mean object

stone kiln
#

do you not know what an object is in coding

shrewd field
#

no

#

tell me

stone kiln
#

come on dude that is basic stuff

shrewd field
#

huh

#

example

#

of an objet

stone kiln
#

...

#
var obj = { foo: 'bar' };```
...
shrewd field
#

huh

#

obj is a variable

#

if foo is said bar is sent back

#

right

stone kiln
#

🤦

shrewd field
#

then what

stone kiln
#

just do research
on what an object is
not gonna spoonfeed
what is super basic stuff

shrewd field
#

ok

topaz fjord
#

@shrewd field

shrewd field
#

i read it object turtle

#

then now waht

indigo nest
#

announcement code error http://prntscr.com/gtz4mn client.on(message, message => { if (message.content === "/announce") { let modRole = message.guild.roles.find("name", "Moderators"); if(message.member.roles.has(modRole.id)) { let announcement = args.join(" "); const embed = new Discord.RichEmbed() .setColor(0x00AE86) .setTimestamp() .addField(New Announcement by ${message.author.username}, ${announcement}) client.channels.find("name", "bot_testing_room_2").sendEmbed(embed); message.channel.sendMessage(👌 Annoucement sent to #bot_testing_room_2) } else { message.channel.sendMessage("**Error:** \n You dont have permission 'Moderators' to announce") } )};

Lightshot

Captured with Lightshot

median lintel
#

please

tawny lava
#

use codeblocks™

median lintel
#

^

tawny lava
#

also don't use sendMessage / sendCode

#

they're deprecated, use send

indigo nest
#

@tawny lava can you fix it

tawny lava
#

¯_(ツ)_/¯

median lintel
#
client.on(message, message => {
    if (message.content === "/announce") {
  let modRole = message.guild.roles.find("name", "Moderators");
  if(message.member.roles.has(modRole.id)) {
  let announcement = args.join(" ");
  const embed = new Discord.RichEmbed()
  .setColor(0x00AE86)
  .setTimestamp()
  .addField(New Announcement by ${message.author.username},${announcement})
  client.channels.find("name", "bot_testing_room_2").sendEmbed(embed);
  message.channel.sendMessage(:ok_hand: Annoucement sent to #bot_testing_room_2)
} else {
  message.channel.sendMessage("**Error:** \n You dont have permission 'Moderators' to announce")
}
)};
indigo nest
#

new?

tawny lava
#

.addField(New Announcement by ${message.author.username},${announcement})

#

this is the problem

indigo nest
#

@median lintel

#

you make this mistake

median lintel
#

um

tawny lava
#

I just told you what's the error

median lintel
#

i didnt do anything

#

i just formatted it properly

indigo nest
#

thanks

#

I need the proper announcement code to tell me @tawny lava

tawny lava
#

or you can fix it yourself

median lintel
#
.addField(`New Announcement by ${message.author.username},${announcement}`)
indigo nest
#

my code knowledge is not very good

#

How do you write so?

#

error code How do you write so?

median lintel
#

```js
// your code
```

indigo nest
#

js// your code

median lintel
#

🤦

indigo nest
#

😦

#
    if (message.content === "/announce") {
  let modRole = message.guild.roles.find("name", "Moderators");
  if(message.member.roles.has(modRole.id)) {
  let announcement = args.join(" ");
  const embed = new Discord.RichEmbed()
  .setColor(0x00AE86)
  .setTimestamp()
  .addField(`New Announcement by ${message.author.username},${announcement}`)
  client.channels.find("name", "bot_testing_room_2").sendEmbed(embed);
  message.channel.sendMessage(:ok_hand: Annoucement sent to #bot_testing_room_2)
} else {
  message.channel.sendMessage("**Error:** \n You dont have permission 'Moderators' to announce")
}
)};```
median lintel
#
// your code
indigo nest
#

do you have the possibility to make a statement ready for me

tawny lava
#

message.channel.sendMessage(👌 Annoucement sent to #bot_testing_room_2)

#

this

indigo nest
#

okey change

topaz fjord
#

Code block

#

Pleqae

tawny lava
#

you're missing something in that line

topaz fjord
#

Something vital

indigo nest
#

how so?

topaz fjord
#

Think

tawny lava
#

you're missing something important

median lintel
#

lmao

indigo nest
#

enough is not causing either

indigo nest
#

?deneme

shrewd field
#

Guys how can i make two embeds in one comand

#

Like this

tawny lava
#

send multiple embeds Thonk

weak parrot
#

^^

shrewd field
#

In the same command

#

Like how

#

The rich embed

#

Two rich embeds in one

#

??????

earnest phoenix
#

🤦

#

Look I take the code of the other guy

#
  const embed = new Discord.RichEmbed()
  .setColor(0x00AE86)
  .setTimestamp()
  .addField(`New Announcement by ${message.author.username},${announcement}`);

const embed2 = new Discord.RichEmbed()
.setColor(dick)
.setTimestamp()
.addField('xd');

msg.channel.sendEmbed(embed)
msg.channel.sendEmbed(embed2)
#

I don't use D.JS so

tawny lava
#
const embed = new Discord.RichEmbed()
.setColor(0x00AE86)
.setTimestamp()
.addField(`New Announcement by ${message.author.username},${announcement}`);

const embed2 = new Discord.RichEmbed()
.setColor(dick)
.setTimestamp()
.addField('xd');

msg.channel.send({embed})
msg.channel.send({embed: embed2})
earnest phoenix
#

Oh yeah sendEmbed is Deprecated

tawny lava
#

ye

median lintel
#

-bots @earnest phoenix

gilded plankBOT
#
Kiru#6668
Bots <:certifieddev:308880841382297610>

@open oar certifiedbot

median lintel
#

avatar looks like a japenese porno

bitter sundial
#

it is

spare spruce
#

Cannot read property 'toString' of undefined idk how fix this :/ its my old old OLD code mine when was d js 8.10 and i trying test stuff make read api from txt file

#

if anyone up help

earnest phoenix
#

No

#

It's an hoodie

#

For anti social social club

median lintel
#

wat

earnest phoenix
#

AHH.. this partnership cog is going to be the death of me lmao

earnest phoenix
#
const Discord = require('discord.js')
exports.run = (client, message, args) => {
    let member = message.mentions.members.first()    
    let content = message.content.split(' ').slice(1).join(' ')
    if(!member) return message.reply('Please mention a member.')
    if(!content) return message.reply('Please enter something.')
            
    
    message.member.setNickname(content)
}
#

im getting an error

#

of privilege too low

#

but the bot has higher role than user

inner jewel
#

use member.setNickname instead of message.member.setNickname

scenic crest
#

@earnest phoenix if you're the guild owner they cannot modify your nickname regardless of role hirarchy

earnest phoenix
#

fixed it

#

it wasnt that

scenic crest
#

that's still a fact though

earnest phoenix
#

ik

ebon helm
#

i need help

#

making a bot

sinful meadow
#

sure @ebon helm

ebon helm
#

like everything

keen nest
#

^help

#

Shit

#

^halpme