#development

1 messages · Page 623 of 1

fiery stream
#

thats the problem outside of tag it works in A tag it doesnt

west spoke
#

Odd

fiery stream
#

yep it doesnt even show up in tag

west spoke
#

You did do "50" instead of "50%" or "50px"

#

Wait

#

It works fine

#

The padding

#

900px is much larger than any screen I've ever seen

celest spindle
west spoke
#

It was completely off-screen

#

Multiple runtimes

amber fractal
#

Wait

#

900px is quite small tho

fiery stream
#

does that really matter

amber fractal
#

no, but if 900px is much larger than any screen I've ever seen that's just odd

west spoke
#

Eh

#

I've set it to 0 and it shows up.

#

Perhaps the two padding in <a> and <img> are conflicting with eachother

fiery stream
#

guess what fixing size fixed the issue

west spoke
#

:v

fiery stream
#

after adding px behind it it started showing up

#

werid

west spoke
#

Yeah

#

I noticed that too

#

Only the outline

fiery stream
#

talking about that lazy

#

i need a bit of help on one other thing

#

do u know and cdn package that i can use to store data in mongo

west spoke
#

Nope

#

For storing data I use s3

fiery stream
#

s3?

west spoke
#

Aws

#

I believe

#

Nop

#

That

fiery stream
#

umm how much is it monthly

west spoke
#

For webpage?

#

About 80 cents usd

#

Depending on how much you upload and how frequently

#

Since I constantly make edits mine is normally around 5 each month

zealous veldt
#

More of a google cloud guy myself cough

west spoke
#

That works too

fiery stream
#

lazy okay so iam doing a document website like google docs

zealous veldt
#

google cloud is big sexy

fiery stream
#

so it would have articles how much would that be

west spoke
#

Eek

#

Depends

warm marsh
#

Even better, Just leave your computer on all the time.

#

😂

west spoke
#

That's what I do

warm marsh
#

Yeah

#

Cba with paying for anything as of right now.

unique nimbus
#

Raspberry Pi

#

It's 35 quid on amazon here in UK

west spoke
#

Nice

#

Though its slow

unique nimbus
#

It's for starter bots

#

Yes

#

And beginner robotics shit

fiery stream
#

lmao

#

just imagine machine learning on slowest pc avalible there

unique nimbus
#

yes

fiery stream
#

lol

#

wdym yes

cunning oxide
#

can u use emotes from other servers in ur bot?

west spoke
#

Yes

cunning oxide
#

or does anyone have a guide for that

west spoke
#

\:emote:

earnest phoenix
#

does it require the emote to be global?

cunning oxide
#

server\:emote:?

west spoke
#

All emotes by default are global

#

You just have to have the bot be in the server

fiery stream
#

:okgoogle

#

>ping

#

\A!ping

west spoke
#

:v

fiery stream
#

@west spoke unhashable type: 'dict'

#

why is that a error

#
    {
      'title': 'Python and MongoDB',
      'content': 'PyMongo is fun, you guys',
      'author': 'Scott',
      'date_posted': 'April 20, 2018'
    },
    {
      'title': 'Python and Jazz',
      'content': 'jazz is fun, you guys',
      'author': 'jaZz',
      'date_posted': 'May 21, 2019'
    }
  }```
#

its python

west spoke
#

Hmm

#

Send full code?

fiery stream
#
from pymongo import MongoClient

client = MongoClient('n/a')
app = Flask(__name__)

posts = [
{
    {
        'title': 'Python and MongoDB',
        'content': 'PyMongo is fun, you guys',
        'author': 'Scott',
        'date_posted': 'April 20, 2018'
    }, {
        'title': 'Python and Jazz',
        'content': 'jazz is fun, you guys',
        'author': 'jaZz',
        'date_posted': 'May 21, 2019'
    }
}
]

usettings = client.user.settings
#user_settings = {
#    'title': 'Python and MongoDB',
#    'content': 'PyMongo is fun, you guys',
#    'author': 'Scott'
#}
#result = usettings.insert_one(user_settings)
#print('One post: {0}'.format(result.inserted_id))

@app.route("/")
def home():
  return "Hello World!"


if __name__ == '__main__':
  app.run(debug=True, port=3000)```
#

thats what i got rn

#

and posts it to check

west spoke
#

Put parentheses around the json

fiery stream
#

wdym

west spoke
#
from flask import Flask, render_template
from pymongo import MongoClient

client = MongoClient('n/a')
app = Flask(__name__)

posts = ([
{
    {
        'title': 'Python and MongoDB',
        'content': 'PyMongo is fun, you guys',
        'author': 'Scott',
        'date_posted': 'April 20, 2018'
    }, {
        'title': 'Python and Jazz',
        'content': 'jazz is fun, you guys',
        'author': 'jaZz',
        'date_posted': 'May 21, 2019'
    }
}
])

usettings = client.user.settings
#user_settings = {
#    'title': 'Python and MongoDB',
#    'content': 'PyMongo is fun, you guys',
#    'author': 'Scott'
#}
#result = usettings.insert_one(user_settings)
#print('One post: {0}'.format(result.inserted_id))

@app.route("/")
def home():
  return "Hello World!"


if __name__ == '__main__':
  app.run(debug=True, port=3000)
#

It means multi-line strings

fiery stream
#

same error

west spoke
#

Hm

#

Idk then

fiery stream
#

lmao it was stupidest error i ever got

#

lmao the was unexpected curly brackets

inner jewel
#

@west spoke those () wouldn't change anything

#

the parser would drop them

west spoke
#

Meh

#

Ok

inner jewel
#

(thing) is exactly the same as thing when used as an expression

#

(thing,) would make it a tuple

wet forge
#

To whoever uses C# and Newtonsoft.Json

Does anyone know why this JSON can't serialize?
.JSON (works)

"criteria":
    [
        {
            "goal": 2,
            "value_type": 1,
            "bound": 1
        }
    ]

.JSON (fails)

"criteria":
    [
        {
            "goal": 3,
            "event_type": 1,
            "bound": 1
        }
    ]

.JSON (fails)

"criteria":
    [
        {
            "goal": 3,
            "value_type": 1,
            "event_type": 1,
            "bound": 1
        }
    ]

Class

public class Merit
{
    public Merit(MeritGoalType goal, MeritValueType? type = null, EventType? eventType = null)
    {
        switch(goal)
        {
            case MeritGoalType.Collect:
                if (!type.HasValue)
                    throw new Exception();
                Type = type;
                break;
            case MeritGoalType.Event:
                if(!eventType.HasValue)
                    throw new Exception();
                Event = eventType;
                break;
        }
    }

    [JsonProperty("goal")]
    public MeritGoalType Goal { get; }
    [JsonProperty("value_type")]
    public MeritValueType? Type { get; }
    [JsonProperty("event_type")]
    public EventType? Event { get; }
}```

The first version correctly serializes when using **value_type**, but **event_type** is always considered null, even if a **value_type** is specified. It feels like there is no proper reason as to why it won't account for **event_type**.
vapid pier
#

can i get some help on this

opaque eagle
#

node index.js... get rid of the run

vapid pier
#

ok

opaque eagle
#

Show code

zealous veldt
#

Without your token this time

opaque eagle
#

^

vapid pier
opaque eagle
#

And r u sure that file is called index.js?

vapid pier
#

yeah

zealous veldt
#

Have you saved?

opaque eagle
#

lol

vapid pier
#

no

quartz kindle
#

Lol

opaque eagle
#

Also nice new pfp @zealous veldt

zealous veldt
#

thank

vapid pier
#

so uhh

#

i save

balmy lantern
opaque eagle
#

dlm?

#

What's ur question? @balmy lantern

balmy lantern
#

So i've gotten a couple of errors, and then stuff that wont give any errors

#

im trying to check if the message sender has voted or not

opaque eagle
#

show code and show error

earnest phoenix
#

How can i get my bot to dm everyone in a specific role a message?

#

i need help

opaque eagle
#

language and library

earnest phoenix
#

like could i get a personal guide xD

opaque eagle
#

language and library

fiery stream
#

flash(f"Account created for {form.username.data}!", 'success') wow im gettings intreseting erros help plss

#

                                                     ^

SyntaxError: invalid syntax```
opaque eagle
#

What language is that?

inner jewel
#

looks like python

fiery stream
#

yee

opaque eagle
#

Python is one of two "major" languages idk yet

#

along with java

west spoke
#

That's py

tulip grove
#

Something ab Flask

#

Python

#

@fiery stream show code before that

peak quail
#

um

fiery stream
#
from pymongo import MongoClient
from forms import RegistrationForm, LoginForm

client = MongoClient('mongodb+srv:rmrn.mongodb.net/test?retryWrites=true')
app = Flask(__name__)

app.config['SECRET_KEY'] = 'hi'

posts = [
    {
        'title': 'Python and MongoDB',
        'content': 'PyMongo is fun, you guys',
        'author': 'Scott',
        'date_posted': 'April 20, 2018'
    }, {
        'title': 'Python and Jazz',
        'content': 'jazz is fun, you guys',
        'author': 'jaZz',
        'date_posted': 'May 21, 2019'
    }
]

usettings = client.user.settings
#user_settings = {
#    'title': 'Python and MongoDB',
#    'content': 'PyMongo is fun, you guys',
#    'author': 'Scott'
#}
#result = usettings.insert_one(user_settings)
#print('One post: {0}'.format(result.inserted_id))

@app.route("/")
def Home():
  return render_template('Home.html', posts=posts)

@app.route("/register")
def register():
  form = RegistrationForm()
  if form.validate_on_submit():
    flash(f'Account created for {form.username.data}!', 'success')
    
  return render_template('register.html', title='Register', form=form)

@app.route("/login")
def login():
  form = LoginForm()
  return render_template('login.html', title='Login', form=form)
    
if __name__ == '__main__':
  app.run(debug=True, port=3000)```
#

thats all i got in that file

tulip grove
#

🤔

robust acorn
#

any python coders here? that can help me?

#

@fiery stream did you need help with mongodb?

#

I can help with that

formal agate
#

I have been loosing my mind over this for so long I cannot take this any more. I do not know why the function play is not being run while the console.log console.log("Checkpoint more in queue"); is running. I have to been missing something very obvious here right? ```js
let fetched = ops.active.get(dispatcher.guildID);
console.log("Defined fetch");

//if (!fetched) return console.log("Error at fetch");

fetched.queue.songs.shift();
//delete fetched.queue.songs[0];
console.log("Shifted queue");

ops.active.set(dispatcher.guildID, fetched);
console.log("Set queue");

if (!fetched.queue.songs[0]) {
    console.log("Checkpoint nothing left");

    let vc = fetched.queue.voiceChannel;  
    if (vc) vc.leave();
    
    fetched.queue.textChannel.send(`🎶 || Finished playback`);
    
    ops.active.delete(dispatcher.guildID);
    
} else {
    console.log("Checkpoint more in queue");
    play(client, setting, ops, fetched);
}
fiery stream
#

no im mongo expert lol

#

i need help with error

robust acorn
#

cool

#

can you help me then

#

lol

#

how do I update all

#

like if {"user": "1"}

#

how do i update everything with that

#

as part of the docu,ent?

#

@fiery stream ? sorry for the ping

#

update.many

fiery stream
#

update.many

#

never heard of that function

robust acorn
#

how would the syntax turn out?

fiery stream
#

is that py of js

robust acorn
#

pymongo

#

python

#

I do know how to insert documents to individual

#

but

#

many

fiery stream
#

lol i dont even know python that much

#

if js i can

robust acorn
#

umm

#

you said your a mongo pro?

fiery stream
#

iin js i m

robust acorn
#

ok

#

in js how do you update many

fiery stream
#

which lib

#

lol why do u event want to know that

robust acorn
#

it might help

#

sorry if i bothered you

fiery stream
#

lol if u dont need it i dont got time to figure it out rn

#

if u free u should help me

#

anyone knows how to do dialogflow webhooks

earnest phoenix
dusky marsh
#

?

fiery stream
#

@dusky marsh do u know dialogflow webhooks

#

if anyone knows dialogflow webhooks mention me

zealous veldt
#

]]moreinfo What are you aiming to do? What have you tried? etc.

covert turtleBOT
#

If you want people to be able to assist you, please provide more information, such as what library and language you're using, the code in question and what you are trying to do and/or what is causing the error.

fiery stream
#

okay so dialogflow webhook im tring to pull websearch data like dictionary, memes, jokes

#

for example i want my bot to answers questions like

#

A!chat whats life

#

so pulls life from api and searches it and returns back

slender thistle
#

@robust acorn in pymongo, client.db.collection.update_many

earnest phoenix
#

@Sabres#1556 What happens is that the bot has try to send a private message to a person, but this person does not accept private messages from the server where is the bot. You'd have to do a wrestling like that

.catch(err) => {
message.channel.send("error")
}
#

ow

earnest phoenix
#

um help

#
module.js:550

    throw err;

    ^


Error: Cannot find module 'ytdl-core'

    at Function.Module._resolveFilename (module.js:548:15)

    at Function.Module._load (module.js:475:25)

    at Module.require (module.js:597:17)

    at require (internal/module.js:11:18)

at Object.<anonymous> (/app/commands/play.js:1:76)

    at Module._compile (module.js:653:30)

    at Object.Module._extensions..js (module.js:664:10)

    at Module.load (module.js:566:32)

    at tryModuleLoad (module.js:506:12)

    at Function.Module._load (module.js:498:3)```
#

yes

shy rose
#

nice edit lol

#

totally dif error

earnest phoenix
#

how i fix

shy rose
#

npm install ytdl-core

earnest phoenix
#

i did

digital sparrow
#

-0-

earnest phoenix
#

its working

digital sparrow
#

0

#

Help me make help command diacord.js?

earnest phoenix
#

is this all i need to get the thing to work

#
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your discordbots.org token', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})```
copper cradle
#

well yes

earnest phoenix
#

thats it

#

ok im done

#

what this mean

#

node v8.15.1, with pnpm

Installing...

WARN  Moving dblapi.js that was installed by a different package manager to "node_modules/.ignored

ERROR  ENOTEMPTY: directory not empty, rename '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/dblapi.js' -> '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/.ignored/dblapi.js'

unique nimbus
#

Read the docs

earnest phoenix
#

i still dont get it

unique nimbus
#

You have items in that directory

#

I don't use js so idk

digital sparrow
#

help me make help command discord.js

earnest phoenix
modern sable
#

your are trying to write to your server's root directory but don't have permissions

earnest phoenix
#

all i was doing is npm install dblapi.js

#

fix previous errors but now i get this error at this line "const DBL = require("dblapi.js");"```
module.js:550

throw err;

^

Error: Cannot find module 'dblapi.js'

at Function.Module._resolveFilename (module.js:548:15)

at Function.Module._load (module.js:475:25)

at Module.require (module.js:597:17)

at require (internal/module.js:11:18)

at Object.<anonymous> (/app/server.js:8:13)

at Module._compile (module.js:653:30)

at Object.Module._extensions..js (module.js:664:10)

at Module.load (module.js:566:32)

at tryModuleLoad (module.js:506:12)

at Function.Module._load (module.js:498:3)```
digital sparrow
#

help me make help command discord.js

modern sable
#

You didnt install dblapi.js in your bot's directory

earnest phoenix
#

i got this

#
$ npm install dblapi.js

npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/discord.js-dc9e85fd/typings/discord.js-test.ts'
npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/discord.js-dc9e85fd/typings/index.d.ts'
npm ERR! path /app/node_modules/.staging/discord-bot-list-b92468f3/node_modules/ajv
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/app/node_modules/.staging/discord-bot-list-b92468f3/node_modules/ajv' -> '/app/node_modules/.staging/ajv-15783739'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/8.15.1/_logs/2019-05-28T06_56_09_468Z-debug.log```
quartz kindle
#

on which folder is your bot in?

earnest phoenix
#

normaly when i open the console on glitch its the bots folder

quartz kindle
#

what do you get if you type pwd

earnest phoenix
#

/app

quartz kindle
#

now type ls

earnest phoenix
#

ok

#

done

quartz kindle
#

what did you get

earnest phoenix
#

antiswear.json botconfig.json commands LICENSE.md node_modules package.json package-lock.json pommands public README.md server.js shrinkwrap.yaml views

quartz kindle
#

you should be in the right folder now

earnest phoenix
#

Hey guys, bot is written in python, just wondering why the title is shown this way? Is there a way to remove the yellow

#

no same error

quartz kindle
#

@earnest phoenix no idea, i would be interested in how to get that yellow lmao

earnest phoenix
#

Well if I figure out why the hell it does it I'll change it and let you know xD @quartz kindle

#

Lmao

quartz kindle
#

@earnest phoenix show me the contents of package.json

earnest phoenix
quartz kindle
#

try using these

#

rm package-lock.json

#

npm cache --force clean

#

then try to install again

#

also, you have a bunch of weird dependencies in there, maybe you should clean it up

earnest phoenix
#

i got this in logs

#

ERROR  ENOTEMPTY: directory not empty, rename '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/dblapi.js' -> '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/.ignored/dblapi.js'```
quartz kindle
#

what different package manager lol

earnest phoenix
#

?

quartz kindle
#

either your system is completely messed up, or its glitch's fault

#

i would make a new folder and start from scratch

earnest phoenix
#

ive been installing with npm

quartz kindle
#

so, apparently glitch doesnt support that quite well

#

it says you need to use their package search function on the top of the window, or you need to edit your package.json file and let glitch install them automatically

earnest phoenix
#

idk what you mean

lament meteor
earnest phoenix
#

oh

#

thx

#

to all that help

#

me

#

hey me again

#

@quartz kindle i install it with that saurch thing

#

i get node v8.15.1, with pnpm

Installing...

WARN  Moving dblapi.js that was installed by a different package manager to "node_modules/.ignored

ERROR  ENOTEMPTY: directory not empty, rename '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/dblapi.js' -> '/rbd/pnpm-volume/68332d7f-e7f3-45a4-abdc-7a0779d008a1/node_modules/.ignored/dblapi.js'

quartz kindle
#

well idk

#

just test it, maybe it works

earnest phoenix
#

all i need is this to worrk

mossy vine
#

If youre on glitch you just add the package to package.json and it should install automatifally

earnest phoenix
#

what package

mossy vine
#

...

#

dblapi.js

earnest phoenix
#

ok thts done

#

@mossy vine no errors now thx

#

but how long it take till website will show

#

how meny servers its in

quartz kindle
#

show your code

#

it should work right away

earnest phoenix
#

what code i need for it wo work

#

i was not told about code

digital sparrow
#

How to host bot in glitch?

modern sable
#

your bot's code

earnest phoenix
#

@modern sable in the server.js

modern sable
#

he was asking for the code that you use to submit your server count

rugged terrace
#

hey can someone tell me the hex to the colours which blends into discord's background

#

for embeds

earnest phoenix
#

i have no code to do that @modern sable

slender thistle
#

Dark theme: RGB 54, 57, 62

rugged terrace
#

Thanks

#

vps

rugged terrace
#

if you're a student, use DigitalOcean Credits from GitHub Student Pack @earnest phoenix

harsh fossil
#

I'm using a t3.nano spot instance atm

#

Seems to do the trick for me

quartz kindle
#

google and amazon have vps's free for 12 months

earnest phoenix
#

oh forgot about that

#

@quartz kindle

#
const DBL = require("dblapi.js");
const dbl = new DBL(' token removed in copy', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
quartz kindle
#

which token did you put there?

#

is that inside your bot's main file?

earnest phoenix
#

that code is inside my server.js

quartz kindle
#

is server.js you main bot file?

earnest phoenix
#

yes

quartz kindle
#

does anything come up in the console when you run it?

earnest phoenix
#

no

quartz kindle
#

show me the full file

quartz kindle
#

@earnest phoenix you have two different clients

earnest phoenix
#

?????????????????

quartz kindle
earnest phoenix
#

oh

quartz kindle
sinful lotus
#

wgat

#

bot and client

quartz kindle
sinful lotus
#

your client is the const bot

#

not the const client

#

why even have 2 clients if the bot is your client

quartz kindle
#

you create a client and add it to DBL, then you create a bot and login with it

#

client is never logged in

earnest phoenix
#

how i fix

sinful lotus
#

use bot

quartz kindle
#

remove client

sinful lotus
#

not client

quartz kindle
#

put bot in DBL

earnest phoenix
#

ok

quartz kindle
#

and move your DBL down there, or move your bot up

sinful lotus
#

also count is redudant just to make that code more better

#

you can do bot.guilds.size

quartz kindle
sinful lotus
#

console.log = ram

#

for each guild + console .log isnt a good idea

earnest phoenix
#

why "your"

quartz kindle
#

you're* xD

earnest phoenix
#

And below as well too*

quartz kindle
#

true

earnest phoenix
#

I'm gramer polise

unique nimbus
#

Grammar police

quartz kindle
#

roast

earnest phoenix
#

Gramer polise

unique nimbus
#

That's not how you spell it

quartz kindle
#

someone doesnt understand trolling

unique nimbus
earnest phoenix
#

im dumb or someting idk what ya'll mean i cant fix the code im why to stupid

sinful lotus
#

start from not a bot

#

learn syntax

quartz kindle
#

do you understand what your code is doing?

#

you have to create a client, then add the client to DBL, then login with the client

#

you create a client like this: const YOURCLIENTNAMEHERE = new Discord.Client();

earnest phoenix
#

yes got that

quartz kindle
#

then you add the client to DBL like this: const dbl = new DBL(yourtoken, YOURCLIENTNAMEHERE);

rustic obsidian
#

mfw someone doesn't learn the basics & jumps straight to c0de

#

(No offence)

quartz kindle
#

then you login: YOURCLIENTNAMEHERE.login(bot token)

earnest phoenix
#

thats what i dont have

lament meteor
#

can you make events stop listening? d.js

quartz kindle
#

you should not create multiple clients, which means do not have ... new Discord.Client(); more than once in your entire code

#

you should chose 1 client name only, which in your case you chose the name bot, and use it for everything

#

so do not create a client named client

#

then you just need to make sure things are in the right order

#

ie, dont try to use things before creating them, for example trying to use bot.something before const bot = ...

quartz kindle
#

@earnest phoenix that means your bot token is wrong in the bot.login() part

late hill
#

Eris has a disableEvents option, maybe discord.js does too?

earnest phoenix
#

@quartz kindle what token it need

lament meteor
#

o ill see

earnest phoenix
quartz kindle
#

the one from discordapp

earnest phoenix
#

ok thats why

quartz kindle
#

the discordbots token is for the DBL part

earnest phoenix
#

ok

#

thats why i was confused

quartz kindle
#

@late hill yes it does, but i think hes trying to "unlisten" an event, not disable it

earnest phoenix
#

@quartz kindle thx you

#

if there wqas a rating syestem i would give you 10/10

quartz kindle
#

i also accept donations

#

apparently you need to pass a named function to the listener, so you can remove it later

late hill
#

o

lament meteor
#

tyty

#

well thats a pain

earnest phoenix
#

/opt/watcher/app-types/node/start.sh: line 49: null: command not found

#

help

quartz kindle
#

from the glitch threads, that means an error with the automatic installer, meaning something in your package.json is wrong

earnest phoenix
#

its not my bot im just hosting it for him/her

quartz kindle
#

well, their package.json is wrong or missing something

crude tide
#

Guys

#

Is there lile a server where you sell bots?

quartz kindle
#

wut

#

sell bots?

#

explain

earnest phoenix
#

i have no ider whats missing

#

im not going to look in to it

pallid zinc
#

i want to use variable for JSON data

#

but commandlist.lang mean lang in JSON instead

quartz kindle
#

?

#

could you explain better?

pallid zinc
#

lang variable is "ENG"

#

and commandlist JSON have a path call "ENG"

#

and i want to use var lang to get data in commandlist.json with var lang path...

quartz kindle
#

commandlist[lang]

earnest phoenix
#

Hey how would I go about in discord.js having a bot react to every message in a channel with 👍 and 👎.

#

just add message.react('emote').then(message.react('emote2'))

#

in your index

#

No for every message in a channel.

#

just return the channel

#

K

quartz kindle
#

past messages or future messages?

earnest phoenix
#

if(message.channel.id !== 'idofchannel') return;

neat tinsel
#

Anyone got any idea why a Discord bot would disconnect from a voice channel randomly with no error (discord.py rewrite)

#

I'm thinking CloudFlare as it was way worse on a Vultr vps

slender thistle
#

A) Your bot errored out and you are ignoring errors in your code
B) Your bot lost connection to Discord
C) Your Internet is a bad
D) Discord

copper cradle
#

^

neat tinsel
#

No errors for it are being supressed

slim heart
#

Then someone is kicking it

#

Or you handle errors and don’t print it

neat tinsel
#

impossible if there's just me and a bot in there

earnest phoenix
#

D as in DISC

neat tinsel
#

nobody can see those channels

fiery stream
#

Ayy how do u do command handler in python

neat tinsel
#

And errors are printing, I've had plenty print

slim heart
#

Then what are they

fiery stream
#

Help how do u do command handler in py

neat tinsel
#

Not relevant to the error I am getting.

slim heart
#

The only way it wouldn’t print anything is if it isn’t responding to ACKS but I don’t know d.py

slender thistle
#

@fiery stream Use commands extension d.py provides

slim heart
#

Ask in the official py help cuz yea Amelia

fiery stream
#

What does that do

slender thistle
#

Simplifies the way of creating bot commands

neat tinsel
#

Alright, thanks anywho

earnest phoenix
#

i'd just assume it's cloudflare

fiery stream
#

Isnt there a command handler in it like js

#

So i can have multiple files

slim heart
#

A websocket connection wouldn’t be managed by cloudflare I don’t think

fiery stream
#

Commands/ping.py?

earnest phoenix
#

it is, berry

slender thistle
#

Yes, you can, Jazz

slim heart
#

They aren’t sending requests to you

fiery stream
#

@slender thistle how is that

#

Any guide

earnest phoenix
#

cloudflare on discord's side, not on user's

slim heart
#

Unless it’s cloudflare on their end

#

Oh ok, well I doubt it cuz it doesn’t effect anyone else rn

earnest phoenix
#

i've experienced a few cloudflare ws disconnects with a huge uptime bot

slim heart
#

If you’re getting kicked off my cloudflare for large uptime than your connection is just bad

#

The longer your up the more often they check

fiery stream
#

Uhh ohh

fiery stream
#

@slender thistle do u know dialogflow webhooks btw???

slender thistle
#

Never used never heard

fiery stream
#

Uhh rip

#

It was main part of my bot’s ai traning

earnest phoenix
#

bruh i couldnt set up python

slender thistle
#

how come

fiery stream
#

Because it pull data from apis like meme api

golden surge
#

😦

#
 { DiscordAPIError: Invalid Form Body
embed.fields[2].value: This field is required
    at item.request.gen.end (C:\Users\Jake\Desktop\GIT HUB\Discord-Test-Bot\discordbot\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:79:15)
    at then (C:\Users\Jake\Desktop\GIT HUB\Discord-Test-Bot\discordbot\node_modules\snekfetch\src\index.js:215:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'DiscordAPIError',
  message:
   'Invalid Form Body\nembed.fields[2].value: This field is required',
  path: '/api/v7/channels/580550830038581300/messages',
  code: 50035,
  method: 'POST' } ```
#

Yet another Discord API error 😦

modern sable
#

You submitted a embed which contains a field with no value

golden surge
#

   if (type == "messageDelete") {
        message = args[0];

        const date = new Date()
        console.log(`[${moment(date).format('DD-MM-Y hh:mm: A')}][${message.guild.name}] User ${message.author.tag}s message has been deleted`)

        let msgContent = '';

        if (message.content.length > 0) {
            msgContent += message.content;
        }

        if (message.attachments.array().length > 0) {
            msgContent = msgContent + '\n' + message.attachments.array()[0].proxyURL;
        }

        const embed = {
            "embed": {
                "color": 0xd05333,
                "title": 'Message Removed',
                'fields': [
                    {
                        'name': 'member:',
                        'value': `${message.author}`,
                        'inline': true
                    },
                    {
                        'name': 'channel:',
                        'value': `${message.channel}`,
                        'inline': true
                    },
                    {
                        'name': 'message:',
                        'value': `${msgContent}`
                    },

                ],
                footer: {
                    'text': "member id: " + message.id + "  |  " + moment(date).format('DD-MM-Y hh:mm:ss A')
                }
            }
        };
        logChannel.send(embed)
            .catch(function (err) {)
    }

#

@modern sable

#

Oh i see

pallid zinc
#

How can I display author avatar below help command

#

I used displayAvatarURL but it only send link

#

You can check

dusky marsh
#

.setFooter('footer text', message.author.displayAvatarURL) should be what youre looking for

pallid zinc
#

Ok

#

Thanks a lot it work

dusky marsh
#

np

earnest phoenix
#

/slots

#

/slots

#

/servers

#

/prefix !

mossy vine
jolly sentinel
#

I just got a big ol' error in my console and I have no clue as to what it means

#

ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2484)

#

Something something error in data transfer

#

No reference to my bot script

shy rose
#

sounds fun....

earnest phoenix
#

may i let my bot create invite link

shy rose
#

as long as your bot has perms they can make invite links

earnest phoenix
#

i wanna let my bot go generate invite links of servers it joined

#

just an idea

#

generating invites to guilds your bot is in without permission (so you can join?) would probably be considered api abuse

#

ikr

#

i just thought about that

shy rose
#

not api abuse (i dont think)

but it is a reason for people to not use your bot

unique nimbus
#

It's api abuse oof

#

Also it's without consent

earnest phoenix
#

im not going to make it

#

i just thought if its possible

unique nimbus
#

It is

earnest phoenix
#

k

indigo geyser
#
    	await client.delete_message()```
#

@west spoke like this?

hushed quarry
#

no, delete_message has no context of the message you want to delete

west spoke
hushed quarry
#

check their documentation

west spoke
#

client.delete_message(message)

indigo geyser
#

Ok

#

Tnks

west spoke
#

Learn the lib

hushed quarry
#

(read the documentation)

#

actually are there even any docs for the async branch anymore since it was deprecated

west spoke
#

^

#

Time to recreate it

#

There is it's just hard to find

hushed quarry
#

good

#

force le people to use the rewrite branch

indigo geyser
#

It didn't works but it's ok

#

line 72, in on_message AttributeError: 'Client' object has no attribute 'delete_message'

#

I don't understand

#

Can you do an example pls?

hushed quarry
#

dir(client) and find the appropriate method (since i don't use the async branch and idk what it is)

grim aspen
hushed quarry
#

@grim aspen he said he's using the async branch

grim aspen
indigo geyser
#

Tnks

balmy lantern
wicked pivot
#
let user = message.mentions.users.first() || message.author;

            if(!xp[user.id]) {
                xp[user.id] = {
                    xp: 1,
                    };
                }
                let addxp = 1;
                let cExp = xp[user.id].xp;
                xp[message.author.id].xp = currentExp + addxp;
            let embed = new Discord.RichEmbed()
             .setTitle(`T'es stat en terme de message sur le serveur !`)
             .addField('À écrit :', `${cExp} message !`)
             .setColor(`#dc143c`)
             .setFooter(`demande de ${message.author.username}`)
             .setTimestamp()
            return message.channel.send(embed)``` hello i'm french, i have a little problem with some of my code i would like when i mention a member its shows the xp of the member mentioned and problem when i mention a member no error and no response from the bot
vapid pier
#

from this list

west spoke
#

Wdym commands

vapid pier
#
    console.log('This bot is online!')
})

bot.on('message', message=>{

    let args = message.content.substring(PREFIX.legnth).split(" ");

    switch(args[0]){
        case 's!help' :
            message.channel.sendMessage('This bot is being developed on! Wait until the bot is finished!')
        break;
    }
})

bot.login(token);```
west spoke
#

Jesus christ java/javascript is so complicated compared to py

#

Icansee

vapid pier
#

like what do i need to copy to make a new command

#

im new to this javascript stuff

west spoke
#

On message I think

#

Use py its easier

vapid pier
#

k

west spoke
#

Yeah python is easier. Much easier.

wicked pivot
#
let user = message.mentions.users.first() || message.author;

            if(!xp[user.id]) {
                xp[user.id] = {
                    xp: 1,
                    };
                }
                let addxp = 1;
                let cExp = xp[user.id].xp;
                xp[message.author.id].xp = currentExp + addxp;
            let embed = new Discord.RichEmbed()
             .setTitle(`T'es stat en terme de message sur le serveur !`)
             .addField('À écrit :', `${cExp} message !`)
             .setColor(`#dc143c`)
             .setFooter(`demande de ${message.author.username}`)
             .setTimestamp()
            return message.channel.send(embed)``` hello i'm french, i have a ittle problem with some of my code i would like when i mention a member its shows the xp of the member mentioned and the problem when i mention a member no error and no bot response can anyone help me?
pallid zinc
#

I hosted my bot on heroku and it was 24/7 but after I done some major edit bot goes off after using one command

earnest phoenix
#

mood

pallid zinc
#

Lol

#
 let helpembed; 
if (!args[0]) { 
helpembed = new
discord.RichEmbed()
 .setColor('#7289DA') 
.setTitle(`Help commands`)
 .setDescription(`Toutes les catégorie de commandes !`) 
.addField ("► Admin", `Use ** ${prefix} help Admin ** to get help!`) 
.addField ("► Useless", `Use ** ${prefix} help Useless ** for help!`) 
.addField ("► Commands", `Use ** ${prefix} help Commands ** to get help!`) 
.setThumbnail ( 'https://i.imgur.com/1VAnB9B.png')
 .setFooter (`Help asked by ${message.author.username}`, message.author.displayAvatarURL );```
earnest phoenix
#

i remember we tried to move to heroku

#

and it just didnt work

#

no matter what we tried

#

so uh

#

i went back to home hosting it

#

but i dont do that anymore :D

#

we use a VPS i think?

#

but we got it connected to a webserver we made

wicked pivot
#
if(message.content === prefix + "stat") {
        if(message.author.bot)return;

    let user = message.mentions.users.first() || message.author;

            if(!xp[user.id]) {
                xp[user.id] = {
                    xp: 1,
                    };
                }
                let addxp = 1;
                let cExp = xp[user.id].xp;
                xp[user.id].xp = cExp + addxp;
            let embed = new Discord.RichEmbed()
             .setTitle(`Les stat de ${user.username} en terme de message sur le serveur !`)
             .addField('À écrit :', `${cExp} message !`)
             .setColor(`#dc143c`)
             .setFooter(`demande de ${message.author.username}`)
             .setTimestamp()
             message.channel.send(embed)
    }
    })```hello i'm french, i have a ittle problem with some of my code i would like when i mention a member its shows the xp of the member mentioned and the problem when i mention a member no error and no bot response can anyone help me???
earnest phoenix
#

so we can start and stop the bot with a push of a button

#

hmm

#

put it in a try block

#

and add a catch block

#

@earnest phoenix did i get that right?

#

but yeah put it in a try block and then add a catch block to catch any errors

#

also you dont need the () after RichEmbed i dont think

#

Heroku doesn’t like it when you write to files in my experience

#

But maybe I’m dumb

#

no i dont think it does

#

@earnest phoenix you do need it

#

o

#

we dont use it hh

#

oh

#

I thought you needed it

#

no i dont think you do

#

because i mean your just defining embed are you not

#

or am i being really dumb again

#

well

#

i mean we dont use it and it works perfectly fine

#

so you shouldn't need it

#

OH I THINK I KNOW THE ERROR!

#

instead of saying the first mention OR the author

#

check that there is a mention

#

and if not

#

let user - msg.author

#

@wicked pivot

pallid zinc
#

Don't have money to buy vps

earnest phoenix
#

lol we are using the credits a friend gets from his highschool

#

because he is in computer science

#

we are working on a way to raise money to pay for a VPS we actually own

pallid zinc
#

I just need to remove message.mentions.users.first() ?

wicked pivot
#

I mention someone every time but it does not work unfortunately

earnest phoenix
#

tony

#

have you tried my solution

#

let user equal the first mention

#

and if user doesnt exist

#

let user equal the author

pallid zinc
#

This is for me

earnest phoenix
#

what

#

o

pallid zinc
#

Lol

#

I don't even have this in my code

wicked pivot
#

yes yes basic it was like that but I want to make sure that the members can see the "xp" of the other

bright stag
#

Hey, so I need help with developing a method that when someone inserts a URL, it gets deleted. Problem is, every text in the string gets deleted

Here is my code:

const request = require('request');
const {promisify, inspect} = require("util");
const req = promisify(request);

      for(var i in phrase) {
        console.log(phrase[i])
        try {
          if ((phrase[i].includes('https') || phrase[i].includes('http')) && await urlExists(phrase[i]))
            await phrase[i].splice(i, 1)
        } catch (e) {
          
        }
      }

async function urlExists(url) {
  let exists = false;

  try {
    let {statusCode} = await req({ url: url, method: 'HEAD' });
    if (statusCode == 200) exists = true
  } catch(e) {
    
  }

  return exists;
}

And this is my test array:
[ 'hi', 'my', 'name', 'is', 'NightYoshi370', 'https://discordapp.com/', 'how', 'are', 'you', 'today?' ]

vapid pier
#
const bot = new Discord.Client();

const token = 'GoodLuckWithThat';

const PREFIX = 's!';

bot.on('ready', () => {
    console.log('This bot is online!')
})

bot.on('message', message=>{

    let args = message.content.substring(PREFIX.legnth).split(" ");

    switch(args[0]){
        case 's!help' :
            message.channel.sendMessage('This bot is being developed on! Wait until the bot is finished!')
        break;
    }
})

bot.login(token);```
#

i need help

#

what lines of code do i need to copy if i wanted to make a new command and where would i paste it?

#

ping me if you have an answer

zealous veldt
#

Please use properly formatted codeblocks

earnest phoenix
#

^

earnest phoenix
#

-bots @earnest phoenix

gilded plankBOT
#
xYellowEmirhan#8091
Bots

@warm copper

zealous veldt
#

@earnest phoenix Don't use luca in here, use it in a testing channel pelase

earnest phoenix
#

inb4 go to off topic

#

darnit i missed

pallid zinc
#

Why my bot goes off after sec

#

Heroku

cursive dagger
#

No quota left

pallid zinc
#

```bot.channel.get('channel id ').setName('name here', voice)

#

Error cannot read property .setName of undefined

lime fiber
#

I want to make a web dashboard for my bot in php. I want to list the guilds into a listbox. How can I do this?

quartz kindle
#

listbox?

#

you mean an html <select>?

lime fiber
#

Yeah

#

For me it's just a listbox 😄

quartz kindle
#

iterate over them and build an html string

lime fiber
#

But how can I do this? And list them into multiple lines.

quartz kindle
#

example <select> taghtml <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select>

lime fiber
#

I know this

quartz kindle
#

you just have to build that in php

#

example

hidden ginkgo
#

That's a w3s example if I've ever seen one PepeLaugh

quartz kindle
#
echo "<select>";
foreach($guilds as $key => $value) {
    echo "<option value='".$key."'>".$value['name']."</option>";
}
echo "</select>";```
earnest phoenix
#

what's wrong with using w3schools tho

quartz kindle
#

assuming $guilds is an associative array where $key is the guild id and $value is an assiciative array containing the guild information

hidden ginkgo
#

Nothing, it's a great resource

lime fiber
#

ohh thanks

hidden ginkgo
#

Their choice of car manufacturer needs updating though

quartz kindle
#

lmao

lime fiber
#
$guildurl = 'https://discordapp.com/api/users/@me/guilds';

  $guilds = apiRequest($guildurl);
  echo "<select>";
foreach($guilds as $key => $value) {
    echo "<option value='".$key."'>".$value['name']."</option>";
}
echo "</select>";
idle basalt
#

w3 isnt that great

lime fiber
#

Here is my try

idle basalt
#

a lot of their stuff is super old and outdated

hidden ginkgo
#

yeah, like their choice of car manufacturers

idle basalt
#

saab ;-;

hidden ginkgo
#

I'm not really a fan of web dev anymore, so I wouldn't really know if there's anything more upto date

idle basalt
#

mdn is good

lime fiber
#

I'm successfully got the server names. Now how can I put this into that "listbox" ?

#

I used this:

#
  foreach ($guilds as $guild) {
    $teszt2 = $guild->name;
}
digital sparrow
#

What is good hosting

lime fiber
#

Ok. I combined with my code:

  <form method="GET">
      <?php   echo "<select>";
foreach($guilds as $guild) {
    echo "<option value='".$guild->name."'></option>";
}
echo "</select>";?>
    
#

PS: I've got 90 servers

hidden ginkgo
#

if you inspect element, do you see all of the content?

lime fiber
#

Yep

#

If I click my submit button it recognises the server's name

hidden ginkgo
#

possible css problem then?

lime fiber
#

🤔

hidden ginkgo
#

oh wait lol

#

duhh

#

you need to echo the name between the <option> here </option>

lime fiber
#

ohh

#

thanks

#

i forget it

#

😅

digital sparrow
#

What us good hosting for bot?

#

Is*

mossy vine
#

There are a few pinned

digital sparrow
#

?

mossy vine
#

Check the pinned messages in this channel

lime fiber
#

But wait! I can't put an echo, because it displays an error when i put it.

quartz kindle
#

remove the second echo lol

#

also remove the ;

lime fiber
#

But if I remove it, it won't display the server names

quartz kindle
#

"string".$variable."string" = "string"+variable+"string" in javascript

#

because you need to put it in two places

#

<option> has a value and a content

lime fiber
#

ok, thanks I'll give a try

quartz kindle
#

<option value="value here">content here</option>

#

content is what you will see

#

value is what you get if you click on it

#

if you need to access the guilds ID later, you should put the id in the value

#

<option value="guild id">guild name</option>

lime fiber
#

Ok, thanks a lot!

#

It's working now 😃

digital sparrow
#

Me not have USD

quartz kindle
#

currency doesnt matter if you have a credit card or paypal

#

google / amazon - good performance, free for 1 year (requires a credit card to sign up)
heroku / glitch - meh performance, free forever (with limitations, requires scripts to keep it on)
scaleway / galaxygate / hetzner / ovh - good performance, as cheap as 3-5 USD per month, accepts paypal

mystic hare
earnest phoenix
#

@mystic hare logout and connect you

mystic hare
earnest phoenix
#

@mystic hare You disconnected from the site?

mystic hare
#

nope

#

i stay

earnest phoenix
#

You have to disconnect from the site and then reconnect so that it refreshes because you have a slight mistake

mystic hare
earnest phoenix
#

yes

#

and now its must be good.

#

To mention a user in a message, this is correct?

let mentionuser = guild.members.mentions

or

let mentionuser = members.mentions

?

mystic hare
#

ok wait..

earnest phoenix
#

k

mystic hare
#

I keep trying to be refreshing

quartz kindle
#

@earnest phoenix just write their ID like this <@ID>

earnest phoenix
#

you are logged in with the wrong discord account in the browser @mystic hare

quartz kindle
#

@mystic hare
Make sure you are logged into the right account at https://discordapp.com/channels/@me (Open this in your browser!)
Log out on the web client and log back in to the correct account.
Your desktop client is not the same as on the website.

Discord

Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!

mystic hare
#

its work, thanks @earnest phoenix @quartz kindle @earnest phoenix

earnest phoenix
#

😉

#
let oldRole = message.guild.autorole

Cannot read property 'autorole'
why ?

warm marsh
#

Because autorole isn't a property of guild.

earnest phoenix
#

So how do I do it? @warm marsh

warm marsh
#

idk

#

What are you trying to do?

earnest phoenix
#

autorole command

warm marsh
#

ok

#

With a command of event?

earnest phoenix
#
const Discord = require ("discord.js");

module.exports.run = (message, bot) => {
	
  let oldRole = message.guild.autorole
  if (!message.args == "off") {
    if (oldRole !== false) {
      bot.config.setAuto(message.guild.id, false);
      return message.send("**✅ Autorole désactivé.**")
    } else {
      return message.send('**❌ Veuillez écrire un rôle à donner automatiquement.**')
    }
  }
  if (message.mentions.roles.first()) return message.send("**❌ Veuillez écrire le nom du rôle complètement au lieu de le mentionner.**")
  if (!message.guild.roles.exists('name', message.suffix)) return message.send("❌ Le rôle **"+message.suffix+"** n'existe pas dans ce serveur. Vérifiez l'orthographe.");
  if (message.guild.roles.find('name', message.suffix).position > message.guild.member(bot.user).highestRole.position) return message.send("**❌ Je ne peut pas assigner ce rôle automotiquement car il est au dessus du mien.**");
  bot.config.setAuto(message.guild.id, message.suffix);
  message.send("✅ Le rôle **" +message.suffix+ "** sera attribué aux utilisateurs quand ils rejoigneront le serveur.")
}

module.exports.help = {
	name:"autorole"
}
warm marsh
#

```js
```

#

find takes a callback

mossy vine
#

^

warm marsh
#

You will need to make oldrole equal to your stored role

mossy vine
#

surprised you just ignore the deprecation warnings about that

quartz kindle
#

i still dont get what hes trying to do with .autorole

mossy vine
#

also, the answer to your problem message.guild.autorole is undefined is very simple

#

there is no such property as autorole on guild

warm marsh
#

I think he thinks that when his bot creates a stored "autorole" is saves to guild.

#

Possible.

mossy vine
#

theres defaultRole, which is just the @everyone role of the guild

quartz kindle
#

which is also the id of the guild

opaque eagle
#

Ok bois stop with Discord trivia

#

"which is also the id of the guild" seriously

quartz kindle
#

wut

earnest phoenix
#

so ?wumpuuus glitchcat

#

Please summary

mossy vine
#

...

warm marsh
#

Your variable "oldRole" can't equal message.guild.autorole as it doesn't exist.

#

You must make "oldRole" equal to your stored one maybe.

mossy vine
#

read the fucking docs and realize that there is no property called autorole on Guild, and stop ignoring the damn deprecation warnings

warm marsh
#

xD

earnest phoenix
#

@mossy vine speak better please, I'm not a monster

mossy vine
#

sorry

earnest phoenix
#

not serious

digital sparrow
#

Help me

#

What is eris?

mossy vine
#

a library like discord.js

#

eris is faster, lighter, harder to use, and has worse documentation

knotty steeple
#

harder to use

#

pls

amber fractal
#

I thought master for d.js was better now

knotty steeple
#

its the same

amber fractal
#

Nah

#

Impossible is a better word

mossy vine
#

im talking from personal experience ok

knotty steeple
#

i literally use it

#

same thing

digital sparrow
#

@mossy vine thx you

#

And what is good editor for coding?

mossy vine
#

vim

digital sparrow
#

Vim?

mossy vine
#

vim

#

good code editor

#

hard to use but very good

amber fractal
#

Isnt vim terminal?

mossy vine
#

terminal based code editor

#

yeah

past pike
#

Does somebody know something about hosting at Heroku for discord bots?

#

My bots won't start up anymore for a reason

mossy vine
#
  1. nice email leak
#
  1. it says that quota is reached
past pike
#

I already removed e-mail

#

Its my spam mail

#

What does it means with quota is reached?

mossy vine
#

...

#

your free quota is reached

past pike
#

How can i solve that?

mossy vine
#

pay

past pike
#

Okay

late hill
#

FYI: heroku has recently updated their stuff so you can no longer infinitely keep using their worker dyno's 😂
(might be quite a few people coming here to ask what's going on with their bot)
^You're gonna have to pay now WHEEZE

#

Or switch to glitch /s

unique nimbus
#

yeet

past pike
#

Okay

quartz kindle
#

lmfao really

#

rip heroku

pallid zinc
#

@late hill same with me

unique nimbus
#

rip heroku

pallid zinc
#

It show closing or something like that

#

Here you go

#

It close after some time

unique nimbus
#

quota is exhausted

#

you have reached your quota

quartz kindle
#

you can still have it for free

#

you just need a credit card

#

Accounts are given a base of 550 free dyno hours each month. In addition to these base hours, accounts which verify with a credit card will receive an additional 450 hours added to the monthly free dyno quota. This means you can receive a total of 1000 free dyno hours per month, if you verify your account with a credit card.

#

When you use all your free dyno hours for a given month, all free apps on your account will be forced to sleep for the rest of the month.

#

550 hours = 22 days
1000 hours = 41 days

#

so if you dont have a credit card in your account, after you bot reaches the limit, it will sleep for the rest of the month lmao (8-9 days)

unique nimbus
#

yes

#

a lot of people here dont have credit cards

#

ye

quartz kindle
#

make two accounts, clone the project

#

run for 15 days each

unique nimbus
#

yes

pallid zinc
#

I don't have creadit card

ruby dust
#

I have 2

#

Idk why but I have them

quartz kindle
#

give me one

#

preferably the one which has money in it

ruby dust
#

That'd be the maestro one

#

Which doesn't have anything useful that's internet-related

quartz kindle
#

i have a maestro too

ruby dust
#

The other one is MasterCard, which is more of a personal one that also works with PayPal

unique nimbus
#

I just got one card

#

for everything and anything

fiery stream
#

ayy how do i check if user is playing a game or not

unique nimbus
#

what language?

fiery stream
#

js

#

@unique nimbus ummm

quartz kindle
fiery stream
#

exports.run = (client, message, args) => {

  var user = message.mentions.users.first() || message.author;
  
  if (user.presence.game.name === "Spotify" && user.presence.game.type === 2) {

    const embed = new Discord.RichEmbed()
      .setAuthor("Spotify")
      .setColor(client.config.botColor)
      .setThumbnail(user.presence.game.assets.largeImageURL)
      .addField("**Song name :**", `\`🎵\` ${user.presence.game.details}`, true)
      .addField("**Album :**", `\`📀\` ${user.presence.game.assets.largeText}`, true)
      .addField("**Author(s) :**", `\`🎤\` ${user.presence.game.state}`, true)
      .addField("Listen to this track :", `https://open.spotify.com/track/${user.presence.game.syncID}`, true);

    return message.channel.send(embed);
  } else if (!user.presence.game.name === "Spotify" && user.presence.game.type === 2) {
    message.channel.send(`\`[ERROR ❌]\`, ${user.username} may not be listening to a registered sound`);
  }
};

exports.conf = {
  enabled: true,
  guildOnly: false,
  aliases: [],
  permLevel: "User"
};

exports.help = {
  name: "spotify",
  category: "Misc",
  description: "check what the user is listening",
  usage: "spotify (args)"
};```
#

he i cant manage to get my else command work help

earnest phoenix
#

d

digital sparrow
#

Heroku or glitch?

ruby dust
#

Neither

earnest phoenix
#

a proper vps

digital sparrow
#

Me need free one

#

I not have paypal

quartz kindle
#

@fiery stream !something === something doesnt work the way you think it does

#

you should use something !== something

fiery stream
#

ohh yep

#

lmao

warm marsh
#

Does anyone know how to install the discord.py rewrite?

#

because cloning the git repository gives an error

unique nimbus
#

I think thats now the rewrite edition

#

it is

warm marsh
#

Thanks

unique nimbus
#

np

digital sparrow
#

Why my bot bot aprovved?

opaque eagle
#

It takes a week to approve bots

grim aspen
opaque eagle
#

If your bot got rejected, check #mod-logs to find out why it did

digital sparrow
#

Nope @opaque eagle

opaque eagle
#

Wdym

#

Is ur bot’s name MiintOS Beta? @digital sparrow

hushed quarry
opaque eagle
#

Yeah that too ^

digital sparrow
#

@opaque eagle ye

opaque eagle
digital sparrow
#

:(

fiery stream
#

@quartz kindle same issue with the spotify

quartz kindle
#

whats the issue?

earnest phoenix
#

is anyone else receiving a Unhandled Rejection: Error: ENOTFOUND discordapp.com discordapp.com:443 i just started my bot it worked yesterday but now it won't work at all.

#

nvm it's working now

fiery stream
#

@quartz kindle !==

#

The spotify

golden surge
#

o/

wicked pivot
#
if(message.content === prefix + "stat") {
        if(message.author.bot)return;

        let user = message.author
        if (message.mentions.users.first()) user = message.mentions.users.first()

            if(!xp[user.id]) {
                xp[user.id] = {
                    xp: 1
                    };
                }
                let addxp = 1;
                let cExp = xp[user.id].xp;
                xp[user.id].xp = cExp + addxp;
            let embed = new Discord.RichEmbed()
             .setTitle(`Les stat de ${user.username} en terme de message sur le serveur !`)
             .addField('À écrit :', `${cExp} message !`)
             .setColor(`#dc143c`)
             .setFooter(`demande de ${message.author.username}`)
             .setTimestamp()
             message.channel.send(embed)
    }
    })``` hello i'm french, i have a ittle problem with some of my code i would like when i mention a member its shows the xp of the member mentioned and the problem when i mention a member no error and no bot response can anyone help me???
quartz kindle
#

if(message.content === prefix + "stat") {

#

that checks if the message is EXACTLY prefix+"stat"

#

not more not less

#

@wicked pivot

wicked pivot
#

How can I do so that I can make the order with a mentions?

near ether
#

Is there a way for me to see some info on the servers my bot has been added to?

#

I wanna know the names and how many people are in it

earnest phoenix
#

@wicked pivot use msg.content.startsWith(prefix+"stat")

wicked pivot
#

thx

fiery stream
#

Is google.js down??

wicked pivot
#
let user = message.author
        if (message.mentions.members.first()) user = message.mentions.members.first()
///////////
.setTitle(`Les stat de ${user.username} en terme de message sur le serveur !`)
``` ${user.username} undefined " when I mention
fiery stream
#

Is google.js down help

earnest phoenix
#

i dont even know what google.js is

grizzled spruce
#

its when you make a .js file and name it google

quartz kindle
#

@wicked pivot members dont have usernames

#

user = user account. has username
member = guild member. has nickname

#

you can convert a member to a user using member.user

fiery stream
#

Never meant i meant google npm module

#

Is it down

earnest phoenix
#

if it's a package that scrapes google you probably got ipbanned from google themselves

#

use duckduckgo for scraping

fiery stream
#

Duck duck go?

mossy vine
#

Duckduckgo

#

Search engine

#

Like google

fiery stream
#

@earnest phoenix cuz lets us use there api on there webpage

earnest phoenix
#

wot?

#

duckduckgo allows scraping and they have a public api

#

i prefer to scrape duckduckgo since the api is surface light searching, it doesn't return much

fiery stream
#

@earnest phoenix do the have npm module or just post n req

earnest phoenix
#

i don't

#

but generally all you have to do is GET request https://duckduckgo.com/html/?q=<your search term> and parse the response you get

#

the response is a html object

fiery stream
#

U mean i can load html page with html and css rendrer

#

?

earnest phoenix
#

that's not what i said

fiery stream
#

Wdym mean then

earnest phoenix
fiery stream
#

Im not using .net

#

Just js

earnest phoenix
#

i know you aren't

fiery stream
#

Ohhk??..

#

Btw why arnt u dev u know so much abput coding?

#

In server dev***

earnest phoenix
#

they are probably waiting for their bot to get accepted

#

false

fiery stream
#

Its been to long

earnest phoenix
#

or not :)

#

i dont have a bot

#

Jazz when did you add your bot to the queue

#

o

fiery stream
#

Long time

#

I have two bots here

earnest phoenix
#

how long

#

i just like programming, and im taking computer science in my course

#

same!

fiery stream
#

Getting 3rd one is getting ready

earnest phoenix
#

what

fiery stream
#

Lol its gonna take time because its in python i dont know any of it

#

My 3rd bot is getting ready

earnest phoenix
#

ok but like

mossy vine
#

Making many bots != being a good developer

earnest phoenix
#

when did you add that bot

fiery stream
#

Ik python but not that mich

#

Like 2 weeks

earnest phoenix
#

o h

#

generally it only takes a week

fiery stream
#

Thats nice emoji im gonna use it for my bot

#

I already have my bot here

#

@fresh swallow

earnest phoenix
#

my bot isnt here yet

fiery stream
#

Ohh

earnest phoenix
#

im still waiting for it to get approved :D

#

but it is online

fiery stream
#

Nice

earnest phoenix
#

2 days 14 hours

#

we had to update something (we had a directory issue) so we had to shut it down a few days ago

#

oof

fiery stream
#

2hra

#

Hrs

earnest phoenix
#

ok i dont know why my ping is super duper high

#

but

#

thats my bot stats

fiery stream
#

U got heartbeat

idle basalt
#

69mb???

fiery stream
#

Yea ehy

#

Is that alot

earnest phoenix
#

thats actually normal for some bots

slender thistle
#

Can we appreciate the people who learn the programming language before coding Discord bots

tidal laurel
#

only 6 guilds?

idle basalt
#

for a bot in 18 servers, yes

earnest phoenix
#

@slender thistle so not me

fiery stream
#

So bad or good?

tidal laurel
#

bad

idle basalt
#

are you fetching all the members in each guild or something

#

or did you miscalculate

fiery stream
#

Total members

#

Serving

#

A!eval client.users.get("583336869169987586").send(client.users.size + "this many members 🙌🏼")

#

Got it?

#

Oof

idle basalt
#

thats not what i asked

fiery stream
#

Then what

idle basalt
#

also client.users.size will only have cached users which is why you only have 26k despite being in this server with 40k+

fiery stream
#

Cached?

#

Like online?

idle basalt
#

client.guilds.reduce((a, c) => a + c.memberCount, 0)

#

that will tally an accurate member count

fiery stream
#

Oof

idle basalt
#

users are cached because otherwise your bot would use an absolutely ridiculous amount of memory

fiery stream
#

Ohh

idle basalt
#

your bot has access to every user if you want with fetchUser() or fetchMember() but it wont just store all of them (unless you turn that on but its not recommended)

fiery stream
#

Interesting

idle basalt
#

so you can go get a user thats not in your cache with a fetch method, but if theyre already cached then you can just use get() on the users collection

fiery stream
#

I don’t really care bout it

idle basalt
#

im just saying your user count is totally off

fiery stream
#

Its all good

#

Idc

#

Im lazy to fix it

idle basalt
#

¯_(ツ)_/¯

fiery stream
#

If u know dialogflow that might can help me

#

Dialogflow webhook

idle basalt
#

no idea what that is but if they have docs, thats probably all you need

fiery stream
#

They have but hard to understand

#

I cant understand a bit of docs that is written by google