#development

1 messages · Page 476 of 1

lusty dew
#

Well

#

On my friends Linux

#

It sasy

#

6.16.4

knotty steeple
#

update

topaz fjord
#

upgrade to node 7 and up

#

async is in node 7 and up

lusty dew
#

Ok

#

Well

#

I just made 5$

#

:3

#

On a Verification bot lel

wide ruin
#

how do you set the first 8 letters after a command?

#

and as a separate var, the characters after the command and 8 more letters

earnest phoenix
#

uh

earnest phoenix
#

wut

earnest phoenix
#

can anyone tell me how can i make a rectangle using pillow library for a progression bar

tulip snow
#

Anyone have an example for canvas-constuctor? [Tag Me]

earnest phoenix
#

no

#

but you could always use the example canvas constructor gives you

tulip snow
#

I dont know how to send the thing

wide ruin
#
const Discord = require("discord.js");
const { RichEmbed } = require('discord.js')
module.exports.run = async (bot, message, args) => {
    let helpEmbed = new Discord.RichEmbed()
    .setTitle("Basic Commands")
    .setColor(0x00ff00)
    .setDescription("These are the basic commands for all users!", true)
    .addField("8ball", "o/8ball {Question}", true)
    .addField("Joke", "o/joke | Displays a joke for you", true)
    .addField("Ping", "o/ping | Displays the ping time of the bot api", true)
    .addField("Is", "o/is {@[name] adjective}", true)
    .addField("Should", "o/should {@[name] verb}", true)
    .addFieldield("", "", true)
    .addField("Bot invite:", "https://discordapp.com/oauth2/authorize?client_id=476609928023244801&scope=bot&permissions=8", true);
    
    let helpEmbedsub1 = new Discord.RichEmbed()
    .setTitle(" ")
    .setColor(0x00ff00)
    .addfield("Purge", "o/purge {amount} | deletes {amount} messages", true);
    
    
    let helpEmbedend = new Discord.RichEmbed()
    .setTitle(" ")
    .setColor(0x00ff00)
    .setFooter("Created by: Pineapplefan1234 & 👌😂👌");
    
  
    message.delete()
    message.author.send(helpEmbed)
    if(message.member.hasPermission("MANAGE_MESSAGES"))
      message.author.send(helpEmbedsub1)
  
    message.author.send(helpEmbedend)
    message.channel.send("Sent to your dms! :mailbox:").then(msg => msg.delete(5000)
    )

}

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

this doesnt do anything

#

no error

#

no message

#

discord.js

#

please help

gilded blaze
#

addFieldield is not a method of RichEmbed

wide ruin
#

oh

#

i am blind

#

thank

craggy fox
wide ruin
#

also @gilded blaze it still doesnt work

gilded blaze
#

Is it actually running?

wide ruin
#

yes

#

other commands work

topaz fjord
wide ruin
#

thanks

#

but it still wont work

topaz fjord
#

what part

#

of it

wide ruin
#

the whole thing

topaz fjord
#

so descriptive

west raptor
#

check if the command is actually running

wide ruin
#

the bot does nothing

#

other commands work

topaz fjord
#

.setDescription() only take 1 field

#

it only takes in a string

gilded blaze
#

Log to the console at the start of the command just to make sure it is actually running that command.

topaz fjord
#

so you cant do .setDescription(string, true)

west raptor
#

also .addField('here', 'here') cant be empty

#

for that just add a blank field

topaz fjord
west raptor
#

^

topaz fjord
tulip snow
#

Why do u have ```js
const { RichEmbed } = require('discord.js')

topaz fjord
#

destructing

#
const Discord = require("discord.js");
const { RichEmbed } = require('discord.js')

const embed = new RichEmbed();

const embed = new Discord.RichEmbed()
#

these 2 equal the same thing

tulip snow
#

so if u send that its gonna send 2 embeds?

topaz fjord
#

no

west raptor
#

no

topaz fjord
#

its just a shortcut

tulip snow
#

Ohhh

wide ruin
#
const Discord = require("discord.js");
const { RichEmbed } = require('discord.js')
module.exports.run = async (bot, message, args) => {
    let helpEmbed = new Discord.RichEmbed()
    .setTitle("Basic Commands")
    .setColor(0x00ff00)
    .setDescription("These are the basic commands for all users!", true)
    .addField("8ball", "o/8ball {Question}", true)
    .addField("Joke", "o/joke | Displays a joke for you", true)
    .addField("Ping", "o/ping | Displays the ping time of the bot api", true)
    .addField("Is", "o/is {@[name] adjective}", true)
    .addField("Should", "o/should {@[name] verb}", true)
    .addField("Bot invite:", "https://discordapp.com/oauth2/authorize?client_id=476609928023244801&scope=bot&permissions=8", true);
    
    let helpEmbedsub1 = new RichEmbed()
    .setTitle(" ")
    .setColor(0x00ff00)
    .addField("Purge", "o/purge {amount} | deletes {amount} messages", true);
    
    
    let helpEmbedend = new RichEmbed()
    .setTitle(" ")
    .setColor(0x00ff00)
    .setFooter("Created by: Pineapplefan1234 & 👌😂👌");
    
  
    message.delete()
    message.author.send(helpEmbed)
    if(message.member.hasPermission("MANAGE_MESSAGES"))
      message.author.send(helpEmbedsub1)
  
    message.author.send(helpEmbedend)
    message.channel.send("Sent to your dms! :mailbox:").then(msg => msg.delete(5000)
    )

}

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

now it is this

west raptor
#

try it

wide ruin
#

it worked

#

thanks guys

west raptor
#

np

tulip snow
#

So

#

How do u create a buffer on canvas-constuctor?

earnest phoenix
#

.toBuffer()

tulip snow
#

like how do u send it tho because I tryed let buffer = Canvas.toBuffer() and it said that isnt a thing

topaz fjord
#
const { Canvas } = require('canvas-constructor');
 
new Canvas(300, 300)
    .setColor('#AEFD54')
    .addRect(5, 5, 290, 290)
    .setColor('#FFAE23')
    .setTextFont('28px Impact')
    .addText('Hello World!', 130, 150)
    .toBuffer();
#

from the docs

earnest phoenix
#

^

tulip snow
#

I have that

#

But

#

How do u send it

topaz fjord
#

what lib are u using

tulip snow
#

D.Js

topaz fjord
#

afaik you would have to save it then send it

gilded blaze
#

message.channel.send({ files: [{attachment: canvas.toBuffer()}] }) should work

earnest phoenix
#
const { Canvas } = require('canvas-constructor');
 
let foobar = new Canvas(300, 300)
    .setColor('#AEFD54')
    .addRect(5, 5, 290, 290)
    .setColor('#FFAE23')
    .setTextFont('28px Impact')
    .addText('Hello World!', 130, 150)
    

message.channel.send({ files: [ foobar.toBuffer() ]})
#

oh wait

#

im too late

#

sad face

#

wait

tulip snow
#

lol I just did that

earnest phoenix
#

i put it wrong

tulip snow
#
    const { Canvas } = require('canvas-constructor');
 
    let canvas = new Canvas(300, 300)
    .setColor('#AEFD54')
    .addRect(5, 5, 290, 290)
    .setColor('#FFAE23')
    .setTextFont('28px Impact')
    .addText('Hello World!', 130, 150);


    let buffer = canvas.toBuffer();
    message.channel.send({files: [buffer]});
#

Is that right>

gilded blaze
#

Try it

west raptor
#

^

tulip snow
#

oh kewl it worked

prisma sedge
#

Huh

#

Since when should a urban command only be used in nsfw channels??

west raptor
#

some searches can be NSFW

#

thats why

prisma sedge
#

Hm

#

Mee6 also doesn’t

#

Many bots don’t

#

That’s why I was wondering

earnest phoenix
#

except mee6 is a meme bot

steel drum
#

you could probably do something where you check to see if the definition mentions the word "NSFW" in the beginning

#

and redact it if the channel is not a NSFW channel

#

and mention something like definitons of words not safe for work are only visible in the #nsfw channel

#

or something similar

lusty dew
#

Or

#

just check if the channel is NSFW marked?

#

and if it is not the command won't work

west raptor
#

thats what i do

lusty dew
#

Yea

#

I use a method

#

that they say shouldn't work

#

but for some reason it does

#

¯_(ツ)_/¯

west raptor
#
if (!msg.channel.nsfw) return msg.channel.send('You can only use this in NSFW channels')```
#

thats what i do

quartz kindle
#

or dont have any nsfw features, like me

#

xD

west raptor
#

i dont do like porn and hentai and shit

#

i just do like

#

reddit subs and shit

quartz kindle
#

/r/leagueoflegends

lusty dew
#

Yea that is what I also do @west raptor People told me that shouldn't work :/

#

I don't see how

#

but EH

west raptor
#

it does tho, who told you that?

lusty dew
#

Can't remember their Users

#

but it was in this server

#

I asked about it like a month or two ago

#

Someone said that shouldn't work

#

Oh well

#

dont really care

#

it works

#

so

#

XD

quartz kindle
#

it wouldnt work if it were some old version lib

#

like older discord.py versions dont have a check for nsfw

lusty dew
#

Ok

#

I use JS

#

But I understand what you mean

#

;p

#

Nvm

#

Not gonna ask that

craggy fox
topaz fjord
#

whats the problem

craggy fox
#

should show up like this

quartz kindle
#

thats not how it works

craggy fox
#

then?

quartz kindle
#

the html description does not replace the entire page

craggy fox
#

so what should i do to fix?

quartz kindle
#

your html is inserted inside the description field of the page

craggy fox
#

didnt get it

quartz kindle
#

everything you put in the html description will only show inside the description field

craggy fox
#

so how can i fix?

west raptor
#

u cant

craggy fox
#

oh

quartz kindle
#

everything you write in your bot description is inserted inside that box

craggy fox
#

css doesnt work in there?

quartz kindle
#

it does

west raptor
#
<style>
</style>```
#

iirc

quartz kindle
#

but css works together with html, and the discordbots page has its own html

craggy fox
#

i did

quartz kindle
#

so your css has to be coded specifically for the discordbots page

craggy fox
#

oh

quartz kindle
#

you have to analyze the structure of discordbots and code css specific for it

craggy fox
#

so there is a syntax or other stuff for discordbots

quartz kindle
#

use the dev tools / element inspector / page source

#

to see how the discordbots page works

craggy fox
#

aha

quartz kindle
#

and then you can use css on the discordbots page

craggy fox
#

so i can do the same thing?

#

cool ill try again 😃

quartz kindle
#

you cant remove everything, but you can hide it with css

#

but iirc you're not allowed to hide certain buttons

craggy fox
#

im using bootstrap

quartz kindle
#

if you hide the vote/invite/website/report/support server/etc with css

#

they will delete your bot if they find out

craggy fox
#

why would i lol

west raptor
#

so people cant report your bot

#

lol

craggy fox
#

oh lmao

#

didnt know that was posible

west raptor
#

ye

quartz kindle
#

also idk if you're allowed to remove the nav bar / footer

#

i assume not

craggy fox
#

i dont wanna remove anything

#

i just want that thing to work in that box

quartz kindle
#

alright, then just adapt your css to account for the discordbots structure

craggy fox
#

yeah

#

gonna work on that

quartz kindle
#

honestly the best css thing you can do is this

#

lmao

uneven rover
#

Lol

craggy fox
#

xD

shy verge
#

is there a list somewhere that contains every CSSable element on the bot page

#

too lazy to dig through source xd

quartz kindle
#

CSSable element = literally everything in the page

#

so basically, the source code is the list you're looking for

shy verge
#

:dab:

#

i hate webdev this is so sad alexa play despacito

short forge
quartz kindle
#

Lol

pastel gazelle
craggy fox
#

@quartz kindle can u help

#

cant seem to figure out

upper ember
#

how do I get member count with jda?

shy verge
#

im assuming the jda client doesn't have a members collection

#

ok so this is a little sketch but you can loop through your guilds and += the members in each guild

proven surge
#

Question: In discord by when you use

#

total_users = len(server.members)

#

it gives you the total amount of members in the server

#

So is there a way to make it say the total amount of Humans in the server?

#

i already tried

#

total_humans = len(server.humans)

#

but it gave me this error

#

AttributeError: 'Server' object has no attribute 'humans'

earnest phoenix
#

by that logic server.americans will tell you the number of american members?

#

no. the error is clear. 'Server' object has no attribute 'humans'

proven surge
#

rip then its not possible, i guess

earnest phoenix
#

you need to count how many members are not a bot

#

im assuming members have a "bot" attribute in python

topaz fjord
#

you can filter through all the members and not count any that are bots

proven surge
shy verge
#

create an int
for each member in a guild, if they're not a bot increment that int
return that int

#

ez

topaz fjord
#

in js its message.guild.members.filter(m => !m.user.bot)

neat tinsel
#

How do I link my bot's website to the discordbot list how others do it?

craggy fox
#

yo bourne

#

can u help in html stuff?

#

or anyone else?

proven surge
#

i know nothing about html rip

craggy fox
#

@bitter sundial can u help with html?
cant seem to get the stuff working correctly

bright spear
#

@craggy fox SMH don't mention admins

proven surge
#

i know

bright spear
#

This channel is for bot development

quartz kindle
#

html is easy lul

topaz fjord
#

^

neat tinsel
#

So is C# when you learn it

#

Just like other languages

quartz kindle
#

but html isnt really a "language"

craggy fox
#

ok

#

but can someone help

topaz fjord
#

html is a language

#

a markup language

quartz kindle
#

its complexity and power is orders of magnitude smaller than any other programming language

craggy fox
quartz kindle
#

what cant you figure out abonix?

craggy fox
#

why that gradient isnt inside the box and the images arent aligned properly

quartz kindle
#

show the css

craggy fox
#
<style>

    .cat {
        text-align: left;
        
    }

    body {
        height: 1080px;
    }


    .content {
        color: white;
        background-image: linear-gradient(to bottom right, black,red);
        font-size: 70px;
        text-align: center;
    }

    .content img {
        float: left;
        width: 50px;
        height: 50px;
    }

    .content ul{
        overflow: hidden;
    }


</style>
quartz kindle
#

body is the body element of the page

craggy fox
#

oh wait old one

proven surge
#

rip

quartz kindle
#

remember what i told you before? you need to code css specific for the discordbots website

craggy fox
#

can u help?

quartz kindle
#

meaning you have to adapt to its structure

topaz fjord
#

just inspect element to find the query selectors

quartz kindle
#

discordbots already has a body, and a lot of other elements

craggy fox
#

yeah i know, i tried but didnt work out

quartz kindle
#

you need to target the specific element that contains the description

topaz fjord
#

it worked for me

#

so

#

¯_(ツ)_/¯

craggy fox
#

so like

#

<div class="thisisntworking">
shit here
</div>

quartz kindle
#

for example

#

right click the description box > inspect element

#

you get this

craggy fox
#

yes

quartz kindle
#

see? the content you want to affect is all the way down inside the div class content

#

so you have to create a css to target that specific element, all the way down

#

the more specific the better

#

if you just use body, it will go to discordbots body

#

as a general rule, always start with the nearest ID, which in discordbots's case is id="details"

topaz fjord
#

Tim can i ask u smth

quartz kindle
#

so your css should be #details .container .longdescription .content

craggy fox
#
<head><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"></head>
<body>
<div class ="content">
<h1>Abonix Bot</h1>
<h5>
<p>

    Abonix Bot is a multi purpose discord bot that gets updated constantly, the bot also has music and many many new features get added every week<br />
    Abonix Bot is specialised in friendly staff and constant updates.
    
</p>
</h5>
<a class="btn btn-outline-light btn-lg" href="https://invite.abonixbot.ga" target="_blank" role="button">INVITE BOT TO YOUR SERVER</a>


        <ul style="list-style-type: none">
        <li class="cat"><strong>Commands Categories</strong></li>
        <li class="cat"><img src="o" alt="logo" />Moderation</li>
        <li class="cat"><img src="httl" alt="logo" />Utilities</li>
        <li class="cat"><img src="httlpng" alt="logo" />Music</Li>
        <li class="cat"><img src="httlpng" alt="logo" />Fun</li>
        <li class="cat"><img src="httplng" alt="logo" />Privacy</li>
        <li class="cat"><img src="httpllg" alt="logo" />Game Stats</li>
        </ul>


</div>

<style>

    .cat {
        text-align: left;
        
    }



    .content {
        color: white;
        background-image: linear-gradient(to bottom right, black,red);
        font-size: 70px;
        text-align: center;
    }

    .content img {
        float: left;
        width: 50px;
        height: 50px;
    }

</style>
</body>
quartz kindle
#

jesus

craggy fox
#

so what is the problem here?

#

i remove body

topaz fjord
#

you dont need the body tag

quartz kindle
#

you cant use <head>

topaz fjord
#

afaik

quartz kindle
#

nor <body>

craggy fox
#

head just to link stylesheet

quartz kindle
#

head and body only exists once per page

#

you are working inside an existing page

#

not creating a page

#

you're working inside something that already has a head and a body

craggy fox
#

removed that

quartz kindle
#

what you're working on, is an element called class=content

craggy fox
#

yes

quartz kindle
#

all your html code is inserted inside the class content

#

so all your css should be based on that element

topaz fjord
#
.btn-like.btn.is-flex img {
    content:url("https://media.turtle-bot.com/f/MMZ72.png");
       width: 11px;
        height: 7px;
}

how come dbots gets the resoponse of 403 while other people can access it fine?

craggy fox
#

so all css should be

#

.content {
csshere
}

quartz kindle
#

not only .content

#

the more specific, the better

#

starting with the nearest id

wide ruin
#

In discord.js, how do you dm (bUser) (message)?

quartz kindle
#

so as i said before

#

#details .container .longdescription .content

#

{
}

topaz fjord
#

~~ you should take some html and css courses ~~

craggy fox
#

so like
.content h1{
shit here
}

.content h5{
shit here
}
etc?

#

@topaz fjord i did but didnt learn how to write over an existing page

quartz kindle
#

@topaz fjord idk, maybe that url has cross origin disabled

wide ruin
#

@quartz kindle In discord.js, how do you dm (bUser) (message)?
bUser is the first ping in the command, and message is the part after

topaz fjord
#

its my image server so idk

craggy fox
#

am i right @quartz kindle

#

is it correct what i did?

quartz kindle
#

yes, but

#

as i said

#

you should navigate the page

#

because .content is inside many other elements

topaz fjord
#

@wide ruin

  • get the user mention from the message
  • get the message content after the mention
  • fetch the user
  • send the message to the user
craggy fox
#

gotcha

quartz kindle
#

if your page was <body><div class="content"><h2>

wide ruin
#

@topaz fjord how do I do the last 2

quartz kindle
#

that css would be perfect

#

but the page is not only that

craggy fox
#

so i should also use
#content

quartz kindle
#

so you should navigate the entire existing structure

craggy fox
#

#content {
css here
}

quartz kindle
#

no...

craggy fox
#

rip me

wide ruin
#

@topaz fjord

#

?

craggy fox
#

can u give an example with my situation plez

quartz kindle
#
#details .container .longdescription .content h2 {
    css here
}```
topaz fjord
#

message.guild.members.get('id')

#

you can get id from the user mention

wide ruin
#

I think I have that code

topaz fjord
#

and then when you fetch the user send the message

wide ruin
#

Just wait a minute

craggy fox
#

why all these .container .longdescription etc?

quartz kindle
#

because thats the existing structure of the page

craggy fox
#

is it because its inside the existing html code?

topaz fjord
#

next time before you ask you should check out https://discord.js.org/#/

craggy fox
#

aha starting to make sense now

quartz kindle
#

if you do only .content {}

#

ALL elements containing the class content will be affected

#

on the ENTIRE page

craggy fox
#

yeah

quartz kindle
#

so you want to be specific, and target ONLY what you want

craggy fox
#

gotcha

#

is just like json xD

quartz kindle
#

yeah kinda

#

sometimes you can skip some steps

vernal rivet
#

?

craggy fox
#

makin sense now

wide ruin
#

@topaz fjord I added that code, now how do I DM reason?

quartz kindle
#

for example you could do #details .content and ignore the longdescription, etc.. but only if you know that there is no other element with the same class in that scope that you dont want to accidentally traget

topaz fjord
#

you literally get the content after the message mention and send it to them

wide ruin
#

How do you send it to them

#

That's what I need now

topaz fjord
#

you fetch the user and use .send()

wide ruin
#

So mentionID.send(reason)

quartz kindle
#

btw @topaz fjord if you wanna use that image in dbl, you can base64 encode it xd

topaz fjord
#

i could

wide ruin
#

Was I right?

#

@topaz fjord

craggy fox
#

gotcha

vernal rivet
#

What are you trying to do @wide ruin ?

wide ruin
#

DM a user

quartz kindle
#

the user who used the command, or a user you mention in the command?

wide ruin
#

The user you mention

#

It has 2 vars, bUser and Message

quartz kindle
#

what does bUser contain?

vernal rivet
#

Oh you doing the DM ban thing

wide ruin
#

No

#

Warn

#

bUser is the user you pinged

quartz kindle
#

in what format?

wide ruin
#

Lemme get the code

quartz kindle
#

the user object? the user id? the mention string?

wide ruin
#
const { RichEmbed } = require('discord.js')

module.exports.run = (client, message, args) => {
let perms = new RichEmbed()
        .setTitle("Error")
        .setDescription("You do not have permissions to do that, you need **ban members**")
        .setColor(0xff0000)
        .setThumbnail("create-custom-emojis-for-discord-and-twitch.jpe");

  
   const nobody = new RichEmbed()
          .setTitle('please give the name of the user you would like to ban')
          .setThumbnail("create-custom-emojis-for-discord-and-twitch.jpg")
          if(!message.member.hasPermission("BAN_MEMBERS")) return message.channel.send(perms)
          
          let bUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
          if(!bUser) return message.channel.send("uhh, i can't find that user sorry");
  
          let kReason = args.join(" ").slice(22)
          const mentionID = bUser.id; 
          message.guild.members.get(mentionID)
          }```
#

@quartz kindle

vernal rivet
#

Your format is so weird

quartz kindle
#

i smell copy pasted

earnest phoenix
#

oh hey

vernal rivet
#

That probably because it is

quartz kindle
#

anyhow, bUser seems to be the user object already, so just do bUser.send("message")

craggy fox
#

can i use #container is-widescreen then other things here?
@quartz kindle

quartz kindle
#

oh wait its not a user object, its a member object

#

can you dm a member object?

#

wait..

topaz fjord
#

yes

quartz kindle
#

ah alright then, then yeah, it should be bUser.send()

#

yeah @craggy fox

#

but container is a class, not an id

wide ruin
#

So bUser.send(reason)

quartz kindle
#

classes are dots

#

and multiple classes in the same level are with no spaces

topaz fjord
#

also

vernal rivet
#

bUser.send(kReason);

craggy fox
#

and id is #

topaz fjord
#

the best way to get the reason

#

is

#

message.content.split(' ').slice(2).join(' ') @wide ruin

vernal rivet
#

Since you define reason as kReason

quartz kindle
#

so .container.is-widescreen = must have both classes

lusty dew
#

I need da help, I get an error that says commandfile.run is not a function and I tried doing what the people told me yesterday but it didn't work

craggy fox
#

aha

earnest phoenix
#

ok

craggy fox
#

so i need #details then other things after it

vernal rivet
#

Ok let's look at it @lusty dew

quartz kindle
#

and .container .is-widescreen = is-widescreen must be inside container

lusty dew
#

Okie

quartz kindle
#

notice the space

craggy fox
#

gotcha

lusty dew
#
bot.on("message", async message => {//What are we going to do now?//All that is left for the unfinished commands are Nitro, I have to do the pages
    if(message.author.bot) return;
    if(message.content.startsWith(`@brisk fern `)){
        var command = message.content.slice(`@brisk fern `.length).toLowerCase();
        var cmd = command.split(" ")[0];
        var args = command.replace(cmd+" ", "");
        var commandfile = commands.get(cmd);//my way of checking the command
        console.log(commandfile)
        if(commandfile) commandfile.run(bot, message, args).catch((e)=>console.error(e));
    }
});
vernal rivet
#

So what does your error exactly look like?

lusty dew
#

That is how my thing is coded

#

Let me get it again >~<

vernal rivet
#

Ok

topaz fjord
#

what does console.log(commandfile) result in

quartz kindle
#

what does the console log give you?

topaz fjord
#

if it results in undefined, there's your problem

lusty dew
#
{ names: [ 'feet', 'f' ] }
(node:5440) UnhandledPromiseRejectionWarning: TypeError: commandfile.run is not
a function
    at Client.bot.on (C:\Users\User\Desktop\LoverBot v3\index.js:42:31)
    at Client.emit (events.js:182:13)
    at MessageCreateHandler.handle (C:\Users\User\Desktop\LoverBot v3\node_modul
es\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\User\Desktop\LoverBot v3\node_modu
les\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\User\Desktop\LoverBot v3\node_mod
ules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\User\Desktop\LoverBot v3\node_modules\ws\li
b\event-target.js:120:16)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (C:\Users\User\Desktop\LoverBot v3\node_modu
les\ws\lib\websocket.js:137:47)
    at Receiver.dataMessage (C:\Users\User\Desktop\LoverBot v3\node_modules\ws\l
ib\receiver.js:409:14)
(node:5440) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
 id: 1)
(node:5440) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
 Node.js process with a non-zero exit code.
#

hastebin

#

not working

topaz fjord
#

thats why

quartz kindle
#

this is your console.log: { names: [ 'feet', 'f' ] }

vernal rivet
#

Idk if this is the probably but would it be because you use var on the commadfile, instead of let

lusty dew
#

Yes

topaz fjord
#

commandfile has no attribute run in that console.log

vernal rivet
#

OwO

lusty dew
#

Wdym

#

Doesn't

#

module.exports.run

#

do it?

topaz fjord
#

show your code

vernal rivet
#

Hastebin?

lusty dew
#

Hastebin not working

#

for me

topaz fjord
#

pastebin?

vernal rivet
#

Really?

lusty dew
#

Yep

#

Idk why

#

Hastebin has been trash lately

craggy fox
#
  #details .container is-widescreen .longdescription .content  {
        color: white;
        background-image: linear-gradient(to bottom right, black,red);
        font-size: 70px;
        text-align: center;
    }```
lusty dew
#

sometimes I would go onto it try use it of it dont work I would try again in 5m or so

topaz fjord
#

@lusty dew send code in pastebin

quartz kindle
#

#details .container.is-widescreen

craggy fox
#
    #details .is-widescreen .longdescription .content  {
        color: white;
        background-image: linear-gradient(to bottom right, black,red);
        font-size: 70px;
        text-align: center;
    }
vernal rivet
#

module.exports.help

quartz kindle
#

@craggy fox when you see class="container is-widescreen" that means the element has 2 classes, container and is-widescreen, not one class with a space in the name

vernal rivet
#

You forgot .help

lusty dew
#

huh?

topaz fjord
#

@lusty dew change

module.exports = {
    names: ["feet","f"]
}

to

module.exports.help = {
    names: ["feet","f"]
}
lusty dew
#

When I try and use the .help

#

it brings up new error

#

That is why I don't use it

#
fs.readdir("./commands/", (err, files) => {
    if(err) console.log(err);
    let jsfile = files.filter(f => f.split(".").pop() === "js")
    if(jsfile.length <= 0){
        console.log("Couldn't find commands.");
        return;
    }
    jsfile.forEach((f, i) =>{
        let props = require(`./commands/${f}`);
        props.names.forEach((name)=>commands.set(name,props));
        console.log(`${f} loaded and ${inspect(props.names).replace("[","").replace("]","")} are the available aliases`);
    });
#

has soemthing to do with that

quartz kindle
#

if you want to target that element ONLY if it has both classes, use .class1.class2, or if you want to target it if it only contains one of them, use .class1

vernal rivet
#

What is the error when you use .help?

lusty dew
#

.forEach

topaz fjord
#

then you can access commandfile.names using commandfile.help.names @lusty dew

lusty dew
#

here

#

let me just show the errro

#

error*

#
C:\Users\User\Desktop\LoverBot v3\index.js:18
                props.names.forEach((name)=>commands.set(name,props));
                            ^

TypeError: Cannot read property 'forEach' of undefined
    at jsfile.forEach (C:\Users\User\Desktop\LoverBot v3\index.js:18:15)
    at Array.forEach (<anonymous>)
    at fs.readdir (C:\Users\User\Desktop\LoverBot v3\index.js:16:9)
    at FSReqWrap.oncomplete (fs.js:171:20)
'bot.guild.size' is not recognized as an internal or external command,
operable program or batch file.
#

That is what I get when using .help

topaz fjord
#

change props.names to props.help.names

lusty dew
#

Oh ok

#

Yea

#

I did not notice that at first >~<

topaz fjord
#

change props.names to props.help.names

lusty dew
#

Okie

#

That works

#

Thank you

topaz fjord
#

np

lusty dew
#

@topaz fjord 💗 @vernal rivet ❤

#

:3

vernal rivet
#

np

lusty dew
#

https://kitsu.io/api/edge/anime?filter[text]= Could I use this for a anime search command?

#

I want to be able to do an anime search command

#

if anyone knows a better website

#

I would be happy to know it

quartz kindle
#

most people use myanimelist

#

i think

lusty dew
#

Oh Ok

#

Is that easier to use?

ruby talon
#

I have this:

async def on_message(message):
    if message.author.bot:
        return
    await bot.process_commands(message)

But it still responds to bots.
(discord.py lib.)

quartz kindle
#

according to the docs (i dont use python), .bot is a property of User, while .author gives you a Member

#

so you have to convert Member to User somehow

ruby talon
#

'k, I'll look into it tommorow tho, gotta speel first rn.

lusty dew
#

Tim

#

Do you know how to access myanimelist api's documentation or whatever

prime cliff
#

myanimelists api is gone/disabled though GWqlabsFacepalm

lusty dew
#

Oh?

#

I thought they fixed it?

prime cliff
heady zinc
lusty dew
#

welp

heady zinc
#

you can use kitsu or anilist

#

they are better anyway

#

mal is dead

lusty dew
#

I don't know how to use kitsu...

#

myanimelist after reading the githun

#

gitbu

heady zinc
#

well read the docs ThonkangEyes

lusty dew
#

github*

#

Ok

neon schooner
#

Please ping them instead of the /whole/ team

earnest phoenix
#

please dont ping us all for something like this

granite tartan
#

@earnest phoenix okay so i tried a few commands and f.ex. the connect one didnt work and the geninvite one didnt work either. Apparently the dm one worked but also what I forgot to mention in the decline message was that your bits dm commands allows it to dm others anonymously,that isnt allowed aswell

#

so you should fix that

earnest phoenix
#

then there is something wrong with the way you made it

granite tartan
#

didnt work for me

wide ruin
#
const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
    const command = args.shift().toLowerCase();
  ``` the bot responds to incorrect prefixes when you use the say command
granite tartan
#

does it need special permissions???

wide ruin
#

Discord.js

quartz kindle
#

lmao

granite tartan
#

👏🏻

#

😂

earnest phoenix
wide ruin
#

Pls can I have help

quartz kindle
#

@wide ruin you're checking for prefix length

#

meaning any prefix with the same length will work

inner jewel
#

^

wide ruin
#

Oh

#

Thanks

granite tartan
#

@earnest phoenix also like I said,u gotta change that dm command. dming people anonymously isnt allowed

wise sable
#

hey guys i was wondering if any1 knows how tatsumaki detects botting or has a suggestion on how i can detect it in my own bot
my bot has a resource that they gain every 5 minutues that users can spend and caps at 20

quartz kindle
#

what kind of botting?

wide ruin
#

@wise sable do you mean selfbots?

wise sable
#

like scripts that auto type commands

wide ruin
#

So selfbots

#

Ok

quartz kindle
#

the only thing you can do is put commands on a timer

wise sable
#

or macros that type commands with the user not typing it himself

uneven rover
#

I think it something based on spamming

wide ruin
#

Also, it's obvious of somebody is selfbotting

uneven rover
#

Like number of msgs per second

wide ruin
#

So it should be easy to add into code

quartz kindle
#

something more advanced that can theorically be done, is to listen to the "user is typing"

wise sable
#

there problem is that my bot has a resource that u gain every 5 minutues

#

that caps at 20

#

and users need to spend that resource to get stats

#

so its not the issue of spamming

quartz kindle
#

so they are spending it automatically

#

to clear the cap

wise sable
#

yes

quartz kindle
#

why not remove the cap?

wise sable
#

yea that is a solution i would like to avoid since there would be no boundary separating casual and dedicated players

#

but yea that may be the only solution to avoid botters

quartz kindle
#

but if you wanna try something more advanced, check if user is typing happens before the message was sent. although that would require you to listen to loads info coming from the api. you could limit the check to people who have reached the cap, but then people can adapt their code accordingly. also, selfbots can also simulate the user is typing event

#

you can have a lasttyped field in your database for example that gets updated everytime someone starts typing

#

and then check if user has typed in the last few seconds before sending the message

#

but this is all theoretical, and probably costs a lot of resources

wise sable
#

i see that is an option that might be worth exploring

wide ruin
#

Or you could try and detect patterns in how long they have been typing

#

If they never make a typo in a large amount of commands, that's rare

inner jewel
#

it's hard to prevent botting of commands

#

the best way would be checking if it's periodic for a long period of time

uneven rover
#

^

wide ruin
#

If I do: if(!message.guild.name = Discord Bot List) { will that disable it for this server?

quartz kindle
#

better use ID

wise sable
#

i think it would be hard to base if a user is self botting based on time interval that they execute commands since they can just randimize that interval

wide ruin
#

Can you get the id please

#

And would that work though?

bright spear
#

server id: 264445053596991498

quartz kindle
#

you can literally right click the server on the right <<<<

#

and copy id

uneven rover
bright spear
#

lol

wide ruin
#

Mobile

uneven rover
#

Turn on dev mode

quartz kindle
#

why are you coding on mobile

wide ruin
#

No Dev mode on mobile

#

And I don't normally code on mobile

uneven rover
#

Can still toggle dev mod on mobile, I think

#

Well yeah there is

wide ruin
#

I'm disabling one command for this server

uneven rover
#

User Settings -> Behavior

wide ruin
#

@uneven rover iphone

uneven rover
#

Oops

quartz kindle
#

Luca v2 just sent you the server ID

#

.>

#

just do id = "serverid"

uneven rover
#

<.< I guess Android is more handy

wide ruin
#

Will what I said work though?

#

@quartz kindle

quartz kindle
#

it should, but you forgot quotes around the name

wide ruin
#

O yea

quartz kindle
#

inb4 oliy/tonk change the server name to screw with your bot

uneven rover
#

Better use catch

#

Or just use Tim's suggestion

lusty dew
#

could I use Winston for logging commands?

#

Like setting log channels and stuff

wide ruin
#

Enmaps

lusty dew
#

?

wide ruin
#

What lib?

lusty dew
#

Discord.js

wide ruin
#
#

They are vars that don't reset with the bot, they are always saved

#

You can set these per server, and store the log channel ID with it

#

Understand?

#

It's fine if you dont

lusty dew
#

Hm

#

I understand

wide ruin
#

K

lusty dew
#

But won't Winston work better?

wide ruin
#

It might

#

I think this was is easier though

karmic blaze
#

Winston is an actual logger,

lusty dew
#

Yea

karmic blaze
#

Like, console.

#

What you need is a database, for logging channels and things.

lusty dew
#

Oh ok

west raptor
#
        msg.channel.send({embed: {
            title: result.word,
            description: `**Definition:** *${result.definition}*\n\n**Example:** *${result.example}*`,
            fields: [
                {
                    name: 'Author',
                    value: result.author,
                    inline: true
                },
                {
                    name: 'Rating',
                    value: `Upvotes 👍 ${result.thumbsup} | Downvotes 👎 ${result.thumbsdown}`,
                    inline: true
                }
            ]
        }})``` http://prntscr.com/kptp64
Lightshot

Captured with Lightshot

#

result is defined above

karmic blaze
#

Add a fallback

#

result.author || "?"

west raptor
#

alright

#

dl.r urban

#

oops

#

wrong server

#

thanks

loud salmon
#

so in order to make a message deletion logs, you would have to make a message cache

#

some libraries cache messages, others dont

#

it really depends

ruby dust
#

There are libs that don't cache messages? 👀

spark grove
#

Ok

loud salmon
#

jda doesnt 😎

ruby dust
#

Oh wow, and rythm is using jda

sullen path
#

I wouldn't recommend using JDA to make a message logger, it's a pain to store messages. Sure, it's possible, but it's not fun to do

#

I speak from experience

loud salmon
#

yea i dont even touch that

#

im surprised vortex can manage it the way it does

sullen path
#

I've had several crashes related to message cache memory leaks

#

guess the point is, don't use JDA for this

west raptor
#

How so you add a role to a member in discord.js#master? I've looked through the docs and found nothing on it

gilded blaze
#

should work

west raptor
#

thank you

lusty dew
#
if (!['pc', 'xbl', 'psn'].includes(args[0])) return message.channel.send('**Please Include the platform: `@LoverBot v3#00701 fortnite/ftn/f [ pc | xbl | psn ] <username>`**');
        if (!args[1]) return message.channel.send('**Please Include the username: `@LoverBot v3#00701 fortnite/ftn/f [ pc | xbl | psn ] <username>`**');
#

For some reason

#

this keeps asking for the Platform

#

even though I give it the platform

inner jewel
#

@sullen path you just need to not store JDA objects

#

although with newer builds you can store message objects

#

since they won't leak massive amounts of memory anymore

sullen path
#

I store message objects

inner jewel
#

in old builds that's bad

sullen path
#

define "old"

inner jewel
#

on 3.7.1_404+ it's not as bad

#

400 got the new reference system

sullen path
#

I'm using 3.6.0_380 mmLol

#

time to update

inner jewel
#

update then

#

also on older builds you could just store a custom object

sullen path
#

🤷 too lazy

lusty dew
#

rip

inner jewel
#
class CachedUser(username: String, discriminator: String, id: Long)
class CachedMessage(author: CachedUser, content: String)```
lusty dew
#

Natan

earnest phoenix
#

anlox why the bot removed

quartz kindle
#

@lusty dew are you using capitals?

lusty dew
#

no

quartz kindle
#

then idk, maybe args[0] is wrong

lusty dew
#

Hmm

#

I will just rewrite the code

#

another way

#

Here is the error I got

#

Using my new way of writing out the command

#
let data = ft.getInfo(username, platform).then(data => {

    }).catch(e => {
        console.log(e)
        message.channel.send("Could not find User in Database!")
    });
#

here is the code

quartz kindle
#

ft.getInfo is not a function

lusty dew
#

Really?

#

My friend used this exact way and he told me it worked o.O

quartz kindle
#

what is ft and where does it come from?

lusty dew
#

fortnite

#

and it comes from the fortnite npm

quartz kindle
#

is it required?

#

and named ft?

lusty dew
#

That for some reason

#

is not installed

#

even though I installed it

quartz kindle
#

lmao

lusty dew
#

XD

#

Literally

#

I did npm I fortnite

#

I hope I did it in the right folder o.O

#

Ok what

#

I just looked in my folder and node_modules

#

it is there in the folder

#

but it doesn't show up on VScode

quartz kindle
#

did you try requiring it?

lusty dew
#

Yea

#

I did

#

const Fortnite = require("fortnite")

quartz kindle
#

if it doesnt throw module not found then its properly installed

#

and there is your problem

#

you named it Fortnite not ft

lusty dew
#

AH shit

#

No wonder

#

Oh wait

#
const Discord = require("discord.js");
const config = require("../config.json");
const apikey = require("../keys.json");
const ft = require("fortnite");
const ft = new Fortnite(apikey.fortnite);
#

here are the things I required

#

I can't require ft more then once

#

o.O

#

I just remembered about the

#

const ft = new Fortnite(apikey.fortnite);

#

hmm

#

Ima read the docs one more time

#

AH

#

I see

#
fortnite.user('Number1Swifty', 'xbl').then(console.log);
#

it is no longer

#

getInfo anymore

#

Or at least I no longer see that as an option

quartz kindle
#

thats all your requires?

lusty dew
#

Yea

#

That is all of them

quartz kindle
#

shouldnt new Fortnite(apikey.fortnite); be new ft(apikey.fortnite);

lusty dew
#

No

#

Cause

#

it is defined as ft

#

so the fortnite package

#

can not be defined as ft

#

or else that will not work

#

cause it has already been defined

quartz kindle
#

but Fortnite is not defined anywhere

lusty dew
#

It is

#

well

#

I changed it back

#

to Fornite

#

cause ft didn't work

#

but

#
(node:1560) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined
    at new User (C:\Users\User\Desktop\LoverBot v3\node_modules\fortnite\src\User.js:13:73)
    at C:\Users\User\Desktop\LoverBot v3\node_modules\fortnite\src\Client.js:61:24
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1560) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1560) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
#

new error

#

and I always get that one

#

idk why

#

everytime I try and make the fortnite command

#

I always get that error

quartz kindle
#

either a problem with fortnite itself, or you're forgetting a parameter

#

its expecting to receive something, it its receiving nothing

uneven rover
#

Args...

lusty dew
#

args?

#

I have args defined

#
const Discord = require("discord.js");
const config = require("../config.json");
const apikey = require("../keys.json");
const Fortnite = require("fortnite");
const ft = new Fortnite(apikey.fortnite);

module.exports.run = async (bot, message, args) => {


    let username = args[0];
    let platform = args[1] || 'pc';


    let data = ft.user(username, platform).then(data => {

    }).catch(e => {
        console.log(e)
        message.channel.send("Could not find User in Database!")
    });
}

module.exports.help = {
    names: ["fortnite", "ftn", "f"]
}
uneven rover
#

Can you please send the code

lusty dew
#

this is my full code

uneven rover
#

Its something to do with arguments handler in your main file

lusty dew
#

Oh.

quartz kindle
#

try to manually insert a valid value into username and platform

#

to see if it still errors

lusty dew
#

Like

#

you mean

#

Putting in a username

#

and platform?

quartz kindle
#

yes

lusty dew
#

Ok

quartz kindle
#

because the fortnite module is saying that it received "undefined" as a value

#

either from ft.user or from new Fortnite()

lusty dew
#

OH

#

I remember now

#

last time I tried making the command

#

it was an authorization problem

#

But I could never figure out how to fix that

#

cause my API-key is good

quartz kindle
#

if you want you can open C:\Users\User\Desktop\LoverBot v3\node_modules\fortnite\src\User.js

#

and check line 13

#

to see what they want

uneven rover
#

By any chance that username refers to members mention?

shy rose
#

does anyone here either live or have a vps in Australia if so can you dm me plz
having dns resolving errors and need someone to see if they encounter it still

quartz kindle
#

nope, im from south america

lusty dew
#
(node:6376) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined
    at new User (C:\Users\User\Desktop\LoverBot v3\node_modules\fortnite\src\User.js:13:73)
    at C:\Users\User\Desktop\LoverBot v3\node_modules\fortnite\src\Client.js:61:24
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:6376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
#

Even

#

manually putting in a User and platform

#

brings that error

#

also @uneven rover no its not that

shy rose
#

check you are using the right data tags that it wants?

lusty dew
#
this.url = `https://fortnitetracker.com/profile/${data.platformName.toLowerCase()}/${this.username}`;
``` @quartz kindle
uneven rover
#

Try defining the arguments again

lusty dew
#

That is what is in the user.js

#

in the fortnite npm folder

uneven rover
#

Or just don't rely on the main files arguments

shy rose
quartz kindle
#

so the problem is with the platform

lusty dew
#

Yea

uneven rover
#

.toLowerCase returns undefined

shy rose
#

add a console log or somthing before you call module and check those values are actually valid

lusty dew
#

So console log

#

platform?

shy rose
#

yeah before you call the fornite module

lusty dew
#

Wait huh?

shy rose
#

is it something in that scrn?

quartz kindle
#

im trying to figure it out, but it seems to be a problem with the package

lusty dew
#

t

#

that is literally

shy rose
#

it is

lusty dew
#

what I got in console log

shy rose
#

im starting to remember i tried that module

#

but as said in the issue opened on github they say that

#

they run through something else

lusty dew
#

Hmmm

quartz kindle
#

this is the problem with the package

#
  getPlatform(platform) {
    if (platform in this.platforms) {
      return platform;
    } else {
      for (const plat in this.platforms) {
        if (this.platforms[plat].includes(platform)) {
          return Object.keys(this.platforms).find(key => this.platforms[key] === this.platforms[plat]);
        }
      }
    }

    return undefined;
  }```
shy rose
#

was looking at that it so jank

quartz kindle
#

its not finding the platform in its platforms array, and returning undefined

shy rose
#

what is the platform your handing in btw?

lusty dew
#

me?

shy rose
#

yeah

lusty dew
#

I am trying to do

#

PC

quartz kindle
#

in uppercase?

shy rose
#

try handing in computer

lusty dew
#

no

#

lower case

shy rose
#

wait is this calling lowercase onto an array

#

?

#

am i reading that wrong?

uneven rover
shy rose
#

its either retuning an array OR that condition can never return anything

#

try maybe just in first line of get platform jsut return platform

quartz kindle
#

the User constructor is expecting data to contain platformName

#

and data is received from result = await fetch(`${this.url}/profile/${platform}/${username}`, this.headers); data = await result.json();

#

so either it doesnt contain because the url being fetched is wrong

#

or the api changed and it no longer returns a platformName

lusty dew
#

this is the right url

#

from the API doc

shy rose
#

its the reply body though

lusty dew
#
Get Fornite BR Player Stats
GET https://api.fortnitetracker.com/v1/profile/{platform}/{epic-nickname}

Platforms: pc, xbl, psn

Get Fornite Match History
GET https://api.fortnitetracker.com/v1/profile/account/{accountId}/matches

Account ID: A Guid, found in the Get BR Player Stats Endpoint.

Get Current Fortnite Store
GET https://api.fortnitetracker.com/v1/store

Get Current Active Challenges
GET https://api.fortnitetracker.com/v1/challenges

Documentation
Hit those endpoints, it's self documenting. :)
quartz kindle
#

try adding a console log in there, and debug that package lmao

lusty dew
#

this is what the site says o.o

#

I can't

shy rose
#

the lib so small should be easy to trace and fix 😛

quartz kindle
#

exactly

lusty dew
#

But

quartz kindle
#

you could even trash it and make your own

lusty dew
#

I can't see the fortnite folder in node_modules

#

on VScode

shy rose
#

it will be in there

#

vscode can see node_modules

#

or at least mine does

quartz kindle
#

just ditch the package and make your own http requests

shy rose
#

tim's right tbh

#

the lib is so tiny....

lusty dew
#

I will have to get my friend ot help me with that

quartz kindle
#

you dont even need half the shit that lib is doing

shy rose
#

your jsut doing a get request with auth header

#

ezy

quartz kindle
#

just make your own array of valid platforms to compare against the input

#

and make the http request to the api yourself

lusty dew
#

ok

#

thank you

shy rose
#

wonder how this even has 700+ downloads a week

sick cloud
#

faked

shy rose
#

for something that doesnt even work...

#

probs all the npm clone websites downloading it

sick cloud
#

npm.postDownloadPerWeekCount(1000000000000000)

shy rose
#

wot?

quartz kindle
#

plus that package hasnt been updated in 4 months, and there are many other fortnite packages in npm

sick cloud
#

fortshit

quartz kindle
#

bullnite

lusty dew
#

really

#

there are?

quartz kindle
lusty dew
#

Ah

#

thank you

#
HTTP Error: 403 Forbidden
#

I get this

#

as an error with a new npm package

topaz fjord
#

did you put ur auth key

lusty dew
#

yes

#
const Discord = require("discord.js");
const config = require("../config.json");
const Fortnite = require("fortnite.js");
const client = new Fortnite("apikeyhere")

module.exports.run = async (bot, message, args) => {


    let username = args[0];
    let platform = args[1] || 'pc';
    


    let data = client.get(username, platform).then(data => {

    }).catch(e => {
        console.log(e)
        message.channel.send("Could not find User in Database!")
    });
}

module.exports.help = {
    names: ["fortnite", "ftn", "f"]
}
#

as you cans ee

#

I have where the apikey will go

#

and I removed it to show

sullen path
#

👀

#

wrong channel

earnest phoenix
#

oh hecc

#

why do i keep doing this

lusty dew
#

Can someoen help meh?

#

I even tried making a new account

#

and getting another API key

#

after deleting my old one ofc

#

and even that API key no work

earnest phoenix
#

Any idea how to organise this?

earnest phoenix
#

do you really need to send every conversion? why not make the command take currency codes to convert to?

lusty dew
#

Yea like do !convert 1USD to 1CAD

earnest phoenix
#

!convert 1USD CAD

lusty dew
#

ye

#

Like that

#

xD

#

I did not mean to add the 1 in CAD

earnest phoenix
#

or even take multiple if you insist on having the ability to

#

!convert 1USD CAD JPY BRL

lusty dew
#

Hmm

#

I was trying to do a clock command r timezone command

#

but the clock command I made

#

only showed my date and time

#

and when someone used it, it didn't show theirs

loud salmon
#

does the clock account for other time zones?

earnest phoenix
#

!time GMT-5

loud salmon
#

shhhh

lusty dew
#

Well no

#

I was trying to figure out how to do that

loud salmon
#

the date/time in most languages iirc is the date/time of the system it is run in

#

so what you need to do is shift the time depending on what gmt offset is given

lusty dew
#

ERM

#

ok

#

Doesn't really understand

loud salmon
#

are you familiar with the acronym GMT?

lusty dew
#

No

#

Not really

#

Oh

inner jewel
#

also discord doesn't provide an user's timezone

loud salmon
#

^^^

inner jewel
#

so you'll need to have them register it/provide to the command

lusty dew
#

I know that now

loud salmon
#

also why you delete ;n;

lusty dew
#

I want to do it now so you can do

#

the time in a certain timezone

#

or place

#

like

#

!time London

loud salmon
#

city name is iffy, if i made the command, i would make the user input a gmt offset

inner jewel
#

or a zone id

loud salmon
#

yea that would work too

inner jewel
#

so you could account for DST

lusty dew
#

erm

idle mountain
#

@earnest phoenix myArray.sort(function(a, b) {return a - b}); is the best way to go about it according to w3s

#

myArray being the array of the amount of currency that $1USD amounts to

earnest phoenix
#

a cheap and easy way to do local time for a user is to do an embed with a timestamp. it auto converts it to the local time for the user

idle mountain
#

That's only in the footer though, isn't it?

earnest phoenix
#

right

idle mountain
#

that's a good way to go about it, but text small angeryBOYE

#

also I don't think you can send an embed with only a footer

earnest phoenix
#

send the conversions in the embed

#

er

#

clock itself i mean

carmine elk
#

Shoot

#

What’s a prefix?

earnest phoenix
#

whatever you're doing otherwise can go in it, with a timestamp for the footer

tulip snow
#

Does anyone know how to make a command like to disable a leveling system for a guild or something like that? I just need a example because I don't know where to start

earnest phoenix
#

!disablelevels

loud salmon
#

the characters your bot will look for to make sure a command is being run @carmine elk

lusty dew
loud salmon
#

im sure it would be easier

idle mountain
#

@carmine elk prefix is the thing that goes before the command, if you to t!profile, then the prefix is t!, if you do >items, then the prefix is >, etc.

carmine elk
#

Thx

idle mountain
#

np

carmine elk
#

I give up

#

Cya everyone

tulip snow
#

Could someone show me an example of what I need?

earnest phoenix
#

you need to track a variable in each guild whether the leveling system is on or off

#

and if it's off to not execute any level-based functionality

tulip snow
#

What's a good npm for that

#

fs?

earnest phoenix
tulip snow
#

Would FS be the best thing to use?

#

Besides DateBases

earnest phoenix
#

that's up to you

#

but you still need to have a variable in the bot itself to determine if a guild has leveling enabled or disabled

#

if you read from a file to check every time you're going to have a bad time

tulip snow
#

I mean like I dont need like leveling and stuff like that I really need a way to set channels for like logging, Welcome/Leave messages, etc

lusty dew
#

@loud salmon Do you know how I can do the code all in one file but have different things like, !list, !time, !convert?

loud salmon
#

not really