#development

1 messages · Page 397 of 1

earnest phoenix
#

if (Number(arg) === NaN) return msg;

#

#logic

trim plinth
dusty sandal
#

ok thanks guys

gilded thunder
#
ArcBOT - Today at 12:37
Evaluation error!
TypeError: must be str, not Member```
#

What does it mean?

#

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 846, in process_commands
    yield from command.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 374, in invoke
    yield from injected(*ctx.args, **ctx.kwargs)
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 54, in wrapped
    raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: must be str, not Member```
orchid copper
#

ctx.message.author cannnot be concatenated with a string

#

I not know much about rewrite v may be ctx.message.author.name would work

gilded thunder
#

It's async.

#

I didn't get the memo about switching.

earnest phoenix
#

anyone here use the python library disco

gilded thunder
#

Yes, I do.

earnest phoenix
gilded thunder
#

Oh disco.

#

Never heard of it.

earnest phoenix
#

eh its very small and considered "alpha"

#

disco is by b1nzy

#

ratelimited gurantee

earnest phoenix
austere meadow
earnest phoenix
#

no

austere meadow
#

why

earnest phoenix
#

but its ok

austere meadow
#

ok whats wrong

#

i want to know

earnest phoenix
#

why do you pass client? you're only gonna have one client (command func)

austere meadow
#

nah i have 3 functions in this class

earnest phoenix
#

no blake

#

why do you pass client

#

you already have it in the constructor

#

and you're only gonna have one client

#

so

austere meadow
#

oh yeah because i hate doing this.client

earnest phoenix
#

s m h

austere meadow
#

ok

#

maybe it is unnecessary but

#

im improving thats all that matters

#

dad

earnest phoenix
#

Im proud son

austere meadow
#

thank you dad blobcheer

earnest phoenix
austere meadow
#

why are you even bothering with local storage is my only question

#

i know you said its if the api goes down but

#

how often is that gonna happen

earnest phoenix
#

Easiest way to store data, and if the user refreshes it stays there

#

¯_(ツ)_/¯

austere meadow
#

i try to avoid local storage at all costs because i just really dislike using it

earnest phoenix
#

you're not making a vue app

austere meadow
#

tbh thank god looks like a pain in the ass

earnest phoenix
#

vue is nice

#

you probably wont like it

#

its not meant to be simple

#

like it is

#

but its not ur average web app lol

austere meadow
#

its different

#

like i was considering using it but i dont think it really has many benefits over using something different or just using plain js/jquery

low owl
#

I think local storage is nowadays prefered over cookies

lunar knot
#

Hey, does anyone know if there is a Google Translate API, where to find it and how to install it on java? owo

weary shoal
floral stone
#

@lunar knot use bing, it's free and effectient.

gilded blaze
#

How would I go about having commands automatic so when I add a new class it can already run the main method

#

in Java with JDA

inner jewel
#

classpath scanning

gilded blaze
#

o

prisma mist
#

halp

#

so

#

im making a prefix command

earnest phoenix
#

json I see?

prisma mist
#

??

earnest phoenix
#

possibly they ain’t defined

prisma mist
#

how does one define them

earnest phoenix
#

because they aren't defined

#

:^)

#

:^) by knowing node :^)

prisma mist
#

..

earnest phoenix
#

dont copypasta code

#

yes do not

prisma mist
#

i just wanted to know how to define something

cold ginkgo
#

@prisma mist
prefixes =
message =

topaz fjord
#

you define by doing node.js courses

cold ginkgo
#

@earnest phoenix why would you insist in making further remarks if you aren’t going to help him.

topaz fjord
#

it is helping

#

who said learning doesnt help

cold ginkgo
#

He asked a question, did you answer it? No

#

“i just wanted to know how to define something”

earnest phoenix
#

learning is very helpful plus defining stuff in any lang is very easy

cold ginkgo
#

There’s nothing wrong with asking tho

floral stone
#

Defining things is the basics of coding. If you don't know how to do that, you have no chance of coding properly.

cold ginkgo
#

What Thonk

#

How do you code properly?

floral stone
#

Take a Javascript course on sololearn!@prisma mist

#

It's free and will help you

#

You code properly by knowing what you are doing. If you can't do basic coding or know how to, you should link someone to a site that explains the basics of that language, like defining a variable.

#

Yes, giving them the answer is helpful but giving them a book (not literally but hypo_____) to learn those answers is even more helpful and effective in the long run.

#

@cold ginkgo

#

I also forgot the word that begins with hypo

restive silo
#

@earnest phoenix 2 things, first of since klasas base help command doesn't work could i use yours in the meantime? (would credit you if needed) and second you use MongoDB right?

earnest phoenix
#

yes and yes

restive silo
#

how does it do with SG

earnest phoenix
#

fine

restive silo
#

is it bugged as sql

earnest phoenix
#

no

restive silo
#

hmm

#

i hate nosql but since i wanna get this bot live at some point i need to use sg whats impossible atm

#

with sql

earnest phoenix
#

true

floral stone
#

Sql is amazing

restive silo
#

i know

#

postgres is the best

#

ngl

#

would it use anywhere i need a db

grizzled isle
#

How do you even set up postgres?

restive silo
#

docker™

#

no

#

MySQL is out af

earnest phoenix
#

by installing it

#

if the installer isnt shit

#

it'll have a service

dusty sandal
#

can anyone help me? I am trying to create a mute command that prevents people from speaking in all channels. It creates a role called "M U T E D" if it doesn't already exist and it goes down to each channel perm to make sure people that are muted can't talk. I am stuck. I can only get the bot to create the role, not the role perms for each individual channel.

#

here is my code ```const { Command } = require('discord-akairo');
class MuteCommand extends Command {
constructor() {
super('mute', {
aliases: ['mute'],
args: [
{
id: 'member',
type: 'member'
}
],
clientPermissions: ['MANAGE_ROLES'],
userPermissions: ['KICK_MEMBERS'],
channelRestriction: 'guild'
});
}

exec(message, args) {
  let meme = message.content.split(' ').slice(1,2);
 var argresult = meme.join(' ')

if(!args.member) return message.channel.send('MEMBER NOT FOUND')
let muterole = message.guild.roles.find(name, "M U T E D")
if(!muterole) message.guild.createRole({
name: "M U T E D",
color: "#080808",
permissions: []
})
message.guild.channels.forEach(channel, id)
message.channel.overwritePermissions(muterole, {
SEND_MESSAGES: false,
ADD_REACTIONS: false
})

args.member.setRoles([muterole.id]).then(() => {
message.channel.send(${args.member} was muted!)
})

}

}

module.exports = MuteCommand

grizzled isle
#

Try this for the overwrite permissions:

message.guild.channels.forEach(c => c.overwritePermissions(muterole.id, {SEND_MESSAGES: false, ADD_REACTIONS: false}))
dusty sandal
#

ok thanks

earnest phoenix
#

you probably wanna map that and use Promise.all

dusty sandal
#

shite

grizzled isle
#

I wanna do something, not map

dusty sandal
#

i got an error

#
    at MuteCommand.exec (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:29:35)
    at command.parse.then.args (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\node_modules\discord-akairo\src\struct\CommandHandler.js:346:56)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
(node:12192) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12192) [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.
^C
C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js>node .
boyobot is ready nibba
(node:14304) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
    at message.guild.channels.forEach.c (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:29:72)
    at Map.forEach (<anonymous>)
    at MuteCommand.exec (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:29:27)
    at command.parse.then.args (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\node_modules\discord-akairo\src\struct\CommandHandler.js:346:56)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
(node:14304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14304) [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.```
#

@earnest phoenix can you show me how to use that Promise.all

earnest phoenix
#

Promise.all(array of promises)

#
Promise.all(message.guild.channels.map(c => c.overwritePermissions(muterole.id, {
    SEND_MESSAGES: false,
    ADD_REACTIONS: false
})))
fluid basin
#

Or async/await would be helpful

dusty sandal
#

i dont know how to use async with discord akairo

fluid basin
#

Hmm well if you know how to do async await normally you just need to make the exec function async and you should be able to use await

earnest phoenix
#

@fluid basin thats what we are doing

dusty sandal
#

the promise.all returns this error boyobot is ready nibba (node:16508) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null at Promise.all.message.guild.channels.map.c (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:29:80) at Map.map (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\node_modules\discord.js\src\util\Collection.js:300:47) at MuteCommand.exec (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:29:39) at command.parse.then.args (C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\node_modules\discord-akairo\src\struct\CommandHandler.js:346:56) at <anonymous> at process._tickCallback (internal/process/next_tick.js:160:7) (node:16508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:16508) [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.

fluid basin
#

Oh okay

earnest phoenix
#

muterole is undefined

dusty sandal
#

hmm

#

let muterole = message.guild.roles.find(name, "M U T E D")

earnest phoenix
#

then muterole is null as it didnt find a M U T E D role

dusty sandal
#

hm

#

let me try something

#

@earnest phoenix would you like to see my code again? i could be screwing up somewhere and you can't identify my mistake

earnest phoenix
#

sure

dusty sandal
#
class MuteCommand extends Command {
    constructor() {
        super('mute', {
            aliases: ['mute'],
            args: [
                {
                    id: 'member',
                    type: 'member'
                }
            ],
            clientPermissions: ['MANAGE_ROLES'],
            userPermissions: ['KICK_MEMBERS'],
            channelRestriction: 'guild'
        });
    }

    exec(message, args) {
      let meme = message.content.split(' ').slice(1,2);
     var argresult = meme.join(' ')

if(!args.member) return message.channel.send('**MEMBER NOT FOUND**')
let muterole = message.guild.roles.find(`name`, "M U T E D")
if(!muterole) message.guild.createRole({
     name: "M U T E D",
     color: "#080808",
     permissions: []
   })
   Promise.all(message.guild.channels.map(c => c.overwritePermissions(muterole.id, {
    SEND_MESSAGES: false,
    ADD_REACTIONS: false
})))   
   args.member.setRoles([muterole.id]).then(() => {
     message.channel.send(`${args.member} was muted!`)
   })


    }
}

module.exports = MuteCommand
fluid basin
#

Oh well

earnest phoenix
#

well you create a role but never assign the var to the new role

fluid basin
#

Either use promises or async/await to get the new role

#

That you created

earnest phoenix
#

Okay so, what we are gonna do it
Make the exec function a async function
when you check for no muterole you're gonna await createRole muterole = await message.guild.createRole...
then you're gonna await the Promise.all as well then in .setRoles its addRole

dusty sandal
#

ok

#

i got this error ```(node:16048) UnhandledPromiseRejectionWarning: C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:24
if(!muterole) await message.guild.createRole({
^^^^^

SyntaxError: await is only valid in async function
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
(node:16048) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16048) [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.```

earnest phoenix
#

Make the exec function a async function

dusty sandal
#

yeah let me try that

#

i need to clean up the code

#
class MuteCommand extends Command {
   constructor() {
       super('mute', {
           aliases: ['mute'],
           args: [
               {
                   id: 'member',
                   type: 'member'
               }
           ],
           clientPermissions: ['MANAGE_ROLES'],
           userPermissions: ['KICK_MEMBERS'],
           channelRestriction: 'guild'
       });
   }

   async(message, args) {
     

    
    if(!args.member) return message.channel.send('**MEMBER NOT FOUND**')
    let muterole = message.guild.roles.find(`name`, "M U T E D")
    if(!muterole){
      try{
        muterole = await message.guild.createRole({
          name: "M U T E D",
          color: "#080808",
          permissions: []
        })
        message.guild.channels.forEach(async (channel, id)=> {
          await channel.overwritePermissions(muterole, {
            SEND_MESSAGES: false,
            ADD_REACTIONS: false
          })
        })
        
      }catch(e){
        console.log(e.stack)
      }
    }


    await(args.member.setRoles([muterole.id]))
    message.channel.send(`**${args.member} was muted!**`)

  


   }
}

module.exports = MuteCommand
``` this is my new code but
#

i get this error ```(node:15812) UnhandledPromiseRejectionWarning: C:\Users\Nicolas Hak\Desktop\Discord Bots\boyobot-js\commands\mute.js:26
muterole = await message.guild.createRole({
^^^^^

SyntaxError: await is only valid in async function
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
(node:15812) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15812) [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.```

inner jewel
#

async(message, args) this is a function named async

dusty sandal
#

it didnt seem to work for me

inner jewel
#

it's named async

#

it's not async

dusty sandal
#

shite

#

how do i turn my code into an async function, i've never understood how to do that

ashen gulch
#

oi i need help with Creating a simple moderation bot

keen anvil
#

say what you need specifically

ashen gulch
#

the commands

#

like

#

mute

#

and warn

#

and ban

keen anvil
#

what library are you using

ashen gulch
#

and for nsfw

#

jda

keen anvil
ashen gulch
#

ok

dusty sandal
#

how do i do an async function.. take a look at my code and tell me what i did wrong and how i can fix it ```const { Command } = require('discord-akairo');
class MuteCommand extends Command {
constructor() {
super('mute', {
aliases: ['mute'],
args: [
{
id: 'member',
type: 'member'
}
],
clientPermissions: ['MANAGE_ROLES'],
userPermissions: ['KICK_MEMBERS'],
channelRestriction: 'guild'
});
}

async(message, args) {

if(!args.member) return message.channel.send('**MEMBER NOT FOUND**')
let muterole = message.guild.roles.find(`name`, "M U T E D")
if(!muterole){
  try{
    muterole = await message.guild.createRole({
      name: "M U T E D",
      color: "#080808",
      permissions: []
    })
    message.guild.channels.forEach(async (channel, id)=> {
      await channel.overwritePermissions(muterole, {
        SEND_MESSAGES: false,
        ADD_REACTIONS: false
      })
    })
    
  }catch(e){
    console.log(e.stack)
  }
}


await(args.member.setRoles([muterole.id]))
message.channel.send(`**${args.member} was muted!**`)

}
}

module.exports = MuteCommand

ashen gulch
#

how do i make my bot online

inner jewel
#

you run it

fluid basin
#

you keep it alive

keen anvil
#

I just told you to go to that server for questions @ashen gulch

ashen gulch
#

ok

dusty sandal
#

finna

floral stone
#

Profile Command | v2.2.0

Commands:
  about    Profile-About Command | 2.0.1
  nobadges Profile-Nobadges Command | v1.1.1
  shop     Profile-Shop Command | v1.1.3

Type a!profile command for more info on a command.
You can also type a!profile category for more info on a category.```

Is there a way to invoke a sub command without it interfering with the user arguement of the main profile command!?
#

Discord py, rewrtie.

#

Nvm, got it.

topaz fjord
#

@dusty sandal you never named this function

#

well you did

#

but the name is async

dusty sandal
#

i see that now

#

i fixed my error

gilded thunder
#

How can I make the embed display role pings, not the role objects or whatever? The code is python embed.add_field(name="Roles", value=ctx.message.server.roles, inline=True)

spring ember
#

<@&roleid>

#

I think

gilded thunder
#

How can I get that to work?

earnest phoenix
#

get the role id. . . and make ur bot send <@&roleid> in a embed

gilded thunder
#

Alright.

austere meadow
#

@earnest phoenix when you are free if i could get some assistance with concatenation and mentions that'd be really nice since you use master too

#

(not a random ping pls no yell)

earnest phoenix
#

I'm out getting food since I didn't get the laptop notlikeblob

#

I will tho

austere meadow
#

yeah no issues

earnest phoenix
#

am back

#

@austere meadow

austere meadow
#

ok good

#

so basically i've never had this issue before a few weeks ago when i made an update to master
message.author no longer automatically mentions the user, it just gives the ID

#

i need to use message.author.toString() to get the proper mention

#

do you know why this is

#

because its a bit annoying and i have no idea why it happened because i can't find anything relating to this in the commit history

earnest phoenix
#

well

#

you arent doing string concatenation properly then

#

as toString hasn't changed

#

and when u do ${something} toString will get called on something

#

@austere meadow It actually says on docs now that if you .toString() a user object you get the mention.

#

ofc

#

always been the case

#

oh. based on what he said i figured it changed, my b

austere meadow
#

ok well i am using eslint to change all of my stupid little "things" + "like" + "this" into proper templates

#

but it did work before

#

which is weird

jagged birch
#

can anyone help a brother out with some jimp image manipulation? Is there a way to load an image and send it using ram instead of saving the file, sending it and then deleting it?

earnest phoenix
#

I recommend using canvas

#

Pete cant u just write it on the same file?

#

but canvas is better than jimp tbh

fluid basin
#

Yeah jimp is slow as heck

#

You could also use sharp for more advanced image manipulation

jagged birch
#

yeah righto, I'll look into it, thanks.

earnest phoenix
#

if ur using windows it might take a while its a bit annoying to install

#

same thing on linux lol

#

you've got to compile native shit

haughty kindle
#

lol i just got robin bot's addrole remove role to work

#

im going to do the warning system

#
if(cmd === `${prefix}addrole`){

    if(!message.member.hasPermission("MANAGE_MEMBERS")) return message.reply("Sorry pal, you can't do that.");
  let rMember = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]);
  if(!rMember) return message.reply("Couldn't find that user, yo.");
  let role = args.join(" ").slice(22);
  if(!role) return message.reply("Specify a role!");
  let gRole = message.guild.roles.find(`name`, role);
  if(!gRole) return message.reply("Couldn't find that role.");

  if(rMember.roles.has(gRole.id)) return message.reply("They already have that role.");
  await(rMember.addRole(gRole.id));

  try{
    await rMember.send(`Congrats, you have been given the role ${gRole.name}`)
  }catch(e){
    message.channel.send(`Congrats to <@${rMember.id}>, they have been given the role ${gRole.name}. `);

    return;
  }```
earnest phoenix
#

Use .catch on the rMember.send

haughty kindle
#

kk

#

not catch?

earnest phoenix
#

also why are you using () around await

haughty kindle
#

...

#

it still works

earnest phoenix
#
await rMember.send(`Congrats, you have been given the role ${gRole.name}`).catch(() => {
    message.channel.send(`Congrats to <@${rMember.id}>, they have been given the role ${gRole.name}. `);
});```
#

btw working code !== good code

haughty kindle
#

ah

#

ty

earnest phoenix
#

also

#

you can just do

#

${rMember} instead of <@${rMember.id}>

haughty kindle
#

ok

earnest phoenix
#

members can have nicknames, which will break ur way

haughty kindle
#

ik

inner jewel
#

not really

earnest phoenix
#

no it will still work

inner jewel
#

<@id> always works

earnest phoenix
#

only for checking if something is = to @id it wont work, but theres a regex for that somewher ein d.js anyway

#

i think nicknames add an ! in there somewhere

inner jewel
#

<@!?\d{16,21}>

#

or smth like that

earnest phoenix
#

there u have it

inner jewel
#

and?

#

it still works without the !

#

try it

earnest phoenix
haughty kindle
#

```if(cmd === ${prefix}addrole){

if(!message.member.hasPermission("MANAGE_MEMBERS")) return message.reply("Sorry pal, you can't do that.");

let rMember = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]);
if(!rMember) return message.reply("Couldn't find that user, yo.");
let role = args.join(" ").slice(22);
if(!role) return message.reply("Specify a role!");
let gRole = message.guild.roles.find(name, role);
if(!gRole) return message.reply("Couldn't find that role.");

if(rMember.roles.has(gRole.id)) return message.reply("They already have that role.");
await(rMember.addRole(gRole.id));

try{
await rMember.send(Congrats, you have been given the role ${gRole.name})
}catch(e){
message.channel.send(Congrats to ${rMember.id}, they have been given the role ${gRole.name}. );
});```

earnest phoenix
#

I've found bugs using that way theshrug

#

it sometimes wont mention

haughty kindle
#

oof

earnest phoenix
earnest phoenix
#

adds ! if needed

haughty kindle
#

im on discord.js

#

is that d.js

earnest phoenix
#

yeah thats what i mean sry

haughty kindle
#

kk then yes

earnest phoenix
#

@earnest phoenix if its in a string it uses .toString on it

#

smh

#

literally doing ${member} does member.toString()

earnest phoenix
#

On my bot description I have an iframe:

<iframe src="https://some.url/">
  Update your browser! We can't display our website because your browser is out of date. :(
</iframe>

Unfortunately I can't use the options width="" and height="".
Does anybody know any other way of how I could set e.g. the height of the iframe?

spring ember
#

make a div with width and height and put the iframe in it

mental solstice
#

style="width:100px;height:100px"

#

?

earnest phoenix
#

ty

#

gonna try that

gilded thunder
#

async.

wispy schooner
#

Note: This is a list of hosting, not a backing/support for them. You will need to make your own decision.

  • OVH: https://www.ovh.com/us/vps/
    Starting at $3.35/month (USD), 2GB RAM and 10GB storage, high reliability.
  • Digital Ocean: https://m.do.co/
    Starting at $5/month (USD), 1GB RAM and 25GB storage, high reliability.
  • Linode: https://www.linode.com/
    Starting at $5/month (USD), 1GB RAM and 20GB storage.
  • Vultr: https://www.vultr.com/
    Starting at $2.5/month (USD), 512MB RAM and 20GB storage, plan only available on certain regions.
  • Amazon(AWS) Lightsail: https://amazonlightsail.com/
    Starting at $5/month (USD) (first month free), 512MB RAM and 20GB storage, high reliability.
  • Time4VPS: https://www.time4vps.eu/
    Starting at €2.99/month (billed every 4 months for €11.96/quarter), 512MB RAM and 20GB storage, free backups.
  • VIRMACH: http://virmach.com/
    Starting at $1/month (USD), 192MB RAM and 10GB storage, free DDoS protection, 1 CPU core.
  • VPSDime.com https://vpsdime.com/
    Starting at $7/month (USD), 4 CPU Cores, 6GB RAM, 30GB SSD Storage, 2TB Traffic and 10 Gbps Uplink
  • Servercheap https://servercheap.net/
    Starting at $4.50/month (USD), 2 CPU Cores, 2GB RAM, 30GB SSD Storage, Unmetered Bandiwdth
  • Scaleway https://www.scaleway.com/
    Starting at €2.99/month (Euro), 2 CPU Cores, 2GB RAM, 50GB SSD Storage
south finch
earnest phoenix
#

Virmach is outdated

wispy schooner
#

What's the updated?

earnest phoenix
#

1$ a month

#

instead of 2.25

wispy schooner
#

fixed

earnest phoenix
#

I use hostinger

inner jewel
#

scaleway's also good

earnest phoenix
#

Didn't use it tbh

#

need to update ram

#

and storage

#

and cores

wispy schooner
#

better @earnest phoenix

earnest phoenix
#

yes

earnest phoenix
#

I cant

#

Code my bot

topaz fjord
#

Where's Galaxy gate @wispy schooner?

prime cliff
#

Im using servercheap it works perfectly you should add it to the list maybe

steady spruce
#

Hey

#

how would i get this;

spring ember
#

php? PHP?

steady spruce
#

ye

#

but like my bot hosted on heroku

wispy schooner
#

Send me details and I will

steady spruce
#

wym details

jagged birch
#

What about vpsdime? @wispy schooner

steady spruce
#

nah

jagged birch
steady spruce
#

no

jagged birch
#

vpsdime is good

steady spruce
jagged birch
#

Huh what’s that

steady spruce
#

im setting up my dashboard

#

for my bot

jagged birch
#

Cool?

steady spruce
#

but i need help

jagged birch
#

Get the vps ip

wispy schooner
#

@topaz fjord @prime cliff @jagged birch send me details of the hosting providers, such as minimum specs for minimum amount

inner jewel
#

they also have some ARM ones with more cores and same price but (at least for music bots) i wouldn't recommend arm

prime cliff
wispy schooner
#

will add a.s.a.p.

steady spruce
#

is microsoft azure good

wispy schooner
inner jewel
#

yes

wispy schooner
#

updated

earnest phoenix
#

I was wondering how I can fix this his errors messages in the dbl server in tried everything

steady spruce
#

microst azure free you can create your own server hosting

grizzled isle
#

Not sure if I should ask here or api, how would I post the bot status (online, dnd, etc.) on DBL's website?

umbral pelican
#

you cant blobthinkdog

#

it's gotten from luca

grizzled isle
#

Ah makes sense.

upper ember
#

I bought one of those 30Tb computers, and I installed Ubuntu on it, I want to host website over there, so I installed Ubuntu, now my website is running on 192.168.1.104, as far as I know its private IP address, so my question is how do I find the public IP address? (The one that I can use on Cloudflare for A record)

spring ember
#

whatismyip

#

search it on google

upper ember
#

But I found ip that leads to “Partner” website (its cellular company in Israel)

#

What IP address leads to my website?

spring ember
#

oh u israeli too?

upper ember
#

Yes

#

Why?

spring ember
#

join voice and I'll guide you through it

#

I am Israeli too

upper ember
#

Ohh lol

#

Nice tho

#

Can we do it in around 10-20 minutes?

#

I want to shower

spring ember
#

sure

gilded blaze
#

Anyone use http-nextra?

olive ridge
#

I'm trying to make a simple auto respond cmd and it doesn't work

#
var greetings = ["Hi", "Hello"]
var respondGreet = ["Hello", "Hi", "こんにちは", "Mornin'", "Sup", "Wazzup", "Sup Brah"]

client.on("message", (message) => {
  if (message.author.bot) return;
    
  if (message.content.startsWith(greetings)) {
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
  }
});
#

No err message, i think it has something to do with me using a var in the message.content.startsWith

#

The respond part works perfectly fine.

spring ember
#

'greetings'

#

oh wait

#

you should do startsWith(greetings[0])||startsWith(greetings[1])

olive ridge
#

okee

spring ember
#

working?

olive ridge
#

do i keep

#

the message.content?

spring ember
#

yes

#

I typed that without cos Im lazy

olive ridge
#
client.on("message", (message) => {
  if (message.author.bot) return;
    
  if (message.content.startsWith(greetings[0])||startsWith(greetings[1])
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
  }
});
#

returns:

#
C:\SoupyBot\Storage\bot.js:37
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
    ^^^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
spring ember
#

no {

#

after the if parentheses

little garnet
#

One message removed from a suspended account.

#

One message removed from a suspended account.

olive ridge
#

okay okay

#
client.on("message", (message) => {
  if (message.author.bot) return;
    
  if (message.content.startsWith(greetings[0])||startsWith(greetings[1])
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
});
#

dis?

little garnet
#

One message removed from a suspended account.

olive ridge
#
C:\SoupyBot\Storage\bot.js:37
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
    ^^^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
little garnet
#

One message removed from a suspended account.

spring ember
#

@little garnet d.js?

#
client.on("message", (message) => {
  if (message.author.bot) return;
    
  if (message.content.startsWith(greetings[0])||startsWith(greetings[1]) {
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
});```
#

oh wait

olive ridge
#

nani

spring ember
#

nvm

olive ridge
#

lol

spring ember
#

oh you forgot )

#

after the last startsWith

#

wait you did it all wrong

olive ridge
#

lo

spring ember
#
client.on("message", (message) => {
  if (message.author.bot) return;
    
  if (message.content.startsWith(greetings[0])||message.content.startsWith(greetings[1]))
    message.channel.send(respondGreet[Math.floor(Math.random() * 7)]);
});```
gilded blaze
olive ridge
#

wut is http-nextra?

gilded blaze
#

HTTP wrapper

olive ridge
#

hmm

keen anvil
#

please don't tag all mods @little garnet

little garnet
#

One message removed from a suspended account.

#

One message removed from a suspended account.

keen anvil
#

What are you looking to find

little garnet
#

One message removed from a suspended account.

#

One message removed from a suspended account.

keen anvil
#

what library

#

discord.js or eris

little garnet
#

One message removed from a suspended account.

trim plinth
#

node.js isn't a lib

keen anvil
#

you aren't using plain node, you're using a library

little garnet
#

One message removed from a suspended account.

keen anvil
little garnet
#

One message removed from a suspended account.

gilded blaze
#

do message.guild.owner.user.tag

little garnet
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
topaz fjord
#

@earnest phoenix if it is done it will let u type commands again

wispy spear
#
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <style>
      body, html {
          height: 100%;
          margin: 0;
      }

      .bg {
          /* The image used */
          background-image: url("https://media.discordapp.net/attachments/427877585788076033/433308593417224192/unknown.png?width=720&height=405");

          /* Full height */
          height: 100%;

          /* Center and scale the image nicely */
          background-position: center;
          background-repeat: no-repeat;
          background-size: cover;
      }
      </style>
  </head>
</html>

Why wont this work ...

#

For my HTML description

earnest phoenix
#

on the site?

snow talon
#

How add my bot here ?

earnest phoenix
#

here?

#

cant tell if you’re joking or not

snow talon
#

me ?

spring ember
#

yes

#

you added a bot already...

snow talon
#

But it is not here on the server

earnest phoenix
#

@gilded blaze well

#

oh it been kicked

#

ask a mod

#

@gilded blaze srry for double ping, to use http-nextra to get body use my fork

gilded blaze
#

oh

#

what is ur github

inner jewel
#

lol what the fuck

earnest phoenix
inner jewel
#

what kind of http lib doesn't have body support by default lul

earnest phoenix
#

its wip

gilded blaze
#

ahh

#

k thanks

earnest phoenix
#

@inner jewel http-nextra is barely finished

#

@gilded blaze just use the json middleware

gilded blaze
#

o

#

Got it working 👍

earnest phoenix
#

if there are any bugs, do report. and yes ik i need a better middleware system but lazy

gilded blaze
#

Nice

earnest phoenix
#

😛

#

@earnest phoenix you there? (i swear this isnt random)

uncut slate
#

I'm here if you need anything mod-related

#

think I'm the only one on rn

earnest phoenix
#

nah, its vpsdime related

earnest phoenix
#

Yo

#

@earnest phoenix

#

I forgot what i was gonna ask, ffs

#

ahh

#

What location do you use for vpsdime

#

No idea

turbid wadi
#

hm

earnest phoenix
#

@last oracle it's just client.setPresence()

#

i think

last oracle
#

Ok... What are the args?

earnest phoenix
#

one sec it's client.user.setPresence()

#

one arg is a object

last oracle
#

like... client.user.setPresence(DND);

#

like that?

earnest phoenix
#

no

last oracle
#

ah. thanks!

#

i get it/

#
client.user.setPresence({ game: { name: 'with discord.js' }, status: 'idle' })
  .then(console.log)
  .catch(console.error);```
#

That worked!

#
[THANKS!!!]
gilded thunder
#

Why doesn't this seem to work? async too btw

# Forceleave server
# @commands.check(ownercheck)
@bot.command()
async def leave(ctx, id):
    await client.leave_server(id)
    embed=discord.Embed(title="Left server!", color=0xff0000)
    embed.add_field(name="ID", value=toleave, inline=False)
    await bot.say(embed=embed)
earnest phoenix
#

u dont have the toleave?

gilded thunder
#

I removed it as I thought I could pass that with ctx.

earnest phoenix
#

dont think that could work cause ur not getting the guild

#

not a python user but it looks like a error 🤷

gilded thunder
#

Ok, so I would do toleave = client.get_server(id) then?

#

Removed the quotes to make it read the variable.

mental solstice
#

is it possible to hook upvote?

earnest phoenix
#

think so Joshek also what do u mean @mental solstice

mental solstice
#

can i inform my bot when a user upvotes it on the discord bot list

earnest phoenix
#

the webhook option

mental solstice
#

ah ill head to the api channel, thank you

hot sleet
#

guys

#

i want an example of this dbl.hasVoted("129908908096487424")

#

if (!dbl.hasVoted("427751395123265546")) return message.channel.send("you have to vote");
not working

earnest phoenix
#

i think it returns true or false

hot sleet
#

yeah i know

earnest phoenix
#

so if (dbl.hasVoted("129908908096487424") === false) reutnr message.channel.send("VOTE OR U DIE")

hot sleet
#

return*

earnest phoenix
#

ik

hot sleet
#

wait i will test it again

spring ember
#

It seems like it should work

hot sleet
#

still not working

spring ember
#

Error?

#

Await maybe?

hot sleet
#

if (message.content.startsWith(prefix + 'test')) {
if (dbl.hasVoted("129908908096487424") === false) return message.channel.send("VOTE OR U DIE")
message.channel.send("test");
}

#

no errors

#

it say test every time

spring ember
#

You forgot to await

hot sleet
#

await ???

#

where should i put it

earnest phoenix
#

that means u voted

hot sleet
#

i used this id

#

my bot id is427751395123265546

spring ember
#

Please do this: ``````javascript
Code

#

Replace code with your code

earnest phoenix
#

also 129908908096487424 is Oliy

#

so it will always return false

spring ember
#

Lol

earnest phoenix
#

try to do console.log(dbl.hasvoted)

hot sleet
#

yeah i know

earnest phoenix
#

thing

#

see what it says

spring ember
#

So of course it wouldn't work

hot sleet
#

it should not say test

spring ember
#

It should

#

You did 1 line if

hot sleet
#

yeah when i vote

spring ember
#

Without {}

hot sleet
#

...

#

i did

mental solstice
#

is the webhook url on discordbots.org the url from the webhook i create for my server?

hot sleet
#

it return if he didn't vote

spring ember
#

Yes

#

It's the IP to send post requests to

#
if (message.content.startsWith(prefix + 'test')) {
    if (dbl.hasVoted(message.author.id) === false) 
return message.channel.send("VOTE OR U DIE")
}
#

Oh wait...

#

Send code of the hasVoted

hot sleet
#

i just released that i should put member id not the bot

#

agh

#

can anyone help me with this bot in my server

#

@spring ember

bitter sundial
#

hasVoted is a promise

spring ember
#

Don't tag me and I'm not interested in testing your bot for you

hot sleet
#

0_0 promise

spring ember
#

I'll be glad to help but not to test

hot sleet
#

thanks tonkku

#

kk

mental solstice
#

any documentation on setting up the webhook? downloaded the discordbotlist api package and got auth stuff taken care of

#

using c#

#

Do i need to declare an object other than AuthDiscordBotListApi. the only methods im seeing are getvotersasync and another

#

oh i see.. i can build a list.. ill try it out

low owl
#

You can use the .Net implementation for querying the API. But for webhooks you will need to setup a "server" or at least something that listens on a certain port and handles incoming requests.

mental solstice
#

yeah, ill need to figure out how to do that, id rather not check for changes to the list constantly

#

for some reason i was under the impression that using the discord webhook link would work.. the DBL would just send the info to the specified channel

low owl
#

I'd advice an approach that involves caching. Basically whenever you need data you query the API (has Voted for example). Then you just store that information in a cache and clear it every few minutes. That way you won't be using the API too much and don't have to constantly think about whether something is there or not.

#

Ah yeah. That doesn't work 😅
Ultimately you would want your own database of votes to query against I guess.

mental solstice
#

ok, i thought the point of the new webhooks was to steer away from api calls

#

ill handle a list however and go from there, thank you for your time

mental solstice
#

getting an exception that it cant desearlize the json.. GetVoterIdsAsync

low owl
mental solstice
#

not using anything, the api says GetVoterIdsAsynct returns a list of ulong

low owl
#

Well, you must be using something to deserialize.

#

Basically the API returns a string of Json and you want to turn that into an instance of an object.

mental solstice
inner jewel
#

don't use that

#

the onlyIds query param is ignored now

mental solstice
#

ah, i should use GetVotersAsync and put them into an IDblEntity list?

inner jewel
#

and loop the elements checking the ids

mental solstice
#

right thank you

sacred stirrup
#

How to make you discord bot online?

earnest phoenix
#

do u know any coding languages?

sacred stirrup
#

No?

weak parrot
#

You have to code a bot before you can make it come online

#

I'd highly suggest looking at how to do this online (YouTube, blogs, tutorials) since it's quite a long process

earnest phoenix
#

google python, javascript, java, c# and see which one u like and google "how to make a discord bot in <the lang u pick>"

low owl
#

Ah, you used the lib. Someone should probably make a PR and document 👀

earnest phoenix
#

what u mean?

low owl
#

Ah, document that the endpoint is deprecated. I assumed it wasn't documented since this poor fella had trouble with it.

#

Or at least not handles correctly in the library for .NET since it seemed to try and parse it.

mental solstice
#

a PR to remove that method?

inner jewel
#

the official java one also hasn't patched that

low owl
#

@mental solstice Yea, if it's "useless" anyway. I will take a look at it now since I'm home.

hot sleet
#

can anyone give me full vote code

uncut slate
#

We don't spoonfeed, no

hot sleet
#

okay why u don't give us full code in the website

#

how to save voters

#

nvm

#

@uncut slate how to get votes and save them

uncut slate
#

read the channel description

hot sleet
#

Do not mention peoples randomly

#

sorry

#

Guys if you know how to get check if someone voted or no tell me

floral stone
#

Use the api

#

@hot sleet

hot sleet
#

i can't understand it

floral stone
#

What language are you using?

hot sleet
#

JS

#

should i save voters

floral stone
#

I'm out of luck here then.

hot sleet
#

why

floral stone
#

I don't use Javascript

hot sleet
#

.net

earnest phoenix
fossil plaza
#

How do you do in JDA that the bot writes in color?

inner jewel
#
$ code blocks```
fossil plaza
#

$ code blocks

#

@inner jewel

#

???

earnest phoenix
#
$ lit
quiet bobcat
#
$ very lit fam```
fossil plaza
#

ok

#
Hello```
#

aha

#

A_Red

#

tkank you

gilded thunder
#

How do I stop ctx from trying to get parsed in d.py?

low rivet
#

@gilded thunder add pass_context=True in @bot.command() or @commands.command()

gilded thunder
#

Trying that.

#

Aha, thanks!

earnest phoenix
#

@gilded thunder What dices r u trying to roll?

#

i'm making a dnd fun bot in C#

gilded thunder
#

What do you mean?

#

You can pass any number to be rolled.

earnest phoenix
#

Ah, nice! was just wondering what the purpose of the bot would be

gilded thunder
#

@misty shuttle

upper ember
earnest phoenix
#

Should I send a server count every time my bot joins/leaves a server?

uncut slate
#

No

#

send on an interval

earnest phoenix
#

I see
Glad I asked, because bots.discord.pw doesn't mind sending every time and I was about to do the same here

#

thanks

#

How long should the interval be?

uncut slate
#

15 minutes is probably fine, but it's pretty much your pick

earnest phoenix
#

I'll go with at least 10 minutes, or until the next join/leave

upper ember
#

I do it every 30 minutes

#

idk why

uncut slate
#

30 minutes is fine

#

you don't need your stats to be that live

earnest phoenix
low owl
#

@earnest phoenix Also, can you not use the library that was made for DBL and .NET? 🤔

#

That would tremendously simplify it, unless you plan on doing it all yourself.

earnest phoenix
#

DBL?

#

oh you mean you guys' library

#

I haven't checked it out

low owl
earnest phoenix
#

neat

#

What do the widgets do, are those for the bot's page?

low owl
#

Yes

earnest phoenix
#

I'll look into it if I can't get it to work

#

hey it works

#

Thanks!

low owl
#

No problem. 😃

earnest phoenix
#

gonna lunch now

prime cliff
#

Sent server count to server 1 and 2 thonk

earnest phoenix
prime cliff
#

Oh lul

#

just name its dbots and dbl otherwise if one of them fails you wont know which one is which

earnest phoenix
#

I'll have to remember, I just made a loop and those are the indices

#

hold on

#

😀

#

i should have just printed the request uri lol

#

Would be easier to tell apart as you say

#

also I should have said guild count

cyan meteor
#

Could someone help me with reactions ?

earnest phoenix
#

??

#

coding lang?

#

and lib

quiet bobcat
#

^

#

information is kinda needed @cyan meteor

earnest phoenix
#

then u relaize he means love reactions

cyan meteor
#

Sorry, was trying stuff.

#

Ok so I code in Python.
And I'm trying to get the
1⃣ - 9⃣
and the
✔ ✖
as a reaction to a message

#

but when I use the unicode it says that it's not a emoji

#

I've used on_reaction_add to get the unicode

quiet bobcat
#

Do you have the actual emoji?

#

Like \✔

#

or?

#

\✔ = ✔ btw

cyan meteor
#

let me try that one

#

Ok that worked, I'm stupid for not trying that -_-

quiet bobcat
#

To get those just do \ in front of the emoji so eg \:smile: would give \😄

#

Also it's good that it worked 👍

earnest phoenix
#

The \ escape doesn't work on mobile btw

cyan meteor
#

But for the numbers it still doesn't work

#

\1⃣

quiet bobcat
#

\1⃣

#

🤔

cyan meteor
#

and you can't use \1⃣

quiet bobcat
#

Weird

cyan meteor
#

yea

quiet bobcat
#

#

yeah idk

#

most likely emoji numbers aren't unicode then

cyan meteor
#

I'll try some unicodes see if I can find any that work

#

I'll past them here if I find one

quiet bobcat
#

ok

earnest phoenix
#

\1⃣

#

\🤔

spring ember
#

Idk why but our site on chrome streches a pic and on edge it works fine

earnest phoenix
#

$help

#

%help

#

Is there anything thats not a command

#

-;

#

`help

#

*help

#

(help

#

(help)

topaz fjord
earnest phoenix
#

Does anyone know anything about python?

#

And what do you guys develop your bots in?

#

discord.js?

inner jewel
#

JDA + scala

topaz fjord
#

i use discord.js

earnest phoenix
#

hm

#

Could you send me the link of discord.js Tortoise?

#

in dms or somthin

topaz fjord
#
earnest phoenix
#

okie

#

..

#

I feel dumb

#

How do you install it?

inner jewel
#

npm i discord.js

trim plinth
earnest phoenix
#

In visual?

#

o

#

no dip

#

lol

orchid copper
#

pythonic 😍

tiny lodge
#

@earnest phoenix also you should use npm i discordjs/discord.js

#

Master masterrace

earnest phoenix
#

?

#

Mk

topaz fjord
#

@tiny lodge not everyone wants to be on master

tiny lodge
#

I'm just recommending it ig

unkempt dew
#

why would you not use npm i -S discord.js

tiny lodge
#

if you want to install djs master @unkempt dew

ivory pebble
#
  title: 'Toto - Africa (Video)',
  requester: 'Tetra' }
internal/child_process.js:330
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at ChildProcess.spawn (internal/child_process.js:330:11)
    at Object.exports.spawn (child_process.js:500:9)
    at new FfmpegProcess (/root/ium/node_modules/prism-media/src/transcoders/ffmpeg/FfmpegProcess.js:14:33)
    at FfmpegTranscoder.transcode (/root/ium/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:18)
    at MediaTranscoder.transcode (/root/ium/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
    at Prism.transcode (/root/ium/node_modules/prism-media/src/Prism.js:13:28)
    at AudioPlayer.playUnknownStream (/root/ium/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
    at VoiceConnection.playStream (/root/ium/node_modules/discord.js/src/client/voice/VoiceConnection.js:483:24)
    at play (/root/ium/index.js:242:43)
    at Object.play (/root/ium/index.js:273:5)
root@ium:~/ium#```
Getting this error, when I try playing music with my bot...
(Note: This is on Ubuntu/Server)
heady zinc
#

iirc it's a permission error

inner jewel
#
#define EACCES 13 /* Permission denied */```
ivory pebble
#

@heady zinc Says this when I try to install it

#
chmod: cannot access 'APPNAME/file': No such file or directory
heady zinc
#

you're supposed to replace this part ZoomEyes

ivory pebble
#

o stupid me

#

so

#

ium/index.js ?

heady zinc
#

the path to it should work yeah

ivory pebble
#

Same error

heady zinc
#

unless it's based on the exact file that spawns it rather than the process itself

#

then you would need to do that for ffmpeg ?

#

idk much linux soo

floral stone
#

The reason why it's not working because it's the wrong path.

#

Maybe use a full path?

deep lark
#

Hey guys, I'm fair new to this stuff so I hope this is the right place to post my question, but I've been trying to make a Fortnite bot on node js and here's the part of my code that's wrong. I used "npm init fortnite". Would be great if somebody knew what I need to do to fix it, thanks! 😁

#
const Fortnite = require("fortnite");
const ft = new Fortnite("APIKEY");```
#

This is the error that it is coming up with


Fortnite is not a constructer```
young cradle
#

I don't know this module, but to explain it... Whatever the index file of the fortnite module is exporting is not a Class, thus not being able to invoke new

#

If it has one (Should have)

deep lark
#

There's a small snippet of code and that's basically it

trim plinth
#

hmmm fornit

young cradle
#

Right there in the example it tells you to do

const { Client } = require('fortnite');
const Fortnite = new Client(/* ... */);
trim plinth
#

yeah you didn't do that

young cradle
#

Not exactly what is written there, but copy and pasting on mobile is annoying, but yeah

trim plinth
#

you just named the variable Fortnite, didn't grab the Client class

young cradle
#

Read the README and follow the examples

#

With that you should not get stuck

deep lark
#

Oh I see, I thought the { Client } was a name of our choosing

young cradle
#

Nop

trim plinth
#

no it isn't

topaz fjord
trim plinth
#

that grabs the client class

#

wait theres dark theme github GWqlabsThinkLol

topaz fjord
#

@trim plinth no

trim plinth
#

:(

young cradle
#

const { Client } = require('fortnite'); is the same thing as const thing = require('fortnite').Client;

topaz fjord
#

its somethin called stylish @trim plinth

trim plinth
#

reee

young cradle
#

Sorry

#

.Client

#

its really late here

deep lark
#

I watched a youtube guide and the youtuber used his own variable names for the { Client } 😅

trim plinth
#

#GithubGiveUsOurDarkTheme

young cradle
#

Well

trim plinth
#

@deep lark they did it incorrectly then

#

or that was a older version and it changed

young cradle
#

He either did by doing const anOwnName = require('fortnite').Client

#

or did const { Client: anOwnName } = require('fortnite');

#

Else it is just wrong, or an outdated video

deep lark
trim plinth
#

hmmm

#

d.js tutorial

topaz fjord
#

wait u can do { Client: ownname }

deep lark
#

Here it is, it was only 2 weeks ago so I assumed it was recent

young cradle
#

Yes you can

trim plinth
#

¯_(ツ)_/¯

young cradle
#

I would watch the video, but again, that's the right way of doing so

#

Follow the docs, always help

trim plinth
#

too lazy to watch the video™

topaz fjord
#

thats because the guy who made the fortnite package updated it

young cradle
topaz fjord
#

very recently

trim plinth
#

yeah that's probably it then

deep lark
#

Sounds perfect then, thank you for all the help guys! 😄

young cradle
#

You're welcome

trim plinth
#

@deep lark np

wet ferry
#

that's my code

#

how did you get it to work?

#

ik you had to get the servercount with node

#

maybe...??

cursive dagger
#

@earnest phoenix is a bot that pms everyone on ur server ok? u will need admin perms??? is that ok

spring ember
#

API abuse

cursive dagger
#

ok thanks

#

ill remove then apply

spring ember
#

And don't tag solace for questions anyone can help you

grave rune
#

just realized the default channel id shares it's id with the guild id

#

that's dumb

spring ember
#

Also the @everyone role

grave rune
#

seems.. lazy

spring ember
#

It's not and it's actually intuitive in a way

cursive dagger
#

is open source bots allowed??? i made it and made it open source

spring ember
#

As long as your token isn't public

cursive dagger
#

yep just mine

spring ember
#

Which is bad anyway

cursive dagger
#

yeh

grave rune
#

I can see why they do it, but it made my whitelist feature have a caveat therefore it's lazy 😂

spring ember
#

Make sure it's not an unmodified fork or little modified @cursive dagger

cursive dagger
#

why i am the one that made it and did it open source on github @spring ember

spring ember
#

Wdym is it a fork?

cursive dagger
#

nope

grave rune
#

believe he means he has it hosted on github

#

which is fine

spring ember
#

Yeah it is

cursive dagger
#

yep i uploaded it to github to make so other ppl can use it

grave rune
#

I'd guess you'd be in the majority with that epic 😉 like dondish said just make sure your token isnt accidentally in your code anywhere

spring ember
#

That's the idea of open-source yeah

cursive dagger
#

ok i am gonna try applying it here

spring ember
#

Do you host it ?

earnest phoenix
#

Hey guys, having troubles with changing bot username.
Changing appname in discordapp.com doesn't seem to work, changes don't apply
How can I do that?

spring ember
#

Use your API

#

What language are you using?

earnest phoenix
#

JS

#

discord.js lib

spring ember
#

What api?

#

Ok

#

Wait a sec gonna send you da wae

#

Client.user.setUsername()

earnest phoenix
#

thank you!

tiny turtle
toxic oracle
#

What are you putting the body as?

#

And are you sending it to a discord webhook?

hot sleet
#

guys how to get info from any website and send it in message using JS

low owl
#

Can you click on show details?

tiny turtle
#

yea my youtube one works fine just twicth im having issues with one sec

#

{"content": {{CreatedAt}} **{{VideoTitle}}** : {{VideoUrl}}"}

low owl
#

Oh, I thought there is like an error description

tiny turtle
#

my youtube one { "username":"ESO Assistant","content":" {{AuthorName}} uploaded a video {{CreatedAt}}: {{Url}}" }

hot sleet
#

@tiny turtle How to get info from websites

tiny turtle
#

tried that changing the stuff to the twitch stuff first and it was 400 also

hot sleet
#

???

toxic oracle
#

He wasn't talking to you

tiny turtle
#

ifttt twitch to webhook

toxic oracle
#

@tiny turtle show me your current body rn

tiny turtle
#

{"content": {{CreatedAt}} {{VideoTitle}} : {{VideoUrl}}"}

toxic oracle
#

You didn't open the content value with a "

tiny turtle
#

its there

#

{"content": {{CreatedAt}} {{VideoTitle}} : {{VideoUrl}}"}

toxic oracle
#
{"content": "{{CreatedAt}} **{{VideoTitle}}** : {{VideoUrl}}"}
#

Try that

tiny turtle
#

omg

#

that might be it lol, ill give it a go ty!

toxic oracle
#

Np

earnest phoenix
#

How can bilud bot need help?

mental solstice
uncut slate
#

We're aware of the issues, it's being looked into

mental solstice
#

ok thank you, making sure i didnt get rate limited or something, only making 2 api calls per minute

low owl
#

Not entirely development related, but I miss my 16 GB RAM for development. 8 GB feels like such a downgrade if you multitask a lot. 😦

#

@earnest phoenix Do you know any programming languages?

earnest phoenix
#

Anyone experienced connectivity problems with their bots and Discord or DigitalOcean in the past 12 hours?

crude wadi
#

.

cursive dagger
#

Anyone know how to use pastebin api in python???

spring ember
#

@earnest phoenix yes, Memes sent me my bot is down and the websocket wasn't connected. it sucks

low rivet
#

I'm using DO, all 3 up

#

some auto restarted a few hours ago though

spring ember
#

connectivity problems != offline

low rivet
#

*12h

spring ember
#

I had websocket disconnections where my bot was online but unresponsive

earnest phoenix
#

@spring ember dang
And now I can't connect to DigitalOcean because the verification codes they send to my email don't work

spring ember
#

oof rip

cursive dagger
#

oof

earnest phoenix
#

Yup still can't

#

Fucking buggy login system

spring ember
#

did you ever use ovh?

#

the login system is soooo stupid sometimes

earnest phoenix
#

They just replied to my report

#

I am immediately calmed

spring ember
#

it's not about development rn

topaz fjord
#

This is why you don't use ovh :^)

wet ferry
#

Can someone help me with servercounts? I see how solace did it on his website, but i can't get it to work on mine. https://glitch.com/edit/#!/rare-expert?path=views/index.html:262:7

that's my code
Do you have to use the dblapi.js module?

spring ember
#

no, you can make simple post requests

eternal wing
#

How can I invite my bot here?

spring ember
eternal wing
#

Ok

fossil plaza
#

How do I make a remainder command in JDA

spring ember
#

reminder? remainder is Integer % Integer

#

if reminder I suggest you to read about ScheduledExecutors

fossil plaza
#

Prescribed. Sorry. Meant restart

spring ember
#

use a service in linux, threads, wrapper I personally don't use one

fossil plaza
#

ok i have no linuk

spring ember
#

you don't really need a restart command though and the implementation is up to you

wet ferry
#

@spring ember What are the bot objects? How would I add them to my code? Are they node.js?

spring ember
#

JSON objects

#

wait bot object where?

wet ferry
#

bot objects are the names of the JSON objects

#

I still don't know how to get this to work

#

😦

#

How do i use JSON

spring ember
#

oh I get it ok

wet ferry
#

in my website?

spring ember
#

what language?

wet ferry
#

HTML

spring ember
#

js is really ez

wet ferry
#

and/or js

spring ember
#

html is not a programming language

wet ferry
#

oh

#

well you can see my code

spring ember
#

read about AJAX

wet ferry
cunning oxide
#

Hey, I'm looking for some help with listing a guild's groups in a rich embed using discord.js

#

I'm not asking for spoon feeding, btw, im just looking for osmething that might help

toxic oracle
#

Do you mean roles?

cunning oxide
#

ye.

#

sorry.

spring ember
#

what's the probelm @cunning oxide

toxic oracle
cunning oxide
#

and then put that as an object @toxic oracle?

toxic oracle
#

Wot

#

It's an array

#

Map returns an array

cunning oxide
#
//so like this?
.addField("Roles", `${r.name}`)
toxic oracle
spring ember
#

no you need to join the array

cunning oxide
#

im stupid

#

wait i got it

spring ember
#

with delimiter \n

cunning oxide
#

ok

#

yeah

#

yawn im stupid

spring ember
low owl
#

Have you checked if the channel exists? And that you don't accidentally escape it?

spring ember
low owl
#

Do you escape it then?

spring ember
#

how?

#

wait a sec

low owl
#

\[#development](/guild/264445053596991498/channel/272764566411149314/)

#

would be escaped for example

floral stone
#

@low owl

spring ember
#

oof it is

low owl
#

How did that happen if I may ask? 😛

spring ember
#

does pgsql returns it escaped?

#

I escaped it when I posted it

low owl
#

It should remain the exact value that you used to insert it

#

So you probably already insert your data escaped

spring ember
#

I do but it shows it to me unescaped in pgAdmin

low owl
#

Mh, not sure why that is

#

I'd recommend storing the ID of the channel rather than the mention string

spring ember
#

😛 well time to make the deescaper

low owl
#

Then fetching the channel when needed

spring ember
#

no I save the whole string

low owl
#

You will only run into trouble with that, such as probably breaking the Discord ToS. 😛

spring ember
#

why? welcomer messages are not against the ToS

floral stone
#

You can get the string name from the id itself.

#

Don't you need like a note saying we store channels names?

spring ember
#

?

low owl
#

They aren't but you are not allowed to store data longer than needed (etc.) and have to delete it after a while

#

if you use a string it might be a bit complicated to ensure the channel does not exist anymore

#

or update your db accordingly

#

Not like anyone would care too much about the ToS, but there are only benefits in using the id as key instead of the string.

floral stone
#

Brian make so much sense, I should stop storing his history in a secret database.

low owl
#

👀

spring ember
#

lol

floral stone
#

👀

spring ember
#

thanks brian!

sand roost
#

How to get the first (aka default) channel of a guild nowadays since of the implementation of channel categories?

abstract crystal
#

at least in discord.py you can just get the first item in the list (guild.text_channels)

#

to get the system channel you can do guild.system_channel

sand roost
#

sorry d.js

earnest phoenix
#

filter and use type property

delicate zephyr
#

@prisma mist I'll help you fix it