#development

1 messages Β· Page 398 of 1

prisma mist
#
  fs.writeFile("./shards.json", JSON.stringify(shards), (err) => {
    if (err) console.log(err)
  });
  if(message.guild.id === "368458249508487168");
    console.log("Can't send Shard notifications!")
  }else {
   if(!message.guild.id === "368458249508487168"); 
  let shardEmbed = new Discord.RichEmbed()
  .setAuthor(message.author.username)
  .setColor("#0000FF")
  .addField("πŸ’", `${shardAmt} shards added!`);

  message.channel.send(shardEmbed).then(msg => {msg.delete(5000)});
  }```
#

thank you Luke

#

basically im trying to get it to not send the embed

delicate zephyr
#

One secone let me format that correctly so I can actually read it lmao

prisma mist
#

in a certain discord

#

alright xd

sand roost
#
if(!message.guild.id === "368458249508487168"); 
  let shardEmbed = new Discord.RichEmbed()
  .setAuthor(message.author.username)
  .setColor("#0000FF")
  .addField(":ring:", `${shardAmt} shards added!`);```
#

that ! there?

delicate zephyr
#

O

#

Yea#

prisma mist
#

oh

#

oof

#

thank you

#

ill test it

uncut slate
#

why do you have a semi on that if statement

delicate zephyr
#
    if (err) console.log(err)
  });
  if(message.guild.id === "368458249508487168");
    console.log("Can't send Shard notifications!")
  }else {
   if(message.guild.id !== "368458249508487168"); 
  let shardEmbed = new Discord.RichEmbed()
  .setAuthor(message.author.username)
  .setColor("#0000FF")
  .addField("πŸ’", `${shardAmt} shards added!`);

  message.channel.send(shardEmbed).then(msg => {msg.delete(5000)});
  }```
#

should be that

prisma mist
#

ahh thank you

uncut slate
#

No it shouldn't

prisma mist
#

oh

uncut slate
#

you're missing an opening bracket

prisma mist
#

πŸ€”

#

wait i am

sand roost
#

yes he is

delicate zephyr
#

oh

prisma mist
#

OH

#

YES

delicate zephyr
#

lmao

#

rip

prisma mist
#

oof

#

for that else

sand roost
uncut slate
#
  fs.writeFile("./shards.json", JSON.stringify(shards), (err) => {
    if (err) console.log(err)
  });
  if(message.guild.id === "368458249508487168") {
    console.log("Can't send Shard notifications!")
  }else {
  let shardEmbed = new Discord.RichEmbed()
  .setAuthor(message.author.username)
  .setColor("#0000FF")
  .addField("πŸ’", `${shardAmt} shards added!`);
  message.channel.send(shardEmbed).then(msg => {msg.delete(5000)});
  }

prisma mist
#

thank you

uncut slate
#

although that ID isn't ours

sand roost
#

what is that id for?

#

what guild

prisma mist
#

ik

topaz fjord
#

that id is too new

prisma mist
#

its my test

sand roost
#

oh

prisma mist
#

just incase πŸ˜‰

delicate zephyr
#

I wanna know why you're writing your shards to a json file tho...

topaz fjord
#

shhh

#

once the json file corrupts they will probs change @delicate zephyr

delicate zephyr
#

no

#

I mean

prisma mist
#

oh

delicate zephyr
#

You literally dont have to

topaz fjord
#

shards is currency

prisma mist
#

yea

#

its like coins

delicate zephyr
#

Oh...

#

ok

topaz fjord
#

u cuck

delicate zephyr
#

xD

prisma mist
#

just renamed

#

idk how to shard n stuffs

delicate zephyr
#

oof

#

have fun at 1500 servers

topaz fjord
#

*2500

weak parrot
prisma mist
#

Alright it works

#

now

topaz fjord
#

or just shard at 1k like i did

prisma mist
#

let me add this ID

delicate zephyr
#

Eris does it automatically Turtle πŸ˜›

topaz fjord
#

@delicate zephyr same with d.js

prisma mist
#

what is sharding

delicate zephyr
#

ok

prisma mist
#

sounds pretty cool

topaz fjord
#

well you could set the number or shards to auto so it does it for u

inner jewel
#

i wrote sharding at 0 lul

delicate zephyr
#

same Natan

prisma mist
#

oh ill have a look at that now

#

thank you

earnest phoenix
#

Someone

#

Help me

quiet bobcat
#

With?

earnest phoenix
#

My dick is stuck

quiet bobcat
#

ffs

earnest phoenix
#

No

#

I need help

#

Whenever

#

I

#

Try srtting up

#

A rank

#

It says the rank doesnt exist

neat falcon
earnest phoenix
#

Hello

#

How do i see if a user has voted?

#

Discord.js and without the dbl module?

#

Can't see anything here

#

Just talks about punishments etc.

inner jewel
#

GET/bots/{bot.id?}/check?userId=<id>

topaz fjord
earnest phoenix
#

Ah thanks.

#

Thank Nathan and Tortoise

topaz fjord
#

Turtle > : (

earnest phoenix
#

Turtle* also i said not the dbl module mmLol

topaz fjord
#

o sorry

floral stone
#

Tortoise!

wet ferry
#

@spring ember I still don't get how to get it to work

#

it seems like dblapi.js, the one I use on my bot, but how would I get it to work on my website?

inner jewel
#

you need to write a backend running it

#

or do the HTTP requests on clients if th'yre for endpoints that don't require auth

wet ferry
#

ok

#

I have the code, but I get a 401 error

#

here:

#
$(function() {
  console.log('hello world :o')
  
  $.getJSON('https://discordbots.org/api/bots/414568996017537044/votes', function(votes) {
    console.log(votes);

  })

})
gilded blaze
#

u need to set authentication header

#

with discord bots api token

wet ferry
#

Ok thanks!

#

Well, why can I access it from the web then?

trim plinth
#

thats because you're logged in

wet ferry
#

oh!

trim plinth
#

when you are doing requests from code alone you need the auth header

wet ferry
#

how would I log in?

trim plinth
#

you don't

wet ferry
#

ok

trim plinth
#

you add the auth header

wet ferry
#

i see

trim plinth
#

with your api token for your bot

wet ferry
#

what code would i put in, it isn't here:

#

@trim plinth

trim plinth
#

@wet ferry add the header Authorization to your code with your API token

wet ferry
#

ok

#

how do I do that, I am new to JQuery

#

and stuff like that

#

@trim plinth

trim plinth
#

if you are new to jQuery, just use the npm package to save you hassle

wet ferry
#

I mean Ik how that works, but how would I add the Auth header?

inner jewel
#

don't

wet ferry
#

???

inner jewel
#

you'll be putting your DBL token in the website

#

which means it'll be public

#

don't do that

wet ferry
#

oh

#

ok then what do I do?

inner jewel
#

you keep a cache of upvoters in your backend (eg express)

#

and send the relevant data to the front end with a rest api

wet ferry
#

?????????????????????????????????????????????????????/

#

I am new to this

trim plinth
#

maybe you should just use something like snekfetch instead for now instead of jumping into unknown territory

inner jewel
#

wouldn't solve the main issue

wet ferry
#

what is snekfetch?

inner jewel
#

he needs a backend

#

so the token isn't public

wet ferry
#

^

#

well I have a .env file

trim plinth
#

well if you don't know jQuery to the fullest extent, may be better to go with snekfetch

#

depends really

wet ferry
#

@inner jewel can you make a token for full access to the API, but make it not a bot? It would be useful

inner jewel
#

what

wet ferry
#

An open token just for API use

trim plinth
#

why would you need something for other than a bot

wet ferry
#

or make is so you don't need an api

inner jewel
#
  1. no
  2. why would you even want that
#

if there's no api you can't even request the data

wet ferry
#

and how did Solace do it on his website?

inner jewel
#

what website?

wet ferry
#

without the code being public

topaz fjord
#

Did you look at the bottom

inner jewel
wet ferry
#

yes

earnest phoenix
#

he has an api

#

for his bot

#

that he uses there

trim plinth
#

that is from Discord's API most likely, not from DBL

#

wait nvm

inner jewel
#

looks like a template

trim plinth
wet ferry
#

IT IS!

earnest phoenix
#

looks like ejs

inner jewel
trim plinth
#

hmmm

topaz fjord
#

Probs is ejs

#

Like jacz says

wet ferry
#

Ok let me make this clearer. I am running node on my website to keep it up and online, but I have the website in a different folder. How can I use the node files to send data to an HTML file from my node file, or get access to the api by putting my tokens in a private .env file. Ok here is my code host thing:
https://glitch.com/edit/#!/rare-expert?path=public/api.js:9:2

#

You can view it

inner jewel
#

i guess he fetches the revelant data from the bot process and replaces on the template

trim plinth
#

glitch GWfroggerSpongeWait

#

use a VPS

topaz fjord
#

If you want to do that you'll probs need to use ejs

inner jewel
#

google express and ejs

earnest phoenix
#

or vue Kappa

inner jewel
#

you'll need to run backend code

earnest phoenix
wet ferry
#

One thing at a time... How would i add a auth header?

#

can someone just show me how?

#

@inner jewel

inner jewel
#

Β―_(ツ)_/Β―

topaz fjord
#

Did you try Google

earnest phoenix
inner jewel
#

also you definitely don't want to add one there

wet ferry
#

i am new!

inner jewel
#

that code runs on the client

#

which means any auth header you set there is public

topaz fjord
#

And if your new?

wet ferry
#

I mean how would I do it?

tiny lodge
#

auth header for what?

wet ferry
#

like litterally, how would I get the API to show the servercount and points!

tiny lodge
#

points? πŸ€”

#

ohhhh

#

you mean dbl api

#

?

wet ferry
#

^

#

yes

#

LMGI

topaz fjord
#

You know that gif was directed to you right?

wet ferry
#

yes

#

I have a bot for that

topaz fjord
#

Nvm

tiny lodge
#

kinda says how

inner jewel
#
get("/", (_,_) =>
    render(db.run {j=>
        val stats = for(i <- 0 until j.get("shard-count").toInt) yield {
            j.hgetAll(s"stats-shard-$i").asScala.mapValues(_.toLong)
        }
        stats.reduce((map1, map2)=>(map1.keySet ++ map2.keySet).map(i=>(i, map1.getOrElse(i, 0L) + map2.getOrElse(i, 0L))).toMap).asJava
    }, "materialize/index.vm")
)```this is what i have on my backend
#

Β―_(ツ)_/Β―

#

you'll need something similar

gilded blaze
#

What framework would be good for creating a Java website?

trim plinth
#

Java website GWchadThinkeyes

gilded blaze
#

Backend

trim plinth
#

oof

wet ferry
#

😦

#

CAN someone just tell me or give me a guide on this????

#

@inner jewel

#

it would be helpful

inner jewel
#

i don't use js

wet ferry
#

What do you use then?

inner jewel
#

that's as far as i can help you

#

scala

wet ferry
#

😦

earnest phoenix
#

@wet ferry There are plenty tutorials

#

search what you want to know

#

click a tutoiral

tiny lodge
#

@wet ferry what do you need help w/

hushed oyster
#

am I allowed to ask for help with css

topaz fjord
#

sure @hushed oyster

hushed oyster
#

ok

#

so

#

i'm making a box with bulma

#

but if its long enough the content inside the box is going outside of the borders

#

my code is <p class="box center" style="width: 1000px; text-align: center;">content</p>

glossy mason
#

Put the p in a div that has the class box instead of giving the class to the p?

fluid basin
#

Anyone has a standalone dbl vote tracker?

elder rapids
#

Not sure how one could make that

fluid basin
#

Well nvm I guess, I'll just have to spend some time making my own

#

Basically its a bot independent webhook for receiving votes and stores them in a db

#

So it still collects votes when the bot is offline

elder rapids
#

I mean I'm sure one exists (I think someone made that here)

#

But you would then have to bind it to a port and then a domain and such

#

So lots of config setup anyways

hushed oyster
#

@glossy mason still has the same result

glossy mason
#

Any chance you could throw it into a CodePen or something, where I (or someone else) can look at and tinker with it?

hushed oyster
#

it's for a secret project that I don't want anyone to know about yet

glossy mason
#

Ah

#

So, don't do that

hushed oyster
#

i won't

fluid basin
wet ferry
#

@tiny lodge I want to have a website with a vote count and a server count. I was wondering how that is possible with my setup: https://glitch.com/edit/#!/rare-expert?path=public/api.js:9:2

#

wy are people joining?

#

lol

#

oh to help me

night imp
#

@wet ferry I don't know how to do that but I see a typo under fast ping

#

"exept"

wet ferry
#

lol thanks

#

fixed

glossy mason
#
$.getJSON('https://discordbots.org/api/bots/414568996017537044/stats', function(data) {
    console.log(data.server_count);
});
wet ferry
#

that was a test

#

i got an error because I have to log in, but I don't want to put my api token in

#

because it would be public

#

how would I even define an api token and make is secret?

#

and yes, that's what I need help with

topaz fjord
#

make a separate config file

wet ferry
#

wdym?

night imp
#

You can make it in process.env I think

topaz fjord
#

an external file that stores the tokens

#

or use process.env like Saddy said

elder rapids
#

bot/id/stats requires authentication...?

#

when

trim plinth
#

dunno

elder rapids
#

It definitely does not

night imp
#

This is a public glitch repo so probably process.env is better

trim plinth
#

now it does GWnanamiLaceShrug

wet ferry
#

lol api requiers auth

elder rapids
#

no

#

Not all API endpoints

trim plinth
#

@wet ferry wrong!!!!

topaz fjord
#

^

trim plinth
#

not all endpoints require auth!!!!

wet ferry
#

???

elder rapids
#

stats endpoint (where you just get info on a bot) I can't see auth requirement

#

The API docs even list what requires auth

wet ferry
#

Well, what abt votes and servercounts?

elder rapids
#

and that's mostly just the stuff for posting stats or looking at stuff more focused to the bot and the dev

trim plinth
#

wait stats endpoint isn't auth required

wet ferry
#

wy can't I get those

trim plinth
#

lul

glossy mason
#

Server count can be done without auth

wet ferry
#

😦

glossy mason
#

I literally posted doing that earlier

topaz fjord
#

yeah it doesnt require auth

trim plinth
#

Ik it isn't auth required for stats because I have a dbl command that searches any bots stats from the API and it doesn't need auth GWqlabsThinkLol

topaz fjord
glossy mason
#

But as everyone else said, getting vote count does require auth.

topaz fjord
#

HTTP 401 !== HTTP 403

trim plinth
elder rapids
#

wait why would vote count be locked behind an auth gate

topaz fjord
#

idfk

elder rapids
#

It's literally public on the site

#

?????????

trim plinth
#

no auth and it retrieves vote count fine

topaz fjord
#

yeah it isnt

glossy mason
trim plinth
#

Oof

#

he wants stats tho

elder rapids
#

We're not talking about that

trim plinth
#

not just votes

elder rapids
#

That's getting the users who voted

#

Not the total vote count

wet ferry
#

points

topaz fjord
#

https://discordbots.org/api/bots/{botid}

#

if u request that you can find the points there

elder rapids
#

points

#

tf

trim plinth
#

"points" GWqlabsFeelsLULMan

elder rapids
#

why are they points

#

That's confusing as fuck

tiny lodge
#

GET https://discordbots.org/api/bots/{botid}/stats

#

that gives you server count

tiny lodge
#

shard count, etc

elder rapids
#

Probably better to just get /bot/id rather than /bot/id/stats

topaz fjord
#

@tiny lodge that endpoint only give server count and shards

trim plinth
#

api identifiers change over time, probably sometime along the way it was converted to votes but they didn't change the JSON GWpingKanyeLUL

topaz fjord
#

/bot/id give everything about the bot

glossy mason
elder rapids
#

That's a smol points and server count

trim plinth
#

9 votes and 16 servers reee

topaz fjord
#

lmao i have 19 on a 1.6k server bot

elder rapids
#

LOL they still have betadesc in the API

topaz fjord
#

i dont really care about upvotes

glossy mason
#

The most I've ever had is 2, for 570 servers

elder rapids
#

Sadly you have to care about upvotes because they make your bot higher in the list

trim plinth
#

Well if you want cert now, you need upvotes GWsocksAngeryBob

#
  • front page is upvotes
elder rapids
#

yup..........

trim plinth
#

if you want attention, upvote lock mmLol

elder rapids
#

I didn't even meet my cert requirement when they added upvote

topaz fjord
#

@elder rapids upvote rewards soonβ„’

elder rapids
#

But I do now

#

I literally have a vote-beg on my site

#

But it's a small notification they can click away (and it stays away for a week)

trim plinth
#

personally I prefered the old way of cert previously but ehhh it's fine as they were probably getting flooded with cert apps

tiny lodge
#

what are you trying to get?

#

bcos /bots/{botid} gives you points if that's what you wantt

wet ferry
#

yay that works!

#

thanks soooo much!

trim plinth
#

ok have fun with your stats and such

wet ferry
#

lol

#

wy won't this work?

#

$(function() {
  console.log('hello world :o')
  
  $.getJSON('https://discordbots.org/api/bots/414568996017537044', function(data) {
    console.log(data.server_count);
    console.log(data.points);
    data.points.appendTo('strong#votes')
    data.server_count.appendTo('strong#servers')
  })

})
#

I can't .appendTo , but how would I format it so I can?

#

@tiny lodge

#

@topaz fjord

#

@trim plinth

#

@elder rapids

#

☝

#

lol

#

wy does everyone leave

tiny lodge
#

ya with the stuff I do, I pull a big gay and use snekfetch for my http shit

elder rapids
#

Well for one

tiny lodge
#

cus I don't usually make websites

tiny lodge
#

so youll be better off w/ the others

elder rapids
#

that's me

#

That's why I'm not active ;P

tiny lodge
#

ahh vue, I wanna get into that so bad

elder rapids
#

It's really nice

tiny lodge
#

I wanna make a little web dashboard for my bot

#

to view the queue or w/e

elder rapids
#

I'm making a single page app dashboard

#

Mee6 made a SPA website

#

I like SPA so I decided to do my own (plus my site need an upgrade anyways)

trim plinth
#

owo

glossy mason
#

@wet ferry Because appendTo is not a function. You can do:

$("strong#votes").text(data.points);
$("strong#servers").text(data.server_count);
wet ferry
#

thanks sooo much!

glossy mason
#

Pro-tip: Learn some basic jQuery.

#

no problem

elder rapids
#

jQuery lol

#

I stopped using that when I started using Vue

mental solstice
#

any ideas why the server count on discordbots.org isnt showing? is there a minimum limit?

#

it just says N/A

#

ah, negative, i will add it in the morning and see how it goes

#

thank you

elder rapids
#

Server count examples should be deleted that shit is legacy

#

I wouldn't recommend viewing that for info

#

Just look at the API online and use official libs if you can

spring ember
#

In the middle of the night... Thanks

devout minnow
#

L

hidden veldt
#

GUYS

#

I NEED HELP

#

SOMEONE

#

oh crap why am I so frustrated

quiet bobcat
#

What do you need help with?

#

@hidden veldt

hidden veldt
#

ok

#

um

#

I'm using JDK

#

@quiet bobcat

quiet bobcat
#

Do you mean JDA?

hidden veldt
#

and Java 8

#

yeah

#

sorry

quiet bobcat
#

I don't know java, sorry

hidden veldt
#

its fine πŸ˜„

#

I'll figure it out eventually 😦

#

hey does anyone know java 8 or jda?

gilded thunder
#

How can I display the bots uptime with discord.py async?

#

I'm sure there's a argument for it though, like bot.uptime or something.

#

I'll just do trial and error on my bots debug.

#

Β―_(ツ)_/Β―

abstract crystal
#

@gilded thunder there is no such argument. As @lament meteor said. Set a variable at startup and then retrieve it.

gilded thunder
#

arc!stats

abstract crystal
#

not here

gilded thunder
#

welp

abstract crystal
gilded thunder
#

Or...

#

I can't be bothered so it's just like that.

#

Someone else can fix it mmLol

abstract crystal
#

why do you have an uptime function?

gilded thunder
#

That's all I could think.

abstract crystal
#
class MyAwesomeBot(discord.ext.Bot):
    def __init__(self):
        self.startup_date = datetime.datetime.now()
gilded thunder
#

and import datetime, right?

abstract crystal
#

and discord yes

gilded thunder
#

Thanks, at least this will work LUL

abstract crystal
#

(the class and __init__ are not full examples)

fleet mason
#
          message.channel.send("**These people reacted with " + classes[i] +"**\n" + reactions[i].users.map(s => s.username + ' Discord ID: ' + s.id).join('\n'));
          
          await message.channel.send("**These people reacted with other / they are leftovers**\n" + otherR.users.map(o => o.username + 'Discord ID: ' + o.id).join("\n"));
``` how can i make it so that the 2nd message waits for the first one to finish
abstract crystal
#

await the first one

#

await just waits for that function to complete before proceeding

spring ember
#

^

abstract crystal
#

(anyways you must await all message sends)

spring ember
#

Read about coroutines

fleet mason
#
XkijuX Discord ID: 202159988666400769
These people reacted with other / they are leftovers:
These people reacted with priest:
XkijuX Discord ID: 202159988666400769
These people reacted with other / they are leftovers:```
#

didnt work

abstract crystal
#

show what you did

spring ember
#

Show code

abstract crystal
#

also do what @spring ember said

#

(also also PLS use discord.py rewrite, not async since it's feature locked and will be deprecated soon)

gilded thunder
#

welp i'm screwed.

abstract crystal
#

what have you done

gilded thunder
#

using async.

abstract crystal
#

o boi, gl m8

#

oooh so you want a nsfw command, well rip

#

cannot do

fleet mason
#
          Await message.channel.send("**These people reacted with " + classes[i] +"**\n" + reactions[i].users.map(s => s.username + ' Discord ID: ' + s.id).join('\n'));
          
          await message.channel.send("**These people reacted with other / they are leftovers**\n" + otherR.users.map(o => o.username + 'Discord ID: ' + o.id).join("\n"));
abstract crystal
#

Await => await

#

and that's all

fleet mason
#

Yea ik

#

I did await I'm just on mobile atm

abstract crystal
#

this is the way to do it

#

(restart your bot)

gilded thunder
#

I'll just... add it*

fleet mason
#

Hmmm that's strange then

lament meteor
#

pong

spring ember
#

It doesn't take much time to convert to rewrite

fleet mason
#

Ok I can try to do that

spring ember
#

Oof

gilded thunder
#

Well I'll have to.

spring ember
#

or just develop yourself 🀦

frail kestrel
#

how do you utilise rotating statuses? the below code doesn't seem to work for me. [was originally at 10 seconds but put to 1 for testing purposes]

    setTimeout(function() {
        client.user.setActivity(`${statuses[Math.floor(Math.random() * statuses.length)]}`);
    }, 1000);
#

i can assume it's ratelimiting(?)

lament meteor
#

try to put it every 30 seconds or 10 seconds

frail kestrel
#

i tried 10sec

lament meteor
#

maybe ratelimit

spring ember
#

you forgot to set Timeout after the timeout

#

oh wait

frail kestrel
#

??

austere meadow
#

@frail kestrel presence update ratelimits are 5 every 60 seconds

frail kestrel
#

oh

austere meadow
#

if you do it once every 10 seconds you're going to hit the ratelimit

frail kestrel
#

oof

lament meteor
#

so 60/5 is. . . 12

austere meadow
#

@frail kestrel what is statuses? setActivity requires an object to be passed

uncut slate
#

setInterval, not setTimeout @frail kestrel

austere meadow
#

o shit aeth is on top of the game didn't even realize lulblob

frail kestrel
#

o

#

and statuses is an array of strings

austere meadow
#

ok nevermind don't mind me

#

thats setPresence not setActivity

#

00f

uncut slate
#

you might want to make it circular instead btw

#

instead of randomised

#

but that's very subjective

austere meadow
#

thats so confusing tbh why do they have setPresence and setActivity

#

aren't they essentially the same thing

uncut slate
#

setPresence probably lets you pass a full presence

#

not just activity but also status (online/dnd/etc)

austere meadow
#

oh

earnest phoenix
#

setActivity uses setPresence, just fucking use setPresence (β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

trim plinth
#

no u

earnest phoenix
#

Discord why u do this

floral stone
#

In sql, I have the column x in table y. I want to overwrite all fields in column x to equal 500. How would do that?

austere meadow
#

UPDATE table_name SET column = value

#

if you only want to update the values in a column under a specific condition

#

you can add WHERE into there

floral stone
#

ok, thoughtso

wet ferry
#

@earnest phoenix how did you put your website on your bot page?

lament meteor
#

<iframe>

spring ember
#

the iframe is empty help

wet ferry
#

wdym @spring ember

spring ember
#

I did <iframe src="website"></iframe>

#

with the my website as the website

#

and it's blank

wet ferry
spring ember
#

oh it's because I don't have https

lament meteor
#

ya...

spring ember
#

how do I use font awesome via the dbl site?

lament meteor
#

<stylesheet>

#

u meant use it for ur bots thingy?

toxic oracle
#

Bots page yes

restive silo
#

@earnest phoenix hey is it possible to use a map with klasa and mongoose FeelsThinkingMan

earnest phoenix
#

wdym

restive silo
#

would like to use that for my Starboard and modlog

#

instead of arrays

#

since arrays succ for objects

earnest phoenix
#

ask Kyra

restive silo
#

well if you tell me that then i know the answer already OMEGALUL

#

oh i think i found another way

hidden veldt
#

Guys

#

How come @teal pulsarrride in jdk8 isn’t working

#

Someone help

glossy sand
#

...are you capitalizing "Override"?

inner jewel
#

are you actually overriding? same name, arguments and return type?

glossy sand
#

do you actually have the jvm configured properly in your ide?

inner jewel
#

of a method in a superclass/interface implemented

spring ember
#

what characters should I escape in SQL string?

inner jewel
#

you shouldn't build SQL strings manually

spring ember
#

is there any lib for that?

inner jewel
#

use prepared statements

spring ember
#

what do you mean? I want to save a tag for example which is a key and value

inner jewel
#

use a prepared statementΒ²

spring ember
#

oh thanks

hot sleet
#

guys when i use if (args[0] !== "1" || args[0] !== "2") return message.channel.send("Test")

#

it says test when i type 1 or 2 but it shouldn't

#

mention if you want to help

earnest phoenix
#

what lib

languid dragon
#

&&

earnest phoenix
#

py

#

?

shy verge
#

looks like djs

hot sleet
#

@languid dragon && mean it should be 1 and 2 in the same time

#

its JS

solemn obsidian
#

yes, you are checking that it isnt 1 and not 2

earnest phoenix
#

readthedocs

solemn obsidian
#

(if you use &&)

languid dragon
#

if
args[0] does not equal "1"
OR
args[0] does not equal "2"

hot sleet
#

so && mean or

#

??

solemn obsidian
#

and*

earnest phoenix
languid dragon
#

@earnest phoenix you're being ignorant

solemn obsidian
#

this isnt even d.js related

hot sleet
#

wo what mean or guys

earnest phoenix
#

sry

solemn obsidian
#

|| = or
&& = and

languid dragon
#

if you're not going to be any help go back to #general

earnest phoenix
#

k

hot sleet
#

k

#

i use this

#
    if (args[0] !== '1' || args[0] !== '2') return message.channel.send(".lang [1 / 2]\n 1 for english\n2 for arabic");```
#

it returns every time i say .lang 1 or .lang 2

solemn obsidian
#

because one of those statements gets fulfilled always

#

it won't fulfill only if args[0] is 1 and 2

#

which is impossible

#

thats why you need to use && (and)

languid dragon
#
// args[0] = 2

if (args[0] === 1 || args[0] === 2) {
    // do a thing
    1 / 2 will go here
} else {
    // do another thing
    anything else goes here
}

inner jewel
#

nvm

hot sleet
#

hh

#

xD

#

okay A big thanks to @solemn obsidian

#

thanks you helped me

#

and thanks for trying @inner jewel

mental solstice
#

is there a certain way to embed my html page into the display, ive tried all the ways i know of.. iframe etc.. i see others have used it, but mine shows up blank. On my bot's page

topaz fjord
#

Is the link http or https

#

@mental solstice

mental solstice
#

http

elder rapids
#

Won't work

topaz fjord
#

Iframe links need to be ttps

elder rapids
#

HTTPS required

topaz fjord
#

Https

mental solstice
#

oh ok

elder rapids
#

The main site uses HTTPS => iframe requires HTTPS

#

Just a pro-tip

topaz fjord
#

Use something like cloudflare or letsencrypt

mental solstice
#

πŸ‘ ok just threw something together appreciate it

topaz fjord
#

For https

mental solstice
#

great thanks guys

earnest phoenix
#

How do I make a bot.

#

Actually no I got it.

abstract crystal
#

yes

#
  1. learn a programming language
  2. take a look at the docs of your preferred language discord library
sturdy edge
#

Hmmmmm.... I am trying to make a bot with a few similar commands to one I already made, but the commands don't work when I copy-paste them. Why? (I code in Discord.js)

#

And also how do I use emojis in discord.js?

#

Thanks!

shy rose
#

whats actually in weeb.sh cause theres from what ive seen few docs on it around why you should apply and whats actually in it

earnest phoenix
#

Yay, I made a bot, you may use it. It’s name is BobboBot. It’s a bot that can do custom commands, reminders, play music, level ups and more.

shy rose
#

dont advertise....

spring ember
#

^

night imp
#

you made it yourself

shy rose
#

99% of the people in this server have also made a bot...

night imp
#

With all those features in 10 minutes

shy rose
#

thats why where here

night imp
#

Kind of looks like you stole it off of github

#

πŸ€”

topaz fjord
#

its not advertising he just sharing his accomplishments

night imp
#

he stole it off of GitHub

shy rose
#

i believe the term is "forked"

spring ember
shy rose
#

also talking of advertising ive made an images api and wondering where would be a good place to share it around / adverticse

#

is there a server anyone know where to like share and advertise that stuff?

#

also how to ask how do i share "this" and describe what "this" is without slightly advertising is interesting...

spring ember
cunning oxide
#

Can anyone help me out with a command?
I'm trying to get whois.com info then print it to a richembed. I'm using whois from NPM and all it returns is object, object

const Discord = require("discord.js");
const fs = require("fs");
const config = require("../config.json");
const errors = require("../utils/errors.js");
const whois = require('whois');

module.exports.run = async (bot, message, args) => {
//$whois (url)
let url = args[0];

    if (args[0] === "help") {
        return errors.cmdhelp(message, "`$whois (url)`", "Acquires WHOIS information for a given domain.", "Whois");
    }

    let output = whois.lookup('${url}', function (err, data) {
    });

    console.log(output);
    
    let embed = new Discord.RichEmbed()
    .setTitle(`Whois Info for ${url}`)
    .addField(`Returns:`, `${output}`);
    

    message.channel.send(embed);
}

module.exports.help = {
    name: "whois"
}```
https://imgur.com/F96mZjJ
elder rapids
#

That means it's returning an object from the whois.lookup

gilded blaze
#

You have to interpret the data

elder rapids
#

I would see the API for that to get the data you want

cunning oxide
#

@gilded blaze using? I'm pretty new to JS as a whole but im slowly figuring it out

#

not asking for a spoon feed

gilded blaze
#

Console log the object

cunning oxide
#

yeah i did that

gilded blaze
#

All the info is there

cunning oxide
#

mhm

#

it is

gilded blaze
#

You have to manually add fields and get the property of the object

#

Or map

cunning oxide
#

ok ok ok

#

thanks

#

now i understand

#

cheers for the help ❀

gilded blaze
#

πŸ‘

placid flax
#

@austere meadow i noticed you muted my bot @meager ember for responding to commands that it didnt have, i originally wrote that because my logs were getting flooded with command not found crap and i wanted to inform users on how to actually use said bot. Ive recently removed that completely and he will no longer respond to commands he doesnt have, requesting unmute πŸ˜„

elder rapids
#

you could also just JSON.stringify the whois data bloblul

cunning oxide
#

@elder rapids I could, but im only tryna get like specific parts of it

#
  • substr is mad inefficient for that
elder rapids
#

It was a joke ;P

cunning oxide
#

dick πŸ˜›

shy rose
#

@spring ember developmemt as it could allow others t further develop there bots?

earnest phoenix
#

I didn’t steal it. I took me ages. I have actually been working on that for about 7 days.

#

That was my brother too.

#

Sorry about him.

uncut slate
#

ah, the good ole "that was my brother"

cunning oxide
#

how does one fetch the avatar of a new guild member/

topaz fjord
#

in what lib

cunning oxide
#

discord.js

topaz fjord
#

what version?

cunning oxide
#

latest

#
let icon =
    var welcome = new Discord.RichEmbed()
        .addField("Member Joined", `Welcome, ${member}.`)
        .setAuthor(`${member}`)
        .setThumbnail(``)
        //.addField("Total Members",`${guildamount}`)
    var role = member.guild.roles.find('name', 'Member');
    // Send the message to a designated channel on a server:
    const channel = member.guild.channels.find('name', 'server-log');```
topaz fjord
#

so

cunning oxide
#

setThumbnail () should be the avatar of the new member

topaz fjord
#

it would be member.user.avatarURL()

cunning oxide
#

ive tried fucking 8 things and im seemingly doing it wrong

#

dope

#

thank you

topaz fjord
#

because

#

guildMemberAdd returns a guildMember

cunning oxide
#

ye

topaz fjord
#

then you could use .user

#

to get the guildMember as a user

#

and User has the property avatarURL()

uneven sand
#

I want to have my bot message the message author in Discord.py

#

But - my bot iis giving me a "required argument" error

#

help?

hidden veldt
#

I know I asked this a few hours earlier, but I can't figure out the "@Override" function of jdk 8 (i'm trying to make a basic discord bot on intellij). It seems to understand, but it says something like "method does not override method from superclass." I'm using Windows x86 and yes, I looked it up. Switching the java type isnt working...

topaz fjord
#

are you sure

#

im googling that error and im finding lots more than switching java type

gilded thunder
#

@uneven sand Async or rewrite?

uneven sand
#

async

gilded thunder
#

Aha.

#

Lemme get that a sec.

uneven sand
#

you need my source or no?

hidden veldt
#

I know there are way more solutions but I cant do those

#

Cuz for some reason they dont pop up 😦

#

😠

gilded thunder
#

await bot.send_message(ctx.message.author, embed=embed)

#

Replace embed=embed with your text response if that's what you want.

frail harness
#

The error.

gilded thunder
#

Also indent by 4 spaces.

frail harness
#

Give me the error. @uneven sand

uneven sand
#

gimme a moment....

#

discord.ext.commands.errors.MissingRequiredArgument: ctx is a required argument that is missing.

gilded thunder
#

Missing ctx.message.author

frail harness
#

the full error

gilded thunder
#

That's who it sends the message too.

frail harness
#

the entire stack trace pls

uneven sand
#

k

#

Pisi
I'm connected to Discord
Bot ID: dfssf
Connected on 5 Servers:
Ignoring exception in command credits
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\discord\ext\commands\core.py", line 367, in invoke
yield from self.prepare(ctx)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\discord\ext\commands\core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\discord\ext\commands\core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\discord\ext\commands\core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missing.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: ctx is a required argument that is missing.
hey

inner jewel
#

@hidden veldt what's your code?

hidden veldt
#

ok

#

wait

frail harness
#

oh lmao

hidden veldt
#

I'm loading it

#

πŸ˜„

frail harness
#

@uneven sand you aren't providing the command enough parameters

hidden veldt
#

thanks guys for the help

frail harness
#

give me your code

uneven sand
#

k

frail harness
#

and put it in code blocks please

hidden veldt
#

its is loading...

#

HOLD UP

#

πŸ˜„

#

package gradle.wrapper;
import net.dv8tion.jda.core.AccountType;
import net.dv8tion.jda.core.JDABuilder;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

import javax.security.auth.login.LoginException;

public class Main {
public static void main(String[] args) throws LoginException {
JDABuilder builder = new JDABuilder(AccountType.BOT);
String token = "NDM2MDE3MTQ3NzYwODY5Mzg4.DbhZdw.lK1f5PY54UIYP7POPlLg4nrr7XI";
builder.setToken(token);
builder.addEventListener(new Main());
builder.buildAsync();
}
@Override
public void onMessageReceived(MessageReceivedEvent event){
System.out.println("we got a message from " +
event.getAuthor().getName() + ": " +
event.getMessage().getContentDisplay()
);
if(event.getMessage().getContentRaw().equals("e!ping")){
event.getChannel().sendMessage("pong!").queue();
}

}

}

#

there

#

we go

fluid basin
#

*Code blocks Thonk

frail harness
#

^

abstract mango
#

also token leak

frail harness
#

lmao

abstract mango
#

@hidden veldt you might wanna reset your token lol

frail harness
#

uhm

#

lol

hidden veldt
#

yay

#

nah

#

Idc

#

if someone hacks the bot

inner jewel
#

you need to extend ListenerAdapter

abstract mango
#

well have fun getting your bot defined bloblul

sand vale
#

no matter what i do i cant get the dbl library to work

#

console.log("loaded dbl.js");
exports.commands = [
    "check"
];

exports.check = {
    process: function(client, msg) {
        const DBL = require("dblapi.js");
        const dbl = new DBL("xd123");
        if (dbl.hasVoted(msg.author.id)) {
            msg.channel.send("True");
        }

    }
};
client.on('ready', () => {
    setInterval(() => {
        dbl.postStats(client.guilds.size);
    }, 1800000);
});
      
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('xd123', client);
#

"client is not defined"

frail harness
#

lmao

#

you defined client after the ready function

sand vale
#

either way it doesnt work

#

i just dont get an error when its above

topaz fjord
#

@sand vale why are you using the ready event before you even define client

sand vale
#

read what i just said

topaz fjord
#

im not talking about that

sand vale
#

i currently define it before

topaz fjord
#

client.on ready

#

client.on ready isnt in the exports

frail harness
#

code

#

paste it in

sand vale
#

console.log("loaded dbl.js");
exports.commands = [
"check"
];

const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('xd123', client);
exports.check = {
    process: function(client, msg) {
        const DBL = require("dblapi.js");
        const dbl = new DBL("xd123");
        if (dbl.hasVoted(msg.author.id)) {
            msg.channel.send("True");
        }
    }
};
client.on('ready', () => {
dbl.postStats(client.guilds.size);
});
client.on("guildCreate", function(guild) {
dbl.postStats(client.guilds.size);
});
client.on('ready', () => {
    setInterval(() => {
        dbl.postStats(client.guilds.size);
    }, 900000);
});
topaz fjord
#

there

#

that will work

sand vale
#

theoretically

#

im not getting any errors

topaz fjord
#

no theoretically

#

it will work

sand vale
#

but when i check if someone voted no matter the value it returns true

#

and my guild count isnt on the website

topaz fjord
#

um

#

see anything wrong

sand vale
#

ah shit

#

im retarded

#

i forgot to replace it when i recopied the example

#

still doesnt explain why the server count doesnt appear on the site

topaz fjord
#

why are you redefining DBL and dbl in the exports.check

#

if you define it outside then you dont need to define it again

sand vale
#

just trying things out

topaz fjord
#

also

#

why two ready events

#

one is enough

sand vale
#

just trying things out

topaz fjord
#

doesnt sound like a valid excuse

sand vale
#

its not

#

but even with those fixes both check still doesnt work

#

and the site doesnt update

#
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('nut', client);
exports.check = {
    process: function(client, msg,suffix) {
        if (dbl.hasVoted(suffix)) {
            msg.channel.send("True");
        }

    }
};
client.on('ready', () => {
dbl.postStats(client.guilds.size);
});
client.on("guildCreate", function(guild) {
dbl.postStats(client.guilds.size);
});
client.on('ready', () => {
    setInterval(() => {
        dbl.postStats(client.guilds.size);
    }, 900000);
});
#

nvm

topaz fjord
#

so if you pass const dbl = new DBL('nut', client); client into this then it will automatically post the stats to the website every 30 minutes

sand vale
#

im stupid

#

wait no im not

#

yea

#

it should

sand vale
#

alright its been 30 minutes

#

didnt show up on the site

devout minnow
#

N

#

const dbl = new DBL(Β΄nut`, client) ;

sand vale
#

its not actually nut

#

idk if that token is supposed to be private or not

#

so i left it out

earnest phoenix
#

How can I make the action happen when I vote?

bitter sundial
#

hasVoted returns a promise

earnest phoenix
#

@bitter sundial Its a true?

 const Discord = require('discord.js');
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('nut', client);

module.exports.run = async (client, message, args) => {
 exports.check = {
    process: function(client, msg,suffix) {
          if(!dbl.hasVoted(suffix))  return         message.reply("You need a give vote! https://discordbots.org/bot/425005732338073600/vote")
                    if (dbl.hasVoted(suffix)) {
    let mesaj = args.slice(0).join(' ');
    if (mesaj.length < 1) return message.channel.send(new Discord.RichEmbed().setDescription('Please write a skin name. :writing_hand:').setColor('RANDOM'));
    const mesaj2 = new Discord.RichEmbed()
    .setColor('RANDOM')
    .setDescription(`${mesaj}`)
    .setImage(`https://visage.surgeplay.com/full/404/${mesaj}.png`)
   message.channel.send(mesaj2);
        }

    }
};
};

exports.conf = {
  enabled: true,
  guildOnly: false,
  aliases: ['mcskin', 'mcs'],
  permLevel: 0
};

exports.help = {
  name: 'mcskin',
  description: 'İstediğiniz şeyi bota yazdırır.',
  usage: 'yaz [yazdırmak istediğiniz şey]'
};

lament meteor
#

it is ```js

earnest phoenix
#

It's true?

lament meteor
#

suffix is the message

#

and what u want is the user id

earnest phoenix
#

Is it ok now?

bitter sundial
#

Promise is a truthy value so it'll always be true

#

you need to either await it in an async function or resolve the promise

#

with .then

earnest phoenix
#

Oh!

#

Not working! 😦

#

because msg was already defined

#

This is not happening!

#

Can someone fix it and code it?

#

@bitter sundial

prime cliff
#

Did you just ping Tonkku to fix your code zoomeyes

solemn obsidian
#

@prime cliff

prime cliff
#

Hi

tiny turtle
#

Anybody know how to make the body of ifttt look similar to this?

spring ember
#

image + thumbnail + field Game + field Viewers

#

it's rich embed

tiny turtle
#

yup just unfamiliar with json bodies
so all mine look like this
{"content": " {{VideoChannel}}{{VideoPreviewImage}}{{VideoDescription}}{{CreatedAt}} **{{VideoTitle}}** : {{VideoUrl}}"}

earnest phoenix
#

This is not happening!
Can someone fix it and code it?

spring ember
#

Is there a SQL query that resets a database?

#

Table not database

inner jewel
#

drop the table and recreate

spring ember
#

Oh ok

solemn obsidian
#

Or just delete rows where 1=1?

spring ember
#

Lol no

upper ember
#

I want to create web that will list every png file I have on specific folder (/var/www/html/captures/) using php

#

Just need to make the list there

spring ember
#

Oof php wait a sec I need to read the PHP docs

#

scandir(string $dir) this wil return an array

upper ember
#

this is what I made so far

spring ember
#

I didn't understand anything lol I haven't coded php in a long time

upper ember
#

I made it

spring ember
#

Looks good

#

I use express.js so I do it all with the comfort of JavaScript

#

But I think php is a great language

last tapir
#

Hey guys, I’m new coder, can’t figure out how to code a bot to count #

#

Any advice ?

earnest phoenix
last tapir
#

Ok that identifies but how do I count the true?

#

Like I said newbie coder lol

#

Does js have a count method ?

languid dragon
#

count #?

earnest phoenix
#

count+=1 ?

#

just keep a variable with count

floral stone
#

Does that apply in js?

uncut slate
#

Yes

#

+= is JS

floral stone
#

Ah ok

vital gorge
#

Hey

prisma birch
#

Hi

glossy robin
#

hi, anyone got any idea on how to push and pull data to a local database file like sqlite or sqlite3? I cant get the code right for the npm sqlite library, it keeps saying:

TypeError: Cannot read property 'get' of null```
```Unhandled Rejection!:
TypeError: Cannot read property 'run' of null```
mental solstice
#

so using DblApi.GetVotersAsync(1).. shouldnt that return the last 1 day of votes?

#

like 24 hours ago from the time now

dense bone
#

@glossy robin Code?

cunning oxide
#

im trying to set up a command that lets a user redeem a role using a code

#

i've looked into it

#

but keep getting like member not definited etc.

#


const Discord = require("discord.js");
const fs = require("fs");
const errors = require("../utils/errors.js")
const config = require("../config.json");


module.exports.run = async (bot, message, args) => {
//$help (command)
message.delete();
var offcode = ["censored", "sorry", "lads", "xD"];

let code = args[0];

var role = message.author.guild.roles.find('name', 'Offline');
if(args[0] === offcode) {
    message.author.addRole(role);
    return message.channel.reply("Yo, what is up boys.")
}
}

module.exports.help = {
    name: "redeem"
}```
#

can anyone throw me some help with that?

mental solstice
#

does js work like that?

#

offcode is an array

cunning oxide
#

well thats not the error i even got

#

i know i fucked that part

#

but like idk why member isn't saying its defined

#

because even when i define it

#

it dont work

trim plinth
#

does it even have member in there

dense cape
#

@cunning oxide ERROR at line 17. message.channel.reply is not a function. use message.channel.send();

trim plinth
#

@cunning oxide also try message.member for adding roles

dense cape
#

Yeah

#

message.author returns a User

#

Not GuildMember

#

Which is what you need

mental solstice
#

any of u familiar with the GetVotersAsync method?

dense cape
#

Nope im not

mental solstice
#

argh πŸ˜ƒ

dense cape
#

Theres some proof on that message.channel.reply

visual surge
#

^ Yeah, that there should be message.reply

gilded thunder
#

Code

@bot.command(pass_context=True)
async def hackban(ctx, user: discord.Member):
    if ctx.message.author.server_permissions.administrator or ctx.message.author.server_permissions.ban_member:
        embed=discord.Embed(title="User hackbanned.", description="User has been hackbanned.", color=0x176cd5)
        await bot.say(embed=embed)
        await bot.ban(user)
    else:
        embed = discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.", color=0x176cd5)
        await bot.say(embed=embed)```
Error
```Ignoring exception in command hackban:
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 367, in invoke
    yield from self.prepare(ctx)
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 345, in prepare
    yield from self._parse_arguments(ctx)
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 304, in _parse_arguments
    transformed = yield from self.transform(ctx, param)
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 223, in transform
    raise e
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 221, in transform
    return (yield from self.do_conversion(ctx, converter, argument))
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 184, in do_conversion
    return instance.convert()
  File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/converter.py", line 100, in convert
    raise BadArgument('Member "{}" not found'.format(self.argument))
discord.ext.commands.errors.BadArgument: Member "80351110224678912" not found```
low owl
#

Hackban rofl

gilded thunder
#

What about it thonking

#

It's a good command.

low owl
#

Why did you call it hackban? 🀣

gilded thunder
#

When it works, that is.

#

Everyone else calls it hackban.

#

Banning a member who isn't in the server.

low owl
#

Ohh

#

it pretty much tells you the error tho.

gilded thunder
#

Member not found.

#

But it passes an ID to ban.

#

In my case, tested with b1nzy's.

#

If I had it as async def hackban(ctx, member: discord.Member): then it would need a ping.

low owl
#

Mh, I don't think that is how hackban works. Try it with my id.

gilded thunder
#

ID not found.

low owl
#

Are you sure hackban works like that?

gilded thunder
#

Yep.

floral stone
#

do

#

discord.User

#

id might work

gilded thunder
#

Testing now.

#

Member not found.

floral stone
#

It only works on rewrite, I believe.

mental solstice
#

anyone have a c# httprequest GET to get voters in the last 24 hours? πŸ˜„

gilded thunder
#

ofc it's rewrite only

#

welp more of a reason to convert.

#

Thanks.

floral stone
#

It works for rewrite on my end.

gilded thunder
#

I'm aware of it.

floral stone
#

ah ok

gilded thunder
#

I have it downloaded.

#

Just gives me an error saying it's not found.

floral stone
#

how di u

gilded thunder
#

pip install async2rewrite

floral stone
#

do pip3

gilded thunder
#

aha

#

thanks

floral stone
#

python -m pip install -U async2rewrite

#

that

gilded thunder
#

Converted.

#

Now for everything I wanted to add but couldn't.

#

Thank you.

floral stone
#

Good luck. DM if you need help.

hot sleet
#

@gilded thunder if u want to ban all peoples that not currently in the server use an event

#

i don't what language u use but make an event that when someone join he got ban

#

unless he was in the whitelist

hybrid jackal
#

probably already previously mentioned: add a built in function to quote previous posts in a channel on any server your in.., does anyone have something of that sort written already?

#

ature of discord.py i've seen ppl quote others, is that bot related, or a built -in cmd feature i overlooked?

#

welp, half my msg went to sh~

#

how can u easily quote others in discord?*

#

w/o a bot

#

outside of high-lighting the words and ctrl+ copy and ctrl+ paste

#

a direct quote from a user

#

any help?

ashen quail
#

I need help, so here is my code for report.js=

const Discord = require("discord.js");

module.exports.run = async (bot, message, args) => {
console.log("works");
};

module.exports.help = {
  name: "report"
};

and it gives me this error

SyntaxError: Unexpected token (
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at jsfile.forEach (/Users/samirtata/Desktop/Strike/app.js:20:15)
at Array.forEach (native)

earnest phoenix
#

Update node

ashen quail
#

and how do i do that?

glossy sand
#

your node version doesn't support async/await

ashen quail
#

so what command do i need to write to update node?

#

nvm

earnest phoenix
#

what OS?

glossy sand
#

uh you can either download the newest version from the node website or you can use the n tool

earnest phoenix
#

if you're on windows go to nodejs.org and install current

#

if you're on linux use google its ur friend

ashen quail
#

ok so I downloaded the pkg from website, do i just drag it into my bot folder?

earnest phoenix
#

no

glossy sand
#

uh no

earnest phoenix
#

you need to install it.

glossy sand
#

node is a runtime

earnest phoenix
#

~~Phanta you have to speak english to the kid LUL ~~

ashen quail
#

ok I am installing it

#

nice i downloaded it and I did rs and it does not do anything

#

yeeeee

#

Why does it do that

#

Ok yes

earnest phoenix
#

What are the requirements for a bot to be listed under the "music bots" section? Because my bot ( @azure ermine ) can play music but is not there.

I know it's stupid to ask coz it would be at the very end with the low vote count but I want to be prepared for when it potentially becomes more popular

Edit: If it was adding the music tag then I've done that since posting this question

solemn obsidian
#

Music tag will automatically add it there, the position there depends on amount of upvotes

tiny turtle
#

using java scrip how do I add that awesome log for user updated their pic side by side?

#

that is sweet ^^

#

Some of your guys bots just amaze me, thats talent and hard work in action!

solemn obsidian
#

Canvas, 2x width of normal profile pic width, 2nd pic offseted by the width of pic

tiny turtle
#

ty ill look it up ^^

#

trying to make logs for my bot and here gives me so many ideas implementing them as a new coder that's the hard part

gusty topaz
#

you get logs that user edited while they havent

#

because on discords end embedding an image

tiny turtle
#

yea

gusty topaz
#

is editing the message

#

so if I post a link

#

it gets edited when this image appears

tiny turtle
#

ok that explains so much

gusty topaz
#

you can check if the content doesnt change then ignore

tiny turtle
#

ty, so much studding to do wish I was young and doing this, seems like at 42 my brain takes longer to absorb new info

gusty topaz
#

you are welcome

tiny turtle
#

@solemn obsidian how do you store the image that was removed?