#development

1 messages Β· Page 395 of 1

vast bane
#

thanks tho

uncut slate
#

not really development related

vast bane
#

good point

#

i'm tired

#

xd

#

Alright, but still thanks for unmuting!

misty pawn
#

Anyone here can guide me to a page that can explain, how to make custom images (f.e. to use for profile-commands) with JDA/Java?
Should be more or less for noobs, because I never did such a thing before but really want to try it.

inner jewel
#

take a look at BufferedImage/Graphics2D

misty pawn
#

ok :/

#

Lets see how fast my brain will explode

#

Brain.exe stopped responding

uncut slate
#

@inner jewel how much do you know about java dev on linux

vapid pond
#

hi how do i get my bot online

#

library: other

fleet mason
#

like the bot cant find my role

vapid pond
#

where do i go to code my bot and input that stuff

#

i have an app

fleet mason
#

server? aws?

vapid pond
#

me

#

?

fleet mason
#

Winspc is a good app to ransfer files

#

yea

vapid pond
#

can i send you an invite to show you what i mean?

fleet mason
#

ok

#

anyone have a problem with it?

inner jewel
#

@uncut slate define "java dev on linux"

uncut slate
#

nvm, already found what I needed

#

needed to ask some stuff about openjdk stuff

fleet mason
#

any one else have problems with roles? ``` let mod = message.guild.roles.get("432263170178940928");

message.delete();
if(message.member.roles.has(mod)) console.log("ok this works");
if(!message.member.roles.has(mod)) return;```

low wasp
#

make sure its the correct id

earnest phoenix
#

@finite tendon

fleet mason
#

It is the right id I checked it with console.log(message.guild.roles) but it worked when I did message.member.roles.find("name" ,"mod") @low wasp

earnest phoenix
#

hey

#

does someone knows how to make custom prefixes?

#

ples halp

#

lol

#

a bot answers to ples halp

glossy mason
#

No one can help if you don't say what lang.

lavish mango
#

Yeah that would be helpful

trim plinth
#

they're using JS

earnest phoenix
#

yeah

#

:3

vestal steppe
abstract mango
abstract mango
#

So I'm trying to use lavalink.py with Lavalink for a music bot. I've got most of everything working. However, when trying to play music Lavalink's console comes up with this error. Anyone else?

topaz fjord
#

@abstract mango you should ask in the lavaplayer server

abstract mango
#

yeah true

#

i'll join there now, ty

gilded thunder
#

This gives me an inconsistent indent error

@bot.event
async def on_command_error(event, ctx):
    if isinstance(event, commands.CheckFailure):
        embed=discord.Embed(title="An error has occured.", description="Whoops! An error has occured and I can't run the command you wanted to run, the most common causes of this are", color=0xff0000)
         embed.add_field(name=Invalid permissions, value=You may of tried to run a moderator command without permissions., inline=False)
         embed.add_field(name=Invalid command, value=This command may not exist!, inline=True)
         embed.add_field(name=Owner only command, value=The command could just be reserved for the developer., inline=True)
         embed.set_footer(text="All good, you haven't broken the bot or anything.")
        await bot.send_message(ctx.message.channel, embed=embed)```
#

Yes, it is indented properly, 4 spaces each and 8 right now.

#

@cedar jasper Thought the code I showed you was complex?

cedar jasper
#

lol

#

in my head those are arabic letters

olive ridge
#

lmao

#

they are arabic numbers

#

and english letters

gilded thunder
#
Arc v4                                                      
Connecting to Discord API...                                
Arc is online.                                              
Ignoring exception in on_command_error                      
Traceback (most recent call last):                          
  File "/usr/local/lib/python3.6/site-packages/discord/clien
t.py", line 307, in _run_event                              
    yield from getattr(self, event)(*args, **kwargs)        
  File "bot.py", line 327, in on_command_error              
    embed.add_field(name="Invalid permissions, value=You may
 of tried to run a moderator command without permissions.", 
inline=False)                                               
TypeError: add_field() missing 1 required keyword-only argum
ent: 'value'                                                
^Croot@Joshek:~/Arc# 
#

But there is a value.

#

wait nvm

#

i'm a tarf

#

*tard

#

All clear now.

livid rivet
#

@restive silo can u unmute my bot again? i removed my levelup msg

cunning karma
trim plinth
#

are you posting your server count to the API?

cunning karma
#

wdym? @trim plinth

trim plinth
#

@cunning karma for it to show the servers, you need to post your server count to the website, using the api, docs here https://discordbots.org/api/docs

cunning karma
#

ohh

steel tinsel
#

    title: "Profile for " + cooldude.username,

                                     ^

TypeError: Cannot read property 'username' of undefined

at Client.client.on (/app/server.js:593:38)

    at Client.emit (events.js:180:13)

    at MessageCreateHandler.handle (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/discord.js/11.3.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

    at WebSocketPacketManager.handle (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/discord.js/11.3.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)

    at WebSocketConnection.onPacket (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/discord.js/11.3.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)

    at WebSocketConnection.onMessage (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/discord.js/11.3.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)

    at WebSocket.onMessage (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)

    at WebSocket.emit (events.js:180:13)

    at Receiver._receiver.onmessage (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/websocket.js:137:47)

    at Receiver.dataMessage (/rbd/pnpm-volume/768faaa2-1c53-4031-b548-770885ea090a/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/receiver.js:409:14)

#
var args = commandbody.split(' ');
let cooldude;
      
      if(message.mentions.members.size > 0){
      cooldude = message.mentions.members.first().user;
      } else if (args[1].length == 18 && args[1].match(/^[0-9]+$/) !== null) {
          let cooldude = client.fetchUser(args[1]).then().catch(console.error);
      } else {
        cooldude = message.author;
      }

      
      let uiembed = {embed: {
    color: 0x4A90E2,
    title: "Profile for " + cooldude.username,
        
    "thumbnail": {
      "url": cooldude.avatarURL
    },
    
    fields: [{
        name: ":tickets: Discriminator",
        value: cooldude.tag,
      inline: true
      },
      {
        name: ":id: ID",
        value: cooldude.id,
        inline: true
      },
      {
        name: ":battery: Status",
        value: cooldude.presence.status !== null || cooldude.presence.status !== undefined ? statustags[cooldude.presence.status] : statustags['offline']
      },
      {
        name: ":robot: Bot",
        value: cooldude.bot
      },
      {
        name: ":comet: Account created on:",
        value: cooldude.createdAt
      }
    ],
    timestamp: new Date()
  }
};
      message.channel.send(uiembed);```
#

why?

#

i'm not an expert in promises

cunning karma
#

@trim plinth I am on the site but i am lost can you tell me how? πŸ˜…

trim plinth
#

which language is your bot in?

cunning karma
#

whose? mine d.js

trim plinth
#

mk

steel tinsel
#

d.js

trim plinth
cunning karma
#

okay

steel tinsel
#

and my error?

livid rivet
#

uhh

#

can anyone help me with that too?

#

im in python but i have almost no clue tbh

cunning karma
#

@trim plinth const DBL = require("dblapi.js"); const dbl = new DBL('my key'); setInterval(() => { dbl.postStats(bot.guilds.size, bot); }, 1800000);

#

i used that but it is still not working and sorry for another ping

trim plinth
#

for dbl.postStats, you don't bind to the bot

cunning karma
#

but...

#

then what?

trim plinth
#
const DBL = require('dblapi.js');
const dbl = new DBL('some api token');
setInterval(() => {
        dbl.postStats(bot.guilds.size);
    }, 1800000)
#

@cunning karma

cunning karma
#

i had that before

#

but it was not working too

earnest phoenix
#

Error?

cunning karma
#

Nothing

trim plinth
#

you could also have it this way @cunning karma ```js
const DBL = require("dblapi.js");
const dbl = new DBL('Your discordbots.org token', client);

#

instead of client you'd do bot

#

or whatever you have your client variable named as

earnest phoenix
#

If u rlly want search dis
from: Telk#2726 snekfetch

It shows u the way to post stats the long way

trim plinth
#

that takes too much hassle mmLol

#

it's easier to just use the lib instead of POSTing manually with snekfetch

earnest phoenix
#

Well ye I said if u want to do it the long way

fleet mason
#

any one knows why windows created this \\?\C:\Users\sande\Desktop\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot

#

it just keeps going XD

small bane
#

I need help with the Nadeko bot :3. I can't seem to add new .iam roles ?

trim plinth
#

@fleet mason press Ctrl and C at the same time to stop it

fleet mason
#

its 265 folders

earnest phoenix
#

@small bane go to nadeko’s support server

trim plinth
#

oh god

small bane
#

I couldn't find it @earnest phoenix

fleet mason
#

yea

trim plinth
#

what have you done

fleet mason
#

ik

#

dont know

small bane
#

it send me to the "Discord bot list" server

fleet mason
#

it just appeared like a pokemon XD

#

i cant delete it

#

because the file is to long

earnest phoenix
#

Go to #commands and type β€œ-botinfo @sly snow β€œ

fleet mason
#

262* folders and i cant delete them because its to long...

#

what to do to fix it

cunning karma
#

@trim plinth its still the same ;-;

trim plinth
#

did you actually run the code

cunning karma
#

yeah

trim plinth
#

and you should put that in your ready event btw

cunning karma
#

yeah thats what i did

trim plinth
#

@cunning karma did you install the npm package

cunning karma
#

yes

fleet mason
#

\\?\C:\Users\sande\Desktop\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands it wont stop going like WTF any of you guys know how i can delete this?

cunning karma
#
    bot.on('ready', () => {
    console.log("Loading...");
    setTimeout(function(){
    console.log("Bot has been loaded completely.");
    }, 1000);
    setTimeout(function(){
    console.log(`Logged in as ${bot.user.tag}`);
    }, 2000);
    bot.user.setActivity(`t!help | ${bot.guilds.size} | ${bot.users.size} users`, {type: "PLAYING"});
    setInterval(() => {
        dbl.postStats(bot.guilds.size)
    }, 1800000);
    })```
trim plinth
#

@cunning karma check your console for errors

#

@fleet mason kill the terminal process

#

before you get a bsod from letting sit around for too long

fleet mason
#

the best thing is that all my pces have these folders now because i sync them with onedrive :/

trim plinth
#

ew onedrive

fleet mason
#

i have no better option for school XD

earnest phoenix
#

ur missing the token

fleet mason
#

i hate it because its updates so slow

trim plinth
#

close the terminal and delete the folders, ez

#

@cunning karma did you put the API token

cunning karma
#

yes

trim plinth
#

ok there you go GWproximThumbsUp

cunning karma
#

Thanks πŸ˜ƒ

trim plinth
#

np

fleet mason
#

Can't

trim plinth
#

wtf have you done

fleet mason
#

Idk

trim plinth
#

like actually what

fleet mason
#

It just happend

trim plinth
fleet mason
#

I think OneDrive did it

#

And when I delete it just crashes if I click yes

trim plinth
#

one more reason not to use onedrive

fleet mason
#

True

#

261 folders

#

Kill me

trim plinth
fleet mason
drowsy falcon
#

who uses VPS here?

bitter sundial
#

almost everyone?

drowsy falcon
#

no?

#

what VPS u use?

bitter sundial
#

digitalocean

drowsy falcon
#

kk

#

is it good_

#

?

spring ember
#

It is

#

I use ovh but that's because I am closer to EU

hardy moon
#

My bot is connected but on discord bot list it is diconnected, how to solve the problem ?

spring ember
#

It'll take some time maybe

#

To update

hardy moon
#

Oh ok

tepid laurel
#

Ovh is pretty pkay

#

Okay*

#

I got a year plan there with a mate costed like €44 each

#

Cheap enough for meπŸ€·πŸΌβ€β™‚οΈ

hardy moon
#

I would like to add the command &daily (the prefix of my bot is &) which gives 100 experience points to the player and which is done once a day, can someone send me the Java Script line of code for this order ?

solemn obsidian
#

we dont spoonfeed here

hardy moon
#

In private messages

solemn obsidian
#

we dont spoonfeed there either

toxic oracle
#

we dont talk about there HAHaa

gilded thunder
#
# tempmute command
@bot.command(pass_context=True)
@commands.has_permissions(administrator=True, manage_roles=True)
async def tempmute(ctx, member: discord.Member, time):
    """Tempmutes a user."""
    if ctx.message.author.server_permissions.administrator or ctx.message.author.server_permissions.manage_roles:
        role = discord.utils.get(member.server.roles, name='Muted')
        await bot.add_roles(member, role)
        embed = discord.Embed(title="User Muted!",
                              description="**{0}** was muted by **{1}** for **{2}** seconds!".format(member, ctx.message.author, time),
                              color=0x146aeb)
        await bot.say(embed=embed)
        asyncio.sleep(time)
        await bot.remove_roles(member, role)
    else:
        embed = discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.",
                              color=0x146aeb)
        await bot.say(embed=embed)
``` Would this work?
fleet mason
#

@trim plinth do you thing if someone do !commads/mybot that it will think it is a new directory and make more files?
My command handler ``` client.on("message", message => {
if (message.author.bot) return;
if(message.content.indexOf(config.prefix) !== 0) return;

// This is the best way to define args. Trust me.
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();

// The list of if/else is replaced with those simple 2 lines:
try {
let commandFile = require(./commands/${command}.js);
commandFile.run(client, message, args);
} catch (err) {
console.error(err);
}
});```

#

or anyone?

#

because something created 262 folders after echother

low owl
#

You don't seem to create a directory at all there

fleet mason
#

@low owl how could my bot create 262 folders ?

#

C:\Users\sande\Desktop\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot

#

these folders just keep going XD

#

anyone knows why this got created by either the bot or onedrive

low owl
#

No idea, I don't do Javascript. And I doubt require creates a folder if it can't find one

solid cliff
toxic oracle
solid cliff
#

2muchconnections

#

cant connect to it πŸ‘€

#

if I limit it to something like if user.id == x it would connect fine Baka

solemn obsidian
#

show code

#

I hope u arent opening a connection per message

low owl
#

Probably does so

toxic oracle
#

when is execute ran

solid cliff
#

on_message mm

toxic oracle
#

smh

low owl
#

But, why?

solid cliff
#

i need to get lastxp time Baka

toxic oracle
#

open a connection, store it in client or smth so its always accessable

#

and then use that for queries

#

instead of opening and closing connections constantly

low owl
#

Also, I would advise against the way you write queries.

#

Very prone to errors. There are solutions that generate the query string for you.

#

And are (imo) much easier to read

lone wraith
#

I have a retarded question, I'm trying to use an API in the guideline it says 1 request per 2 seconds. does that mean I can only use a command once every two seconds or what ?

earnest phoenix
#

i need help

#

with eval

#

it doesnt send the message

#

when !eval was executed by other user

fleet mason
#

do you get a error

toxic oracle
#

@earnest phoenix ^

earnest phoenix
#

i fixed it

#

i was using the wrong bot

#

xd

hardy moon
#

I would like to add the command &daily (the prefix of my bot is &) which gives 100 experience points to the player and which is done once a day, can someone send me the Java Script line of code for this order ?

solemn obsidian
#

as we said, we aren't gonna help if you aren't gonna try

earnest phoenix
#

._.

#

I knoe how

#

I mean, i dont knoe

#

.-.

toxic oracle
#

lmao wtf

low owl
#

You won't learn anything from getting spoonfed and it also wastes our time

earnest phoenix
#

Take ur time writing

#

:v

fleet mason
#

@hardy moon ...

#

yea

earnest phoenix
#

Ples halp

toxic oracle
#

what do u need help with

earnest phoenix
#

I has a problem

#

Oh, nvm

toxic oracle
#

ok

earnest phoenix
#

It was a semicolon :v

toxic oracle
#

i know what "it" was

earnest phoenix
#

What?

toxic oracle
#

dw

earnest phoenix
#

No confoose taxie ._.

#

Da wae?

#

Doctor Who?

toxic oracle
#

pls

#

this channel is for bot development

#

not stale memes

earnest phoenix
#

Lol

#

I had a problem

#

And then i found out it was a missing semicolon :)

toxic oracle
#

ok

hushed oyster
#

why python is better

restive silo
#

its not

#

thanks

fleet mason
#

any one knows how i can delete a infinite file or like 242 folders

low owl
#

Break the chain

fleet mason
#

no

#

dosent work

low owl
#

Can't you just delete the root?

fleet mason
#

nop

#

it wont

low owl
#

Ah.. are you on linux?

fleet mason
#

windows

low owl
#

What does your file/folder structure look like?

fleet mason
#

C:\Users\sande\Desktop\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot\commands\EUW Bot

#

ect

low owl
#

Why can you not delete the second EUW Bot?

fleet mason
#

idk

#

name to long

low owl
#

Is there some sort of error?

#

Ah

#

Can you quickly boot up CMD/Powershell and navigate to the root of your recursive folder?

#

Or just do: rmdir /s /q "\\?c:\Users\sande\Desktop\EUW Bot\commands"

#

If you wonder what \?\ is, it turns off file name checks

fleet mason
#

idk

inner jewel
#

and allows paths > 260 chars

fleet mason
#

why does windows allow something to create 262 folders... Who does that on purpose

low owl
#

It's not the OS' fault

fleet mason
#

ik but when it cant delete it i think windows lack some features

low owl
#

Well, that it can't delete it because file name is too big is kind of meh and surely has its origin in some implementation of some system. But unfortunately you have to deal with it.

#

Were you able to delete it now?

fleet mason
#

yea

low owl
#

@languid dragon How do you connect to your other shards? πŸ€”

#

like, in your shards command

languid dragon
#

wym

#

:t shards?

low owl
#

Yea

languid dragon
#

you'd need to ask @earnest phoenix he did that

#

but im pretty sure it's just something to do with the eris sharder we use

low owl
#

Ah, alright, nevermind it then. Thanks for the answer anyways πŸ˜„

uncut slate
#

Eris itself can do that

#

You don't need a sharder for that

#

and I don't even think you're using an Eris sharder @languid dragon

languid dragon
#

wym

uncut slate
#

Eris has seamless internal sharding, you don't really need "an Eris sharder"

#

unless you're in a buttfuckton of guilds

languid dragon
#

honestly im clueless with the eris stuff

#

it's all solace that does @cosmic shoal
tbh i just help out with the code and logic with some stuff

#

Solace has done (for the most part) the structure

#

and the commands and stuff

#

i'm just cleanup duty LUL

uncut slate
#

gotcha

#

but yeah it's probably just native eris

languid dragon
#

pretty sure it is

uncut slate
earnest phoenix
#

it is

#

bc im lazy

#

will move to new sharder within next 5 months

carmine berry
#

Yesterday my bot launched both shards fine but today only one shard is working. could someone help as i do not know what to do

uncut slate
#

you don't have to use an external sharder for Eris below 50k guilds imo

topaz fjord
#

fix d.js sharder when

uncut slate
#

memer started getting issues with Eris internal sharder at 60k but that wasn't Eris' fault, it was Node not being able to handle that much I/O on a single process

#

d.js is a lost cause :^)

topaz fjord
#

Also ppl say the d.js v12 sharder is better

#

idk about that

austere meadow
#

its better than v11 imo

#

even though ive never used it what am i talking about

topaz fjord
#

good thing im rewriting with v12 since i dont want everything to fuck up when its out

austere meadow
#

v12 is just a lot better than v11 why do people even use stable

#

people should just use master

#

very good

topaz fjord
#

but they dont

#

cus either they dont know about it

#

and they just dont want too

austere meadow
#

i hear people say "ill wait until its stable" but lets get real they won't release it for another good few months

topaz fjord
#

when it goes stable they will probs cry

austere meadow
#

even though it is relatively stable its still not gonna get released for a loooong time mmLol

topaz fjord
#

cus it breaks everything

austere meadow
#

it does its a big update

#

but thats why people should update as new things get released

#

thats what i do, im always updated to latest master

#

unless its a bad update

topaz fjord
#

which is why im rewriting :^)

austere meadow
#

but you wouldn't have to rewrite if you constantly updated your code weSmart

topaz fjord
#

i wouldnt

#

but im too lazy

austere meadow
#

yes

topaz fjord
#

i skipped from 11.2.1 to v12

austere meadow
#

oof

topaz fjord
#

fuck the rest

tiny turtle
languid dragon
#

css

pastel solstice
#

I have a bot that's already on DBL's website, but got recently kicked from the discord server b/c the help command didn't work. How would I be able to request to get it back on this server, since the bug was fixed?

languid dragon
#

speak with the mod who kicked it

#

you can find that sort of information by searching in #mod-logs

pastel solstice
#

ok cool

earnest phoenix
#

What do i do if i want to get invites to the discords my bot is in

delicate zephyr
#

Why do you want to do that

elder rapids
#

^

floral stone
#

To exploit them

elder rapids
#

I find it rude to have your bot create active invites to servers it's in if it's unwarranted

#

Or even get active invites if possible

floral stone
#

It's not rude, it's shitty.

elder rapids
#

It's rude also

gilded blaze
#

Is it possible to get a users badges?

#

these

floral stone
#

Language?

gilded blaze
#

Javascript

#

the only one i know how is nitro

inner jewel
#

no

#

you can't get the nitro either

#

you can check for animated avatar

#

but not all nitro users have aninated avatars

gilded blaze
inner jewel
#

wat

floral stone
#

Premium is nitro.

gilded blaze
#

nvm. the only way to access that is with a user account

#

rip

floral stone
delicate zephyr
#

that would just endorse making people pay for use of bots

#

like Nitro only bots

inner jewel
#

for selfbots @floral stone

floral stone
#

Fuck.

inner jewel
#

the api doesn't show this info

#

tbh it could show for oauth with identify

floral stone
#

Be nice if it did.

gilded blaze
#

ye

dire shell
earnest phoenix
#

@earnest phoenix So, what is exactly your problem for now?

#

I Can’t Get My Bot To Go Online, BTW I Didn’t Really Do Much Coding…

#

What kind of error you getting in your terminal or console.

#

If I Can’t Get My Bot Online I Cant Have It Approved

#

I know you can't get it online but is there a any error what you get when you just pressing/entering your command-start line.

#

Yes

#

EOF

#

Or

#

Just Wait

#

What you already made if I may can ask you.

#

In which language?

#

JavaScript And Discord

#

Hold on

#

Back

#

don’t know what it menas

#

Means*

#

MPPPHH STUPID PROBLEMS

#

Why This Have To Happen To Me??

#

So…

#

Hold On, Take This To DM (Direct Message)

sinful lotus
#

invalid character means something is not right
line #1 is where it is

#

thats quite easy to fix compared to the other errors

misty pilot
#

b1 use magnetr

#

b1 use magnet

earnest phoenix
vital lark
#

you need the help object in that command GWchadMEGATHINK

muted oxide
#

how do I override my HelpFormatter

#

my helppls command stopped working

sturdy herald
#

What languages do you guys suggest for a starter?

muted oxide
#

@sturdy herald python

restive silo
#

JS or Python

sturdy herald
#

ok

#

Ive done JS, and currently Im trying to learn Python.

earnest phoenix
#

hey

#
joinedguilds[i] = new JoinedGuild(x.Name, $"{x.Owner} ({x.OwnerId})", x.GetInvitesAsync().Result.First().ToString());```
#

returns 'One or more errors occurred. (The server responded with error 50013: Missing Permissions)'

#

please help :0

inner jewel
#

your bot doesnt have permissions to retrieve invites

#

also don't do thwt

#

that*

earnest phoenix
#

why?

#

not allowed?

inner jewel
#

users wouldn't want a bot logging an invite to their guild

earnest phoenix
#

it's for unbans

#

people can then get a reinvite if they're banned

#

assuming they're in here or another server with my bot

muted oxide
#

well the code is too long for me to tab

upper ember
#

Hi, anyone want to create β€œlogin with discord” button on dashboard.luki.xyz, I have some money I can give for that <thinkEyes406800811700781076>

earnest phoenix
#

no spoon feeding lmao

#

also what backend?

inner jewel
#

doesn't really matter

#

just needs to redirect

#

to oauth2 authorize page

earnest phoenix
#

tru

#

but the annoying part is retrieving the data

gilded blaze
#

Not really

upper ember
#

Yeye

#

Whatever

#

Anyone can do that? thinkEyes

gilded blaze
#

What lang

upper ember
#

I don’t care

#

I have new vps for that

#

Ubuntu

gilded blaze
#

Wew

upper ember
#

And when you click on server you can invite the bot to him

#

I’ll do the dashboard later

gilded blaze
#

Lol that’s my website

#

Gg

upper ember
#

Ohh gg

#

I was gonna dm u about that

#

So, can you do such thing? For money if you want

gilded blaze
#

-botinfo @earnest phoenix

gilded plankBOT
#
Bot info <:dblCertified:392249976639455232>
ID

365958655926992896

Username

Luki

Discriminator

9729

Short Description

Luki is an easy-to-use bot with commands that can be used for fun, moderation, games, and more!

Library

Luki.js

Prefix

l.

Upvotes

102

Server Count

1535 Servers

Owner(s)

@upper ember dblCertifiedDev
@astral patio dblCertifiedDev
@timber hawk

upper ember
#

Yea, that’s my bot

#

You use apache?

gilded blaze
#

Yeah

upper ember
#

So.. can you do such thing for me?

gilded blaze
#

Yeah

upper ember
#

How much do you want for that?

gilded blaze
#

5$

upper ember
#

Alrighty

#

Just make it luki.js style

#

Luki.xyz*

gilded blaze
#

Ok

upper ember
#

I’ll pay and then the code?

#

I prefer, you’ll finish, show me, I will pay, and then the code

gilded blaze
#

Yeah. I’ll even show you the product

upper ember
#

well

#

When it will be ready?

gilded blaze
#

That’s the question Thonk

upper ember
#

Ohh about the secret/token just do
var token = TOKEN_HERE or something like that

#

@gilded blaze what should be the question?

gilded blaze
#

Maybe a couple of days

#

Cause I’m probs gonna run into an issue

upper ember
#

Ok

#

I mean, you have the code

#

Just change the style foxpalm

gilded blaze
#

Ye

solid cliff
#

how 2 rounded image in PIL πŸ‘€

warm dagger
#

-botinfo @fiery fractal

gilded plankBOT
#
Bot info
ID

351611743018942464

Username

EGGSY's

Discriminator

4937

Short Description

Tamamiyle TΓΌrkΓ§e bir Discord botu!

Library

discord.js

Prefix

!!

Upvotes

126

Server Count

6808 Servers | 4 Shards

Owner(s)

@steel heath dblMod dblCertifiedDev

warm dagger
#

-botinfo @jagged helm

gilded plankBOT
#
Bot info
ID

430714908653387777

Username

7/24 Asistan!

Discriminator

8839

Short Description

TamamΔ±yla tΓΌrkΓ§e | Moderasyon | Resimli profil | Liderlik sΔ±ralamalΔ± level sistemi | Destek sistemi | Reklam engelleyici | NSFW. TΓΌrkiye

Library

discord.js

Prefix

<

Upvotes

55

Server Count

No server count

Owner(s)

@hallow nimbus
@worthy bronze

inner jewel
#

can you not

dire shell
#

-botinfo @signal aurora

gilded plankBOT
#
Bot info
ID

430568406786506753

Username

Geek

Discriminator

2225

Short Description

MultiPurpose - Chats Like Human, Logging, Fortnite Stats, No Lag Music, Memes, and More!

Library

discord.js

Prefix

gk

Upvotes

92

Server Count

216 Servers

Owner(s)

@dire shell

dire shell
#

-botinfo @gilded plank

gilded plankBOT
#
Bot info
ID

264811613708746752

Username

Luca

Discriminator

0393

Short Description

Luca is a bot for managing and informing members of the server

Library

discord.js

Prefix
  • or @Luca#0393
Upvotes

79

Server Count

2 Servers

Owner(s)

@fossil oxide dblAdmin
@languid dragon dblAdmin
@bitter sundial dblAdmin

solemn obsidian
#

someone gets told not to do this, next one continues it 🀦

dire shell
#

?

#

Where do I do it then

solemn obsidian
#

testing channels exist for a reason

dire shell
#

thanks

dire shell
#

whats a good meme api?

abstract crystal
orchid copper
wet ferry
#

Hey, I was trying to use fonts on my bot page:

#

On safari, it worked perfectly

#

but on chrome:

#

does anyone know what's happening?

#

here is the code:

#
@font-face {
font-family:makerbot;
src:url('https://github.com/tandpfun/makersandbot-files/blob/master/Android%20101.otf?raw=true');
}
#

and where it's defined:

#
.titleandvote h1 { height: 75px;color: #F8B90E;font-size:3vw;font-family:makerbot }
#

and

weary shoal
#

IIRC you can only use google fonts if you're not certified. CC: @bitter sundial

wet ferry
#
.votebutton { background-color: #F8B90E; box-shadow: 5px 5px 5px grey;font-family:makerbot }
#

wdym?

bitter sundial
#

I think you can use any font

wet ferry
#

well, i'm not certified

glossy mason
#

Does the Developer Console show any warnings?

wet ferry
#

ummm

#

this is the DBL page

glossy mason
#

I know

wet ferry
#

is there a console?

glossy mason
#

Inspect Element, Console tab

wet ferry
#

o

#

h

#

yes

#

1 sec

glossy mason
#

(I'd have checked myself, but am on mobile.)

wet ferry
#

the top one

#

what does that mean?

#

@bitter sundial r u sure, somthing is being blocked

glossy mason
#

I'm trying to remember (bare with me if I misremember), but I believe because of CORS you are not allowed to hotlink from GitHub.

wet ferry
#

why?

bitter sundial
#

there's no Access-Control-Allow-Origin header where it redirects and that makes chrome not load it

wet ferry
#

^ what do i do then?

#

do i host it no on github?

glossy mason
#

Try that.

wet ferry
#

ok

weary shoal
wet ferry
#

ok

glossy mason
#

dl=1?

weary shoal
#

It won't work on dropbox because file redirects aren't allowed I believe

wet ferry
#

oh

weary shoal
#

That's why ?raw=true wouldn't work either

wet ferry
#

didn't work

weary shoal
#

Ugh hmm

wet ferry
#

any non-redirect urls?

#

wait.. ik

#

1 sec

#

yep it works!

#

thanks!

glossy mason
#

Nice

wet ferry
#

are they pre-defined?

terse pier
#

How to get discord.Member object from message in on_message function in discordpy?

spring ember
#

message.author

#

rewrite?

hushed oyster
#

@wet ferry you can edit them

wet ferry
#

How?

#

i tried

delicate zephyr
#

@wet ferry css?

wet ferry
#

yes

delicate zephyr
#

!important

wet ferry
#

it ignores it

delicate zephyr
#

using !important after it

wet ferry
#

oh

delicate zephyr
#

makes it override origional

#

so font-family: <font> !important @wet ferry

wet ferry
#

i see

earnest phoenix
#

Hey

delicate zephyr
#

hi

loud bear
#

ping me if you know the solution

dusty sandal
#

for the deletion of messages, how would you make a bot do that? i'm using js

night imp
#

@dusty sandal for discord.js it is <message object>.delete()

dusty sandal
#

<message object> means what

night imp
#

A message object

dusty sandal
#

sorry im an idiot

night imp
#

Example this message I am sending is an object

dusty sandal
#

ok

night imp
#

So in your message event handler it gives the message object

dusty sandal
#

what i put in the () is the amount of messages to delete

night imp
#

No

#

You want to purge it?

dusty sandal
#

purge?

night imp
#

Mass delete

dusty sandal
#

well i want to specify the amount of messages to delete

night imp
#

I think that is bulkDelete or something. Should be able to find it on the docs

dusty sandal
#

ok thank you for your help

night imp
#

Np

hushed oyster
#

@loud bear there is no is_owner function

loud bear
#

yes there is it works fine no issues on windows

weary shoal
#

@loud bear Are you using the same versions of python? Py3.6 changed some stuff

loud bear
#

yes 3.6

#

wait hold on

#

ya 3.6

weary shoal
#

That's like the limit of my python knowledge sorry πŸ˜‚

loud bear
#

hmm fixed that now im getting this oof TypeError: change_presence() got an unexpected keyword argument 'game'

glossy mason
loud bear
#

ya

#

rewrite branch

loud bear
#

I figured it out

#

turns out the arg. game was replaced with activity so i had to replace all game=discord.Game to activity=discord.Game

delicate zephyr
#

I can't get the LavaLink jar for the CI server

#

what do I do Thonk

dusty sandal
#

for js how do i make a bot delete a message it sent after a certain amount of time

delicate zephyr
#

@dusty sandal d.js?

dusty sandal
#

yes

#

im using this .then(message => message.delete(3000)) but it returns an error

delicate zephyr
#
    setTimeout(() => { msg.delete() }, 5000) 
};
dusty sandal
#

that might work

delicate zephyr
#

its returning an error because you are defining it as message

#

unless you main one is msg

dusty sandal
#

?

#

im confused

delicate zephyr
#

so

#

bot.on("message", <this>) <this> is msg or message

dusty sandal
#

message

delicate zephyr
#

.then(msg => msg.delete(3000))

#

should work

dusty sandal
#

ok

#

what

#

if anyone can help me, dm me with all the detail for i shall be going away

earnest phoenix
#

Nice name reveal @dusty sandal

dusty sandal
#

what

#

oh lol

earnest phoenix
#

γƒ‡γƒŸγƒ¬γ‚’

dusty sandal
#

i see it in the file directory

earnest phoenix
#

:P

dusty sandal
#

i should probably delete that and i would be grateful if you delete your message with my name, thank you

#

thank you

earnest phoenix
#

I will forever know your name

#

:P

earnest phoenix
#
module.js:559
    throw err;
    ^

Error: Cannot find module '/root/discord-HathorBot/config/app'
    at Function.Module._resolveFilename (module.js:557:15)
    at Function.Module._load (module.js:484:25)
    at Function.Module.runMain (module.js:703:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:665:3

I have a long/high experience but I never saw in my 12 long year Development experience this error (Yes..) really weird. So my question is. Can someone tell me what is wrong

solemn obsidian
#

you are missing .js at end of require that tries to require config/app

languid dragon
#

shouldn't make a difference (unless there's a node version that doesn't handle that kinda thing?)

solemn obsidian
#

it doesnt guess extensions afaik

#

Example of case app.json and app.js

languid dragon
#

node goes for .js

#

ive never had a problem with it tho

austere meadow
#

@frigid thistle what don't you understand

frigid thistle
#

Alright

#

First of all.

#

How do I use snekfetch inside a browser

#

like

austere meadow
#

personally i don't really know since i don't use snekfetch inside the browser

frigid thistle
#

what's the web JS equivalent of node js require()

austere meadow
#

i use XMLHttpRequest

frigid thistle
#

import, i think..

#

Ok

#

So

#

then

#

I just send a get request to https://discordapp.com/users/@me

#

and then take the user's username, and log them in with it?

#

to my site

austere meadow
#

no

frigid thistle
#

?

languid dragon
#

@solemn obsidian

#

]]ev -oo new (require('./SQLCommand'))(Main).Dir

river compassBOT
#
Developer
frigid thistle
#

That's what I don't get

#

@austere meadow

languid dragon
#

positive it's there and you haven't forgotten to upload it?/

earnest phoenix
#

Nvm fixed

#

πŸ˜‰

languid dragon
#

lul

earnest phoenix
#

xD

solemn obsidian
#

hm i always thought thay worked only with dir/index.js

austere meadow
#

you need to read the docs
i know what you're going through right now, you don't want to read the docs, you just want to get this working
but 1) you don't learn anything by just skimming over things and asking other people for help, you need to find some stuff out yourself
2) the docs have all the information you need, including endpoints and the authorization required to get information from those endpoints

frigid thistle
#

]]ev -oo new (require('./SQLCommand')(Main).Dir

river compassBOT
#
Only Developers can use this command!
earnest phoenix
#

xD

austere meadow
#

i know you don't want to read the docs but you HAVE to

frigid thistle
#

oof

austere meadow
#

just read it slowly

#

maybe go to bed first idk

frigid thistle
#

alright, I'll try again in the morning, lol

austere meadow
#

sounds good

languid dragon
#

ignore that

frigid thistle
#

Can someone also tell me how I would create a PostgreSQL server

#

cuz I cannot for the life of me

#

manage to figure out how to create one

#

well

#

I know how to get to the create popup

#

but

#

what account do I use for username and password

austere meadow
#

are you on windows or linux

frigid thistle
#

Windows

#

7

#

pgAdmin 3

austere meadow
#

did you install postgres

frigid thistle
#

yes.

austere meadow
#

when you were installing it it probably asked you what the default username + password should be

frigid thistle
#

where do I need to make an account to create a server

#

hmm

austere meadow
#

you don't need to make an account

frigid thistle
#

oh

#

well idk the username, pswd etc

#

for pg

#

but that explains a lot, thanks πŸ˜ƒ

austere meadow
#

didn't it ask you though

#

like what do you want the default password and stuff to be

frigid thistle
#

no, someone else installed it on here

austere meadow
#

ah

frigid thistle
#

and I had no knowledge of the default username/password, so I thought I had to make an acct on PgSQL website

austere meadow
#

nah

earnest phoenix
#

A fast questions, I've ever just made that I can use one of my custom emoji's that I have in my server how to insult this into my .js code again?
#Forgot excuse me to ask this of course

languid dragon
#

is ur native English?

lament hemlock
#

how does the sharding stats work?

#

each shard is to post their guild count

#

and DBL sums the count from all shards?

lament hemlock
#

bump

#

the documentation is quite lacking

languid dragon
#

@bitter sundial

#

r u using the module or

#

manually posting?

#

if you're manually posting you need to post your summed server count and shard count manually as well

#

i haven't used the API in a while so IIRC its something like
server_count: Number,
shard_count: Number

lament hemlock
#

ok cheers

#

i can handle it from my end then

bitter sundial
#

what do you mean the documentation is lacking

lament hemlock
#

1 sec

#

on phone

#
shards    Array of Numbers    The amount of servers the bot is in per shard.    No (unless server_count is not set)```
#

that is convoluted af

#

server_count - ok. the amount of servers the bot is in

#

shards - the amount of servers the bot is in per shard? as in total_server_count / shard_amount ?

#

array of numbers?

solemn obsidian
#

Every shard has specific amount of guilds

lament hemlock
#

so therefore like: [2500, 2500, 2500] - as in 3 shards each of 2500 guilds?

#

just easier not to post the shard information

#

easier sum the guild count yourself and post it in 1 hit than understand what the api is actually doing

low owl
#

Well, of course abstractions are always nice, but you should understand the underlying complexity to some degree

#

imagine people using shards but having no idea that there are guilds per shard (or how many)

#

I think you are right though, the documentation seems unreasonably convuluted

lament hemlock
#

i understand the complexity associated. i can also excuse the lack of thorough documentation as DBL is fairly immature in terms of how long it has existed for

#

all good, Natsu cleared it up enough for me to fill in the blanks

low owl
#

Alrighty, have fun πŸ˜„

frail kestrel
#

ye

frail kestrel
#

what the fuck did I send that like 5 hours ago

earnest phoenix
#

-bots @earnest phoenix

gilded plankBOT
#
Kot#1337
Bots <:dblCertifiedDev:401725450470031362>

@opaque temple dblCertified
@austere badge
@visual ivy
@vernal lion

earnest phoenix
#

-botinfo @opaque temple

gilded plankBOT
#
Bot info <:dblCertified:392249976639455232>
ID

310039170792030211

Username

NekoBot

Discriminator

2551

Short Description

NekoBot, General commands, NSFW commands, Simple Moderation commands and more!

Library
Prefix

n!

Upvotes

4541

Server Count

7671 Servers | 10 Shards

Owner(s)

@low horizon dblCertifiedDev
@solid cliff dblCertifiedDev

quiet bobcat
#

Please not in development

austere meadow
#

@earnest phoenix hi sorry to bother but is there any good way to cache information for guilds? i need to start caching guild configurations since im getting deadlock detected and thats no good, but i can't think of any simple way to store the config or at least make it so there are less requests to the DB

earnest phoenix
#

use a cache

#

D.js collection

#

store it by GuildID, Configs

austere meadow
#

hmm okay

#

and just store that in the client or something

earnest phoenix
#

when you get it'll get from that collection, when you set it'll set it into the collection and write to db

#

on ready just sync all data into cache

austere meadow
#

oooh that set thing sounds smart

#

okay

#

cheers

earnest phoenix
#

yw

#

Goes back to making http-nextra-nextra

austere meadow
#

nextra-nextra

#

what

earnest phoenix
#

There's http-nextra but i forked it and added shit so i call it http-nextra-nextra

weak parrot
#

Lmao

austere meadow
#

@earnest phoenix ok im sorry for pinging again but one last quick thing; what do you use for colors in your logger? my colors work on windows but not linux and no matter what i do i can't get them to display on linux so im thinking my colors module is fucked

earnest phoenix
#

I told you, Klasa colors

austere meadow
#

o

warped frigate
#

Hey! You know how to get kick in event?

naive aurora
#

Hi, I am new to the development of bots and I ask myself the following question: How to display the number of server or the bot is connected? I use Java for my bot. Thank you πŸ˜ƒ

abstract crystal
#

On DBL or in your bot?

warped frigate
#

guild.getId()

#

Me ? @abstract crystal

abstract crystal
#

@naive aurora

warped frigate
#

ok

naive aurora
#

I think in my bot I use jda.setGame(Game.playing ("!!")); but I will want instead of "!!" the number of servers

warped frigate
#

jda.getGuilds().size()*

naive aurora
#

I got an error on getGuilds()

#

Cannot resolve method 'getGuilds()'

#

@abstract crystal

abstract crystal
#

Maybe it does not exist

naive aurora
#

Oh, how should I proceed? Use another lib or what?

abstract crystal
#

what are you using?

naive aurora
#

JDA and jda-utilities

inner jewel
#

JDA jda = ...
jda.getPresence().setGame(Game.watching(jda.getGuildCache().size() + " servers"))

#

to get size always use getXCache().size() instead of getX().size()

#

first one is O(1) and does zero memory copy

#

second is O(n) and creates a full copy

abstract crystal
#

^

earnest phoenix
#

-botinfo @spring parrot

gilded plankBOT
#

Please include a bot mention

inner jewel
#

also @warped frigate use ListenerAdapter

earnest phoenix
#

@spring parrot is my bot

#

πŸ˜„

inner jewel
#

no botinfo here

warped frigate
#

Okay thanks

earnest phoenix
#

okay

warped frigate
#

I see that and I go back after

naive aurora
#

Hum :/ I don't understand a got an error on getPresence()

inner jewel
#

what's your code?

inner jewel
#

you need a JDA instance

#

your variable jda is a JDABuilder

naive aurora
#

Hum ...

inner jewel
#
jda.addEventListener(new ListenerAdapter() {
    @Override
    public void onReady(ReadyEvent event) {
        set game
    }
})```
naive aurora
#

I need to put jda on final ?

#

Variable 'jda' is accessed from within inner class, needs to be declared final

inner jewel
#

you're using java 7 or older

#

java 8 just needs it to be effectivelly final

naive aurora
inner jewel
#

might be wrong language level configured

naive aurora
#

I need to use Java 7 or Java 8 ?

inner jewel
#

8

#

or newer

naive aurora
#

Hum I'm using SDK 1.8.0_121

inner jewel
#

what's your build.gradle?

naive aurora
#

I'm using Maven

inner jewel
naive aurora
#

Okey so now i got an error on getPresence() and getGuildCache()

#

Cannot resolve method 'getPresence()'

inner jewel
#

Event#getJDA

#

JDA api = event.getJDA()

#

api.getPresence()

naive aurora
#

Works thanks

inner jewel
#

api.getGuildCache()

naive aurora
#

Nice thanks you so much πŸ˜„

#

One last little question is there a more precise doc for JDA than the github?

inner jewel
#

there's the javadocs

naive aurora
#

Thanks you

proven schooner
inner jewel
#

those folders are automatically created

proven schooner
#

Still i don't have those im in the screen in step 4 But I do not have the included files.

inner jewel
#

send a screenshot of the whole intellij window

#

if there's a blue bar in the bottom right corner gradle is still configuring your project

proven schooner
#

I have this "Could not determine Java version using executable C:\Program Files\Java\jdk-10\bin\java.exe."

#

@inner jewel

proven schooner
#

Anyhelp?

swift igloo
#

Anyone understand Lambda in java and how to get the expressions to compile?

inner jewel
#

@proven schooner try googling that message

#

@swift igloo what's your code?

swift igloo
#

List<Member>

#

@inner jewel ^

inner jewel
#

List<Member>

#

&lt; -> <
&gt; -> >

swift igloo
#

I figured that just its not reconizing that its a lambda expression

#

@inner jewel ^

inner jewel
#

wdym?

swift igloo
inner jewel
#

you need to replace those

swift igloo
#

ah

#

@inner jewel overthinking it sorry XD thank you

lofty dagger
#

How do I use client.change_nickname in discord.py? TypeError: change_nickname() missing 1 required positional argument: 'member'

orchid copper
#

await client.change_nickname(member_obj, "New nickname")
After you instantiate client discord.Client()

lofty dagger
#

What do I fill for member obj?

glossy mason
floral stone
#

^

proven schooner
#

@inner jewel Did you figure anything out?

restive silo
#

@topaz fjord

const { Command } = require('klasa');
const { Client, TokenTypes: { Wolke } } = require('weebts');

module.exports = class WeebAPICommand extends Command {
    get weebAPI() {
        const client = new Client({ token: this.client.tokens.wolkeToken, tokenType: Wolke }); // this needs to be saves somewhere but all command instances should share the same  client instance
        return client;
    }
};
#

if i do this it will create a new client every time this is called

#

i would like that all my WeebAPICommands share the same client instance

topaz fjord
#

yes but doesnt that static keyword preserver the function

restive silo
#

uhh

proven schooner
orchid copper
#

^ try rebuilding gradle ?

proven schooner
#

How would i do that?

orchid copper
#

go to build in toolbar

proven schooner
#

Thats the 5th time i remade a new project

#

Can't find build

#

Its probably a java problem

#

i have the latest java and then jdk 10

topaz fjord
#

@restive silo does it work

restive silo
#

as i expected

#

GC does collect that

topaz fjord
#

wut doesnt?

restive silo
#

look at the pic i sent

inner jewel
#

you create a new one every time the function is called

restive silo
#

yea thats what i wanted to say to turtle

#

thats why i struggle to find a way to save it somewhere

inner jewel
#
const globalThing = ...

class X {
    static getGlobalThing() {
        return globalThing;
    }
}
restive silo
#

because i want that all my comamnd class instances have acess to the same client instnace

#

i cant do that

#

since i need client.tokens for the weeb.sh token

inner jewel
#

make it lazily initialized

#
let client;

class X {
    static getClient(info) {
        if(!client) client = new Client(info);
        return client;
    }
}```
restive silo
#

that wont work since i need the client for that and this is only acessable from the command instance

#

seems like i need to use tokens in another way now

#

cant put them on my client anymore

inner jewel
#

make it not static then

restive silo
#

well doesn't solve the problem that the tokens are only acessable in the client

#

from the this context

#

but i guess i need to use Enviroment Variables other way now

peak mountain
topaz fjord
#

lmao

restive silo
#

thanks anyway

inner jewel
#
let client;

class X {
    get client() {
        if(!client) client = new Client(this.client.x, this.client.y);
        return client;
    }
}```
#

why wouldn't this work?

restive silo
#

oh

inner jewel
#

still global

restive silo
#

wait

#

this is genius

inner jewel
#

still lazily initialized

restive silo
#

owowowow thanks natan

#

save my day

proven schooner
#

Did anybody solve the problem?

#

@restive silo

#

What JDK should i have and what version of java?

restive silo
#

why do you assume i write java thinkEyes but to use JDA you need Java 8 atleast

inner jewel
#

install java 8

#

afaik gradle has no jdk 10 support yet

proven schooner
#

I have 8, i have to remove my jdk then

inner jewel
#

you need jdk 8

#

and set JAVA_HOME to the jdk 8

proven schooner
#

Those are my current files. I have JDK Now, any help?

inner jewel
#

your build.gradle has the same contents twice

proven schooner
#

I am also still missing src

inner jewel
#

you can create it

#

right click 555 -> new -> folder -> type "src/main/java"

proven schooner
#

ah thanks

proven schooner
gilded blaze
#

u have ur token there

#

lol

proven schooner
#

Should it be the one in the tutorial?

gilded blaze
#

nonono. with the token anyone can login to your bot

proven schooner
#

Im new to this entirely

#

Well how do i fix my problem?

#

Im also having errors, about 5 on what you see

#

@gilded blaze

gilded blaze
#

idk java

proven schooner
#

What should i replace the token with?

gilded blaze
#

don't replace it

#

where do u import JDA

proven schooner
#

I didn't even import it

gilded blaze
#

oof

#

u need to lol

inner jewel
#

public class Main {
} <--------- error here
public static void main(...) {
...
}

#

the method is outside the class

proven schooner
#

Thanks i'll fix that.

#

Where would i Import JDK?

trim plinth
#

you don't import your JDK, your import the JDA library

proven schooner
#

Thats in the external libraries if i am correct?

trim plinth
#

no

inner jewel
#

you don't need to worry about that

trim plinth
#

make sure you have JDA in your build.gradle then import into your main file

proven schooner
inner jewel
proven schooner
#

Thats mine, tell me what the fuck i am missing i've been doing this for about 4 hours now.

trim plinth
#

wait doesn't Natan have a JDA tutorial on the blog

half rover
#

Im trying to make my bot play a sound file when it join a vc, but it joins but doesnot play the file.```js
//Steven Loves Cookie Cat
if (message.content.startsWith(prefix + 'cookiecat')) {
message.channel.sendMessage('I Love Cookie Cat! cookiecat\nIf you are in a Voice channel I will sing the song!cookiecat');
const connection = message.member.voiceChannel.join();
connection.play('https://cdn.glitch.com/3b971df8-c1b8-4b3d-8b2c-749c9e197d77%2Fcookie_cat.mp3');
}

proven schooner
#

@trim plinth How do i put the JDA in my build.gradle?

inner jewel
proven schooner
#

So copy that entire thing?

#

Just change the Ids

inner jewel
#

yes

#

no

#

keep the id'xxx'

#

change just mainClassName

proven schooner
#

yay.

proven schooner
#

What do i replace?

solid cliff
#

how much ram do I need πŸ€”

#

512mb or 1gb

sand vale
#

way less

#

unless you have music added

#

or other resource intensive things

#

or the bot is in hundreds of guilds

proven schooner
#

Hey Snarkyllama could you help. how do i set up my build?

trim plinth
#

hmm

proven schooner
#

other than the mistake in utf-8

solid cliff
#

how much ram would an average 5kish~ bot take up

sand vale
#

5kish what

#

guilds?

solid cliff
#

yus

sand vale
#

prob half a gig

#

but i wouldnt know cuz my bot isnt that popular

solid cliff
#

oof

trim plinth
#

I think 1gb would probably be good for a 5k butt maybeβ„’

#

depends

topaz fjord
#

with a bot that has music and 1.6k guilds i use 470mb Thonk