#development

1 messages · Page 710 of 1

earnest phoenix
#

@slim heart index.js

sage bobcat
#

One message removed from a suspended account.

slim heart
#

@earnest phoenix is it in your ready event?

#

Console.log prefix and make sure it’s just that string not an object

green kestrel
#

@sage bobcat thats because $prefix is an object, not a scalar

sage bobcat
#

One message removed from a suspended account.

green kestrel
#

are you setting it to something you dont expect, before using it?

earnest phoenix
#

@green kestrel is in index.js

green kestrel
#

what are its contents? can you dump the object's properties?

sage bobcat
#

One message removed from a suspended account.

slim heart
#

DV console.log prefix

sage bobcat
#

One message removed from a suspended account.

green kestrel
#

btw tokens inside source code is kind of a Bad Idea (tm)

slim heart
#

Ok well prefix is not defined as what you want

earnest phoenix
#

sure but

#

it's my first bot

#

@green kestrel

#

And i just want to fix

#

activity

#

but the bot work

#

but the activity don't

green kestrel
#

ok, well thats just advice for later 🙂

earnest phoenix
#

wat do u want

#

ty @green kestrel

#

@earnest phoenix

#

I want to set an activity for my bot

#

js or py?

#

client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' + client.guilds.size + " serveurs" | + client.users.size + " users", { type: 'WATCHING' })

#

Js

green kestrel
#

im not familiar with this library you use, what's the signature for user.setActivity?

earnest phoenix
#

wait

#

client.user.setActivity @green kestrel

#

client.on("ready", () => { console.log(`Logged in as ${client.user.tag}!`); client.user.setActivity("beta v0.3 :) | $help "); });

sage bobcat
#

One message removed from a suspended account.

green kestrel
#

does type take a string, or a numeric value, e.g. 3?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

@earnest phoenix Sure i know that

#

but i want to see Members and servers

#

o

#

That is my code

#

client.on('ready', () => { console.log([BOT] ${client.user.tag} CONNECTER AVEC SUCCES ! `)

     client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' + client.guilds.size + " serveurs" | + client.users.size + " users", { type: 'WATCHING' })

})`

sage bobcat
#

One message removed from a suspended account.

slim heart
#

DV eval your stuff

#

And see what it’ll define prefix as

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

try with ${client.guilds.size}

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

@earnest phoenix ya une faute a connect__er__ avec succès

#

@earnest phoenix FR ?

#

ui

#

`
Waiting for the debc:\Users\Alexm\Desktop\DISCORD2 - Copie\index.js:11
client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' ${client.guilds.size} " serveurs" | + client.users.size + " users", { type: 'WATCHING' })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: missing ) after argument list
at Module._compile (internal/modules/cjs/loader.js:811:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
at Module.load (internal/modules/cjs/loader.js:731:32)
at Function.Module._load (internal/modules/cjs/loader.js:644:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
at internal/main/run_main_module.js:17:11
ugger to disconnect...`

#

jvais tester de mon coté att

#

why the hell are you mixing all of the possible ways to create a string

#

and not doing it correctly

#

^

#

stick to template literals and you're all good

#

Who can help me ?

#

😦

#

i just did

#

read

#

My original code

#

is

#

with no error

#

good for you

#

I'VE FOUND

#

you're still not reading what i said

#

@earnest phoenix Oui dit moi ?

#

(beta v0.3 :) | $help | ${client.guilds.size} )

#
client.on('ready', () => {
  console.log(`[BOT] ${client.user.tag} CONNECTER AVEC SUCCES ! `)
    
         client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' + client.guilds.size + " serveurs" | + client.users.size + " users", { type: 'WATCHING' })
    
    
    
  })```
#

this works

#

Accept my friend request pls @earnest phoenix

#

i'm going to lose brain cells trying to help

#

done

#

Why is there a random |

#

problem solved

heavy marsh
#

Discord.js
music.duration - it is wrong to get the songs duration

earnest phoenix
#

can you like

#

try to provide context behind that question

heavy marsh
#
.addField("Duration", `**${music.duration}**`, true)
earnest phoenix
#

That's still like

#

Not very useful

#

What's music

heavy marsh
#
        let music = {
            id: video.id,
            title: video.title,
            url: `https://www.youtube.com/watch?v=${video.id}`
        };
#

ok i have not defined it

#

my bad

#
let music = {
            id: video.id,
            title: video.title,
            duration: video.duration,
            url: `https://www.youtube.com/watch?v=${video.id}`
        };

 const emb = new discord.RichEmbed()
  .setTitle(`:notes: Now Playing: ${music.title}`)
  .addField("Link", `**[Click Here](${music.url})**`, true)
  .addField("Duration", `**${music.duration}**`, true)
  .setThumbnail(`https://i.ytimg.com/vi/${music.id}/default.jpg?width=80&height=60`)
  .setColor(`#FFD41C`)
  .setTimestamp()
peak bloom
#

all you've done is float the question up one level

#

what is video.duration

heavy marsh
#

i am trying to get the duration oft he music

peak bloom
#

what is video tho

#

what type from what lib

heavy marsh
#

ytdl

peak bloom
#

so there's two directions I'd go from there

earnest phoenix
#

up or down

peak bloom
#
  1. console.log music.duration to see why it's an object and what it has
  2. look up ytdl docs and find out what properties video has and then duration
earnest phoenix
#

you can't place a copyright sign on something and call it yours only lool

grizzled jackal
#

Not if I copyright your copyright first

earnest phoenix
#

oh no

#

run

#

just do a no u

peak bloom
#

oh no do i need to start copyrighting my messages
© runi 2019

earnest phoenix
#

yeah © rico 2019

#

©copyright ©each ©word

#

©c©o©p©y©r©i©g©h©t ©e©a©c©h ©l©e©t©t©e©r

grizzled jackal
#

Copyright each binary

heavy marsh
copper cradle
#

console.log(video.duration)

grizzled jackal
#

^

heavy marsh
#

{ weeks: 0,
years: 0,
months: 0,
days: 0,
hours: 0,
minutes: 3,
seconds: 33 }

peak bloom
#

well there you go

#

in easy format for hⓂs too

#

mobile discord oh mh

copper cradle
#

@heavy marshthere u go

#

if you don't know how to use that

#

...

heavy marsh
#
var musich = music.duration.getHours();
var musicm = music.duration.getMinutes();
var musics = music.duration.getSeconds();
#

is it wrong like this?

slender thistle
#

Isn't it just .hours etc

heavy marsh
#

TypeError: music.duration.hours is not a function

slender thistle
#

It's not

grizzled jackal
#

video.duration

heavy marsh
#

i defined video as music

copper cradle
#

hours is a property

#

you did music.duration.hours()

#

you had to do

#

music.duration.hours

#

getMinutes()? getHours()?

heavy marsh
#

thanls

copper cradle
#

np

heavy marsh
#

🙂

copper cradle
#

🤠

earnest phoenix
#

imagine copyrighting an embed

weary lark
#

imagine

earnest phoenix
#

are copyrights expensive?

heavy marsh
#

😐

earnest phoenix
#

oh they are pretty cheap

#

haha im copyrighting my bot ahaha

weary lark
#

copyright everything >:)

earnest phoenix
#

watch me >:)

dense topaz
#

😄

earnest phoenix
#

are copyrights expensive?
depends on what you want to copyright

#

you legally can't copyright an embed because, well, it's discord's property

#

^

amber fractal
#

Everything you put on discord they can use however they want

earnest phoenix
#

it may be your code which is making the embed, which belongs to you, but you have no rights to send an embed with your copyright identifier because you're using their services

#

and then you buy discord

#

how do i save one exact variable in my bot hosted on glitch, named 'ldaypurge' with anything inside it

#

buy discord for 3 billion just to be able to put a copyright sign 😎

#

😎

sudden geyser
#

where's my wallet coolsausage

weary lark
#

in your pocket

earnest phoenix
#

i dont have pants on

#

👅

#

let's move to ©chat

slim heart
#

What port range should I use for the express servers on each shard? Like each one would have its own port obviously I was thinking just like basePort + shardNumber but idk what is like the standard to do this if there is any

amber fractal
#

port + shard # sounds like the best way to do it imo

slim heart
#

I’m asking for the base port tho

#

Like what’s the standard? I’m looking at my port list and it doesn’t seem like there’s anything in 70000 but idk

amber fractal
#

I dont use express so I'm not sure exactly what you want does express have some sort of required base port?

quartz kindle
#

why do you need a server on each shard?

slim heart
#

Communication for stats along with status etc

earnest phoenix
#

you can have a single server for that

#

one process acts like a websocket server, everything else as a client

slim heart
#

Nikki said it’s a good idea for health checks and things like that

quartz kindle
#

are all shards on the same machine?

slim heart
#

Yeah

quartz kindle
#

then you dont need express

#

use tcp or ubuntu/windows sockets

#

and a message broker library

#

and have a single express server for external connections

#

if you're using a sharding manager, have the express running on the sharder

#

and gather info from shards using broadcastEval

earnest phoenix
#

you can make it faster by using ipc and avoiding internet connections altogether

slim heart
#

The broadcastEval fails if not all the shards are spawned

quartz kindle
#

the shardingManager uses node child_process

#

so you should have access to shard.send()/shard.on("message") and process.on("message")/process.send()

slim heart
#

I’m pretty sure these fail if a websocket is closed and that sort of thing. Also during startup nothing will respond obviously

quartz kindle
#

those are process based, not websocket based

#

as soon as a shard is launched, the ipc connection will already work, even if the shard is not online

#

and you can individually contact specific shards, and handle errors

slim heart
#

Mm ok

quartz kindle
#

as soon as a child process is spawned, you can do childProcess.send() and the child process can listen to it using process.on("message")

#

im pretty sure the sharding manager gives you access to the childProcess object

#

or an abstracted version of it (the shard object)

#

then the child process (shard) can reply using process.send()

#

to which the parent can listen using childProcess.on("message")

slim heart
#

Yeah I understand

quartz kindle
#

its a bit complicated to set up, but broadcastEval is basically an abstraction of that

#

and its weird that it has such basic flaws as you said lol

slim heart
#

Yeah iirc broadcastEval only works once all shards have gotten a ready event

quartz kindle
#

yeah it kinda makes sense, but it does make it less useful

cursive dagger
#

Can bots screenshare?

quartz kindle
#

no

cursive dagger
#

Rip

earnest phoenix
#

if a *bot can screenshare, what happend?

west spoke
#

I mean I can search through the api while screen sharing something, and see how to do it.

#

but you would most likely need to assign a game to a status

earnest phoenix
#

like everyone

slim heart
#

I’m sure it’s a user-only thing

earnest phoenix
#

my bot has server count as statut

#

only 2 servers

slim heart
#

Ok?

cursive dagger
#

@west spoke would be nice to see what api calls do it. Mind doing it? (I don't have access to a PC)

slim heart
#

iirc it’s just another websocket same as voice just with a different protocol

earnest phoenix
#

how users send voice and video data is not the same how bots do it

#

don't even bother trying to make bots send video data, all valid video packets sent from bots get dropped instantly

slim heart
#

I was just answering because he’s just asking what it actually does

#

Not that he wants to I think because yeah u just can’t with bot accounts

earnest phoenix
#

yeah fairs, i was just noting it's a different process depending on the token type

#

and knowing people, they'll usually try to make that no into a yes

slim heart
#

How can i turn 0x0000008 into a string? because when i do it just turns to 8?

hushed berry
#

@slim heart wdym into a string

#

like, turn the number into a string in that format?

mossy vine
#

`${0x0000008}`

hushed berry
#

That would still just put 8 though, no?

west spoke
#

@cursive dagger I'll do it soon, once I implement a eval into my bot.

mossy vine
#

oh yeah

#

it does

cursive dagger
#

Ok thanks @west spoke do you mind sending me a dm with the results or ping me?

west spoke
#

Aight

hushed berry
#

Theres probably a util function that converts a number to a hex string

#

Find that and use that

west spoke
#

Since I'm completely redoing my bot, I still need to get eval stuff working

cursive dagger
#

Ofc

west spoke
#

and yes I'm doing rewrite are you happy shiv

past pike
#

Hello everyone,
i have a code to create channel, but the bot doesn't make a text channel. also i made a script which used to log errors but no error.
I use discord.js and this is the script:
client.on("message", (message) => {
if (message.content.startsWith("cmd create channel")) {
function makeChannel(message){
let name = message.author.username;

message.guild.createChannel(name, "Textchannel")
.then(console.log)

.catch(console.error);
}
let ping = new Discord.RichEmbed()
.addField("Bot", "✅ Channel New_channel created succesfully");
message.channel.send(ping);

}
});

#

the bot sends channel created but nothing happend

warm marsh
#

So I tried to install apache2 and php on Ubuntu 18.04 but I just get a load of salt when trying to load it.

earnest phoenix
#

because Textchannel is not a valid channel type, a valid type is text @past pike

#

you can leave the second parameter empty since the default is text anyways

past pike
#

okay i'll try

#

i have this now, but still nothing happend:
message.guild.createChannel(name)

warm marsh
#

Call the function createChannel(message);

past pike
#

still nothing happened

warm marsh
#

What version of djs?

past pike
#

uhhh

warm marsh
#

Check package.json

past pike
#

let me check

#

11.3.2

#

do i need to update?

warm marsh
#

Ok, Why do you need a function.

#

Nah.

past pike
#

that's a script i found

warm marsh
#

Ah.

#

It's not needed

#

you can do all of that without the function.

past pike
#

oh okay

warm marsh
#

<Message>.guild.createChannel(name, [ options ]);

past pike
#

i do something wrong

#

the bot crashes now

warm marsh
#

Is there an error?

past pike
#

oh i found the error

#

now does he make a channel called fermion lol

astral meteor
#

When my bot joins a server, how do I log said server's guild name, icon, id and member count in a channel in the bot's support server?

earnest phoenix
#

@astral meteor what lib

astral meteor
#

djs

warm marsh
#

This is the error I get when running apache2 via the terminal, I did this because nothing was displaying on the IP.

earnest phoenix
#

@astral meteor

<client>.on('guildCreate', function(guild) {
//do sth with ${guild}
})
past pike
#

somehash thanks for help btw. i think i can fix the script now

warm marsh
#

Np.

past pike
#

only need to fix the let command

astral meteor
#

thanks skipper

earnest phoenix
#

No problem archie

past pike
#

somehash i have a last question

earnest phoenix
#

Wöt is it

past pike
#

now does he make a channel called my username because of this let command:
let name = message.author.username;
do you know something i can replace for it? I would like to have a channel called textchannel

tulip tundra
#

let name = "textchannel"

past pike
earnest phoenix
#

Do var / const

astral meteor
#

what does sth mean btw spooker

earnest phoenix
#

not let

#

Something

astral meteor
#

ahh

#

can i just make an embed as i would in a command?

past pike
#

then i get the same error skipper

earnest phoenix
#

@astral meteor As user

#

no

past pike
#

i fixed it

#

thanks for help guys 🙂

earnest phoenix
#

uwu

astral meteor
#

so i cant do const embed = new RichEmbed()?

earnest phoenix
#

i thought you can?

#

i think I do

#

something like that

#

wait no

#

you cant

astral meteor
#

what do i use instead?

earnest phoenix
#

its basically the same, but RichEmbed will be undefined if you just do new RichEmbed(), since that's a function of discordjs, you'd do Discord.RichEmbed

tulip tundra
#

wdym you cant

earnest phoenix
#

const embed = new Discord.RichEmbed()

#

or whatever you defined discordjs as

#

i could be unknowingly pulling some of that out of my ass but its what I know

astral meteor
#

i have const { Client, RichEmbed } = require('discord.js');

tulip tundra
#

you can do it as an object

#

const embed = { }

#

like

#
color: color,
title: title,
blahblah: and so on
}```
astral meteor
#

cheers :)

earnest phoenix
#

I just do the whole addField addColor etc thing

astral meteor
#

setColor* lol

earnest phoenix
#

yes

#

i was going to edit that

#

but you sent that too quickly smh

astral meteor
#

fast typer

earnest phoenix
tulip tundra
#

the guides are really helpful

earnest phoenix
#

yeah thats pretty good

astral meteor
tulip tundra
#

yes

astral meteor
#

Alrighty thanks

faint bridge
#

Any1 here using OVH to host their bot?

amber fractal
#

I use ovh

earnest phoenix
#

what ovh

valid frigate
#

never had experience with ovh

earnest phoenix
#

i use my ol laptop bc good, silent and console & development near to me lUl

#

no

valid frigate
#

it's not available in the united states

earnest phoenix
#

europe?

valid frigate
#

canada or some shit

earnest phoenix
sudden geyser
#

hold up, you use your laptop and leave it running?

earnest phoenix
#

yes

#

brother

#

I use

#

it doesnt succ much power so

#

a raspberry pi

#

getum pi

#

i used to too but he said "Invalid token in message collector"

sinful lotus
#

whats wrong on leaving a laptop on to host a bot

earnest phoenix
#

because it laptop

#

After reinstalling d.jsv12 13 times i gave up

#

thats whats wrong

#

it laptop and it good

sinful lotus
#

if your laptop got its thermal goey fine and well ventilated it wont break

earnest phoenix
#

it good tho

#

?

#

YEs

#

sk.ping

sinful lotus
#

and fine as a hosting solution for small to small-medium bot

earnest phoenix
#

ah sh

sinful lotus
#

worry more about your internet than the laptop

#

and what I mean about a laptop, is the laptop that you dont use ofc

#

its a waste to make a laptop that you still use as your server

faint bridge
#

@amber fractal can we go dm's i need some help with ovh...

amber fractal
#

I dont have dms on

faint bridge
#

ok

#

well

#

can you add me as a friend or smth then

earnest phoenix
#

i'll add you as a friend zoomeyes

faint bridge
#

-_-

amber fractal
#

Is there a reason I cant help you here?

faint bridge
#

well not really

#

so well

#

what os u on?

#

local?

amber fractal
#

My ovh uses ubuntu 16.04

faint bridge
#

ok

#

what way did you login to the console thing?

#

to access the vps

amber fractal
#

They email you the ip and password

#

And I use putty

faint bridge
#

ok

#

putty is not letting me enter the password

#

what is that about?

amber fractal
#

I believe you connect first then enter the password for root. I havent had to sign in in 10 months though

#

Oh and the default user is root

faint bridge
#

yeh

#

so the ip is the IPv4

#

what about the port?

amber fractal
#

Ssh default port is 22 I believe

faint bridge
#

ok

#

and that works for you?

amber fractal
#

Like I said, I havent signed in for a while. I'm not at my computer either

faint bridge
#

ok

amber fractal
#

But it is default so it should work

faint bridge
#

i guess ill have to figure out why i cant type the password then

slender thistle
#

It doesn't display the characters you type in

faint bridge
#

i was guessing that

#

it says wrong password tho

#

so either they sent me the wrong password or it doesnt type

slender thistle
#

Make sure your keyboard language is the same etc etc

#

Or reconnect and try again

faint bridge
#

i have tryed about 10 times already

#

no luck

amber fractal
#

You cant copy paste either

faint bridge
#

yeah i tryed it on the username

#

well its starting to be late for me so ill try again tomorrow

#

just having my bot offline for multiple hours mad

heady salmon
#

Is there a python library for ram.moe that I could use,

astral meteor
#

When my bot joins a server, how do I send something to a channel in a different server (#guild-logs channel in bot's support server).

hushed berry
#

Which part specifically do you not know how to do?

astral meteor
#

Sending a message into a server.

#

I have the embed and channel set.

#

It only works when I add the bot to the server with the #guild-logs channel in.

hushed berry
#

Which library are you using?

astral meteor
#

discord.js

#
    const channel = client.channels.get('631924772003119119')
    const exampleEmbed = {
        color: 0x7289da,
        title: 'Bot joined a new guild.',
        fields: [
            {
                name: 'Guild Name',
                value: `${guild.name}`,
                inline: true,
            },
            {
                name: 'Guild ID',
                value: `${guild.id}`,
                inline: true,
            },
            {
                name: 'Guild Owner',
                value: `${guild.owner}`,
                inline: true,
            },
        ],
        timestamp: new Date(),
        footer: {
            text: 'Some footer text here',
        },
    };
    
    channel.send({ embed: exampleEmbed });
});```
#

I have that at the moment

hushed berry
#

afaik, that should work

astral meteor
#

it didnt

#

Ill try with a different server

earnest phoenix
#

what

#

you are getting the channel be a specific id

astral meteor
#

yeah

earnest phoenix
#

hence the client.channels.get('631924772003119119')

#

it wouldn't on different servers

#

@astral meteor const g = client.guilds.get(id); const ch = g.channels.get('631924772003119119')

astral meteor
#

When adding to the server with the specified channel id, it works as it should do.

earnest phoenix
#

ok try this

#

wait

unique nimbus
#

it doesn't have the channel id or some shit

astral meteor
#

Im trying it

#

The thing you just sent, skipper

#

im about to test it

earnest phoenix
#
client.on('guildCreate', function(guild) {
    const guild1 = client.guilds.get(idfromtheserverembedshallbesent)
    const channel1 = guild1.channels.get('631924772003119119')
    const exampleEmbed = {
        color: 0x7289da,
        title: 'Bot joined a new guild.',
        fields: [
            {
                name: 'Guild Name',
                value: `${guild.name}`,
                inline: true,
            },
            {
                name: 'Guild ID',
                value: `${guild.id}`,
                inline: true,
            },
            {
                name: 'Guild Owner',
                value: `${guild.owner}`,
                inline: true,
            },
        ],
        timestamp: new Date(),
        footer: {
            text: 'Some footer text here',
        },
    };
    
    channel1.send({ embed: exampleEmbed });
});
late hill
#

Is your bot sharded

astral meteor
#

nope

#

Skipper, do I replace idfromtheserverembedshallbesent with 631924772003119119?

earnest phoenix
#

the id from the guild the embed should be sent

#

so

#

r e a d

heady salmon
#

^

astral meteor
#

so guild id?

earnest phoenix
#

yes

heady salmon
#

Yes

astral meteor
#

jeez im thick

heady salmon
#

And nobody answered my question- amazing.

astral meteor
#

have you googled it first?

late hill
#

Maybe no one answered because we don't know

slim heart
#

If I may suggest @astral meteor use a webhook

late hill
#

Would it be helpful to you if we all replied with "no" or "idk"

slim heart
#

You don’t have to worry about any cache things etc

astral meteor
#

But is it not more difficult lol?

slim heart
#

Not really

astral meteor
#

@earnest phoenix channels is undefined

slim heart
#

It 1. Nicer 2. Easily changeable on the go 3. No caching needed (more reliable) 4. Allows for expandability

earnest phoenix
#

rEEEE

#

idk anymore

astral meteor
#

not in index.js

#

@slim heart how would one go about creating a webhook for it?

slim heart
#

Again do webhooks

#

Do new Discord.WebhookClient(webhookid, webhooktoken) and it’s has a .send method similar to channels

#

And do it outside of the event cuz u can just store it as a variable and use send on it

astral meteor
#

Alrighty

#

one sec

heady salmon
#

I did google it.

#

I’m thinking it’s under another name.

slim heart
#

OliyChan what’re you doing

heady salmon
#

I’m thinking of making a node.js web server.

late hill
#

Still interested in why his client.channels doesn't include the channel 👀

heady salmon
#

Oh.

#

Trying to find a python library for ram.moe

slim heart
#

Probably bad variable naming but tbh webhooks are still better

heady salmon
#

(Image API)

sudden geyser
#

Wesley is it undefined

astral meteor
#

@slim heart

sudden geyser
#

oh hey there's a webhook token

astral meteor
#

not sure what you can do with it

#

um

#

deleted

#

scam

#

wow timo

twilit rapids
#

@astral meteor make sure not to include the webhook token

heady salmon
#

LMAO

astral meteor
#

what can ppl do with it lol

heady salmon
#

Might wanna invalidate that rn

sudden geyser
#

I mean, you could spam @ everyone with it

heady salmon
#

Yeah

astral meteor
#

ill do it after i get it working lol

slim heart
#

First off delete and make another webhook cuz u just exposed webhook token and whatnot. Two, get rid of whoever told you to get channels off of a guild (way wrong idk). Three, define the new webhook client as a variable and when sending a message do <that variable>.send instead of channel.send

astral meteor
#

what do I define the webhook client as?

slim heart
#

Whatever you want

#

But then do that variable .send

astral meteor
#

Do I use var or const?

slim heart
#

Doesn’t matter

astral meteor
#
client.on('guildCreate', function(guild) {
    const guildlogs 
    const exampleEmbed = {
        color: 0x7289da,
        title: 'Bot joined a new guild.',
        fields: [
            {
                name: 'Guild Name',
                value: `${guild.name}`,
                inline: true,
            },
            {
                name: 'Guild ID',
                value: `${guild.id}`,
                inline: true,
            },
            {
                name: 'Guild Owner',
                value: `${guild.owner}`,
                inline: true,
            },
        ],
        timestamp: new Date(),
        footer: {
            text: 'Some footer text here',
        },
    };
    
    guildlogs.send({ embed: exampleEmbed });
});```
#

I must be really thick, because having const guildlogs on its own seems weird

#

So I assume what I did was wrong

twilit rapids
slim heart
#

I

#

No set the new webhook client as guildlogs, it’s the same process as how you define client as a variable and use that

#

Also const variable; will error

#

Since you can define a const as undefined/something undefined

twilit rapids
#

It might also be a good idea to learn a bit more about JavaScript

astral meteor
#

Specifically webhooks

#

bots are fine except some eventd

slim heart
#

Yeah idk if you’re just getting confused or something but somethings weird

#

It’s the same as declaring a discord client

astral meteor
#

OH

twilit rapids
#

const <something> = new Discor...you know the drill

slim heart
#

^

astral meteor
#

const guildlogs = new Discord.WebhookClient?

twilit rapids
#

with the token and ID

#

like you showed above

astral meteor
#

const guildlogs = new Discord.WebhookClient('id', 'token')?

twilit rapids
#

yes

astral meteor
#

fASgsh

#

crap forgot to remove id/token

twilit rapids
#

Remake the webhook

#

Do not risk it

astral meteor
#

If I ran this, would it work?

client.on('guildCreate', function(guild) {
    const guildlogs = new Discord.WebhookClient('id', 'token')
    const exampleEmbed = {
        color: 0x7289da,
        title: 'Bot joined a new guild.',
        fields: [
            {
                name: 'Guild Name',
                value: `${guild.name}`,
                inline: true,
            },
            {
                name: 'Guild ID',
                value: `${guild.id}`,
                inline: true,
            },
            {
                name: 'Guild Owner',
                value: `${guild.owner}`,
                inline: true,
            },
        ],
        timestamp: new Date(),
        footer: {
            text: 'Some footer text here',
        },
    };
    
    guildlogs.send({ embed: exampleEmbed });
});```
#

will do

twilit rapids
#

You can remove new Discord.WebhookClient('id', 'token') at the top of your code

astral meteor
#

Ah

slim heart
#

Ahhhh no stop

#

Move it up above the event code

#

You’re gonna make a new instance every time

astral meteor
#

done

slim heart
#

What you have inside there replace what’s there with that

valid frigate
#

lmao

#

the scope is wrong

#

oh hi berry mm

astral meteor
#
client.on('guildCreate', function(guild) {
    const exampleEmbed = {
        color: 0x7289da,
        title: 'Bot joined a new guild.',
        fields: [
            {
                name: 'Guild Name',
                value: `${guild.name}`,
                inline: true,
            },
            {
                name: 'Guild ID',
                value: `${guild.id}`,
                inline: true,
            },
            {
                name: 'Guild Owner',
                value: `${guild.owner}`,
                inline: true,
            },
        ],
        timestamp: new Date(),
        footer: {
            text: 'Some footer text here',
        },
    };
    
    guildlogs.send({ embed: exampleEmbed });
});```

It says: `DiscordAPIError: Cannot send empty message`.
tulip tundra
#

check your guildlogs

astral meteor
#

The channel? Nothing got sent.

tulip tundra
#

which channel

late hill
#

webhooks take an array of embeds

#

so I'd assume discord.js implementation does too

#

?

astral meteor
#

It's supposed to send an embed into #guild-logs (channel in bot's support server) when the client joins a new server.

tulip tundra
#

i mean

#

first line const guildlogs = ...

slim heart
#

You can just send the embed object

earnest phoenix
#

where and why do people have the thought that logging gateway events to a text channel is a good idea

slim heart
#

Uh

#

What

tulip tundra
#

@astral meteor you can simply define your logs channel as a variable then send the message

slim heart
#

@astral meteor I would suggest replace the embed object with a richembed, but also it should take the object just as, if not though, you can try doing {embeds: [embed]}

#

Ski we literally just got him to do webhooks don’t

earnest phoenix
slim heart
#

@astral meteor figured it out, do .send("", {embed: exampleEmbed});

sudden geyser
#

pretty sure .send({ embed: exampleEmbed }) works

slim heart
#

it doesnt

sudden geyser
#

unless it's different for webhooks

slim heart
#

i thought it did too

#

but im getting the same error on TextChannel#send as well

#

its only does it if its a RichEmbed

sudden geyser
#

you are right (checked docs for a sec)

slim heart
#

i would've sworn it was like that before too

#

i just asked in djs

#

cuz i i remember it treating first param as messageoptions if it was an object

sudden geyser
#

It seems that you need to call it as <Webhook>.send(content, { embeds: [{...}] }) | I don't know why it's like that, but seems to be it (the way you're doing it with normal objects).

slim heart
#

oh they changed it in v12

#

v11 had this

  send(content, options) {
    if (!options && typeof content === 'object' && !(content instanceof Array)) {
      options = content;
      content = '';
    } else if (!options) {
      options = {};
    }
#

wait

#

ok so apparently

#

v12 still has it but like IDK HAHBFWHUBEF

sudden geyser
amber fractal
#

if(!options) options = {}

#

Wtf

sudden geyser
#

I'm having a simple issue trying to make a snipe command in Discord.js. When I try filtering the past cached messages, I always get an empty array. I tried two examples:

// Attempt #1 - This was within the actual command script (`Tools/snipe.js`).
let deleted = [];
            
for (const [, msg] of message.channel.messages) {
   if (msg.deleted && msg.author.id === member.user.id) {
      deleted.push(msg);
              
      if (deleted.length >= limit) {
         break;
      }
   }
} // deleted => []
// Attempt #2
message.channel.messages.fetch({ limit: 100 }).then((msgs) => msgs.filter((msg) => msg.deleted).map((msg) => msg.author ? msg.author.tag : "???")); // => []```
From the two attempts, it was obvious `<Message>.deleted` does not update/show deleted as true. I don't know how I would be able to tell if a message was deleted or not without setting it every time or listening to the messageDelete event.
smoky spire
#

If a message is deleted, you can't fetch it anymore so it wouldn't be returned by fetch

sudden geyser
#

You can: message.channel.messages.fetch(id)

smoky spire
#

Maybe if ur fast enough

#

But fetching 100 messages definitely isn't fast enough

sudden geyser
#

I tried it, and that seems to be the case. But now I wonder how I'd be able to mimic the effect of "getting the last deleted message(s) from a member"

smoky spire
#

You can listen to the messageDelete event and have a database with a message object attached to a user id

earnest phoenix
#

storing so many messages into a database is expensive

#

i'd say inmemory cache is enough

smoky spire
#

when I said database I meant database type of thing, which includes ^

sudden geyser
#

I'd rather use a map. I don't think I can store the actual object as I don't think that'd be allowed by Discord. I'll try that, but what about the need to fetch many messages?

indigo niche
#

Does anyone have any tips for setting up a webhook? I've already put the webhook info in Github, but I'm not sure where to go from there. My goal is to get the webhook to send posts from a Twitter account to a channel.

#

If I have to code something, I'm not sure where to do it and I'm not very good at Python yet, but I'm trying to learn it.

#

I was able to follow most of the steps from the webhook tutorial on discordapp.

quartz kindle
#

i dont think discord supports twitter webhook by default, although i found several workarounds from a quick google search

#

you need a third party website/service to receive twitter updates and redirect them to discord

indigo niche
#

Alright. But I'm still not sure where I need to actually program the webhook to send messages.

#

Are there any steps I have to do after following this? I have yet to enter any sort of URL I want the bot to use.

quartz kindle
#

you want the bot to use webhooks?

#

because you can do webhooks without a bot

indigo niche
#

I just want to get the webhook to function. I followed the tutorial, so it should be capable of sending stuff, but it can't.

quartz kindle
#

with a bot or without a bot?

#

because to do it without a bot with github is easy, but with twitter is not

#

the guide above shows how to set it up with github, not with twitter

#

the webhook is a receiver, not a sender. you configure a webhook on discord to receive messages

#

the messages are sent by the third party service (ie: github) when updates/new stuff happen, like pushing a new commit or having a new issue no github

#

you dont do any actual sending anywhere, you dont need to

#

you just configure your webhook and then configure the third party service to find your webhook

shadow dust
#

Hey, has anyone worked with the react-color npm package? I cannot seem to get it working at all. It keeps saying it cannot find some of its own modules, ive checked the dir of the package and the paths match so I'm not sure what to do

#

What I mean with the path match is that the files are where they should be with proper exports etc...

earnest phoenix
#

alright i need some insights

#

i have a set of cron jobs that shouldnt execute at the same time

#

currently my plan is to do this

#

create an event loop and loop through a tasklist which recieves task from the cron jobs

#

and the event loop executes the tasklist async like and such

#

is there a better approach?

earnest phoenix
#

I just found a security flaw out of my bot involving Oauth2 and a web panel. The user's session code + discord auth token are stored in cookies. It is designed to allow a user access to server commands if their token and session code are acceptable by discord and my bot.

However, if you copy an auth code on a way different application, and replace it with the authorized token on the bot panel, it will grant you access to that user, allowing you to run commands as that user. This could possibly be used as a server owner authorizing a random application and the application owner copying the code and using it on the webpanel.

How can I add an extra layer of security that won't let that happen, without an alternative to cookies.

#

This method also works on some other popular bots, but I won't be naming them.

slim heart
#

store the auth token by a token generated by you and store that token in cookies, then when they do a request use that token to get the bearer token from the database and do requests with it yourself

earnest phoenix
#

That works too, but I've done something similar.

#

Which is saved in memory when a code is turned to a token and they can only run commands with a token where a dashsecure code matches.

slim heart
#

well that makes, no difference if an app can get a hold of the token they'd still be able to do anything with it

#

the only real solution is what i just described and doing it differently is just flat out a bad idea

tranquil drum
#

are you setting token cookies through http headers?

valid frigate
#

oauth is the best way to go, there should be nothing additional unless you're sure it's necessary

#

judging by your idea of adding additional cookies, it's useless if someone other than your target user were to get ahold of the token (as berry said earlier mm)

tranquil drum
#

^

earnest phoenix
#

Stumbled on another error, var ss21 = JSON.stringify(gu) console.log(typeof(ss21)) res.write(ss21) res.end()
Gives an error, but it shouldn't.

#

gu is an object,

delicate zephyr
#

why not do

#

res.write(JSON.stringify(gu))

#

@earnest phoenix what library is that just for reference

earnest phoenix
#

Just normal import("http")

valid frigate
#

it's probably that typeof(ss21) isn't a string or buffer

earnest phoenix
#

Look at the output, the typeof claims it's a string.

valid frigate
#

wait

#

it said received type object

earnest phoenix
#

That's the thinker here e

valid frigate
#

you should be sending a string? mmLol

earnest phoenix
#

^

valid frigate
#

did that solve it

earnest phoenix
#

@delicate zephyr

    res.write(JSON.stringify(gu))
    res.end()

same error.

#

Nope.

valid frigate
#

damn

earnest phoenix
#

ahhhh.

#

Can't

valid frigate
#

not express?

earnest phoenix
#

I have like 3000 lines of codes with this module

#

converting it is gonna be a pain

valid frigate
#

weird

earnest phoenix
valid frigate
#

yikes

#

what are you making btw

delicate zephyr
#

why not just convert the object to a string when its recieved

earnest phoenix
#

Webserver linked with a bot process

#

That's what JSON.stringify does, @delicate zephyr

#

Wait

#

Wdym

delicate zephyr
#

so on the modules side

#

Instead of requiring an object

#

just convert the object when its received by the module

earnest phoenix
#

Hmm.

#

God even this is causing an error

delicate zephyr
#

have you thought that maybe its the modules side then

earnest phoenix
#

Can't be

#

All the other thousand functions are working as expected

#

module is good

delicate zephyr
#

try

#
 res.write(JSON.stringify(gu), 'utf-8', (err) => {
    if(err) throw err;
    res.end();
})```
earnest phoenix
#

Bruh

delicate zephyr
#

what

earnest phoenix
#

this

#

stupid

#

node

#

i created an empty line

#

right after .write and before .end

#

and guess what worked,

delicate zephyr
#

uh

earnest phoenix
#

?

delicate zephyr
#

thats because res.write gives a callback on finish

earnest phoenix
#

But that shouldn't be the problem

delicate zephyr
#

Yes

#

it will be

#

if you end it before it finishes

earnest phoenix
#

But if you end it before it finishes

delicate zephyr
#

it'll not have sent the data

#

therefore

#

not sending a string

#

therefore

#

erroring

earnest phoenix
#

If you end it before it finishes,

#

this would be the error

#

not the error I faced just now

delicate zephyr
#

code execution

#

write after send just means end was call and then write was

#

if write was called but the end was executed before it finished sending

#

it didnt get any data through and was closed too quickly

#

data is undefined

earnest phoenix
#

I don't think undefined is considered an object

#

Hm

delicate zephyr
#

wait

#

cant you do

#

res.write().then()

earnest phoenix
#

Yeah

delicate zephyr
#

Bruh

earnest phoenix
#

or var result = await res.write()

delicate zephyr
#

bet that would have fixed it too

earnest phoenix
#

I'm gonna try it

delicate zephyr
#

without a new line

earnest phoenix
#

Nvm, I can't recreate it

#

uh that's weird.

#

But yeah, yours probably works aswell

#

weird, it's working without a newline

delicate zephyr
#

js and code execution is like python and its module system

#

shit

west spoke
#

import x as y

#

AHAHA

#

that... wow

#

Oh

#

Wrong message

earnest phoenix
#

yes, star +1

delicate zephyr
#

I can make it better

west spoke
#

Yeah

earnest phoenix
#

@delicate zephyr Problem came back and your solution didn't help t_t

delicate zephyr
#

yikes

#

add a new line

earnest phoenix
#

Didn't work either

#

uhhhh

delicate zephyr
#

add 13

earnest phoenix
#

Lmao

delicate zephyr
#

what

earnest phoenix
#

Oh I thought you were joking with the add 13

delicate zephyr
#

i kinda was

#

and kinda wasnt

earnest phoenix
#

It worked when I commented this line...

#

// gu["html"] = html;

delicate zephyr
#

heh

earnest phoenix
#

The hell

#

html = "<font>"

#

that's all

delicate zephyr
#

¯_(ツ)_/¯

earnest phoenix
#

how to use glitch to keep my bot "alive" all the time?

valid frigate
#

dont use glitch

west spoke
#

step 1: dont use glitch

valid frigate
#

ez

west spoke
#

step 2: get a vps

earnest phoenix
#

than what should i use thats FREE

west spoke
#

step 3: the vps will keep it online

valid frigate
#

you cant get anything free

west spoke
#

^

#

glitch is a bad way to host. It's not meant for bots

earnest phoenix
#

oh ok

west spoke
#

It's meant for deploying websites and webhooks I believe

#

mostly

valid frigate
#

glitch is a testing environment

west spoke
#

^

valid frigate
#

not meant to serve applications

west spoke
#

^^

earnest phoenix
#

alright

west spoke
#

Anyways

#

Popular VPS in pins

#

most are fairly cheap for a decent cpu, and storage

earnest phoenix
#

cheapest price to performance i know is pulsheberg

#

lovethem

faint bridge
#

is there some1 who can help me to get my bot running on OVH vps?

faint bridge
#

@amber fractal you had a bot there. So could you help me or tell if you found a tutorial or smth. Since i cant seem to find any tutuorials online

dusky marsh
#

you start the bot the same youd start it in another command line

#

you can ssh into your vps and set it up from there

faint bridge
#

yeah i just need to figure out how to get the files

dusky marsh
#

the files for your bot?

#

use git

faint bridge
#

github?

dusky marsh
#

well you can use github yes, you just need somewhere to host the files and then you can git pull on your vps

#

so any git repository will do just dont make it public with your token and stuff 😛

faint bridge
#

ok ill see how

earnest phoenix
#

if you want to upload your files without git you can just use sftp

#

once you have node installed on the vps make sure your running a version node 10 or higher with node -v

#

then do npm i pm2 -g

#

that will install pm2, a process manager that is amazing

#

navigate to your uploaded bot

faint bridge
#

ill try

earnest phoenix
#

run pm2 start app.js

true basin
#

Anyone know how to connect Filazilla to a droplet?

earnest phoenix
#

@weary lark

weary lark
#

try removing the comments like /* The image used */ and stuff

#

@earnest phoenix

earnest phoenix
#

ok

#

@weary lark after removing problem still same

weary lark
#

show code

earnest phoenix
#

dm

true basin
#

Any recommendations for where I can get database hosting?

earnest phoenix
#

aws

true basin
#

Digital Ocean offers $15/m

earnest phoenix
#

any vps will do

#

oh you want managed dbs?

#

but why

#

it's so much more expensive for something you could code in 10 minutes

true basin
#

Not sure, still looking into it

weary lark
#

There's some good vps services in pinned which I think majority can handle db hosting

earnest phoenix
#

managed dbs are mostly for businesses who don't want to bother with setting up the database server

true basin
#

How easy is it to set one up then? As I have no experience with them.

#

Also, if ya'll have recommendations?

#

One person recommended Mongodb.com, but it's a non-relational database.

earnest phoenix
#

postgres

silk kestrel
#

hey

#

C# is a compiled language

earnest phoenix
#

yes

#

it's not compiled straight to asm though

#

it's compiled to IL first

silk kestrel
#

i know

true basin
#

What about SQLite?

earnest phoenix
#

sqlite is local

mossy vine
#

mongodb is pretty easy to use and has good performance

weary lark
#

i use rethinkdb

#

the db you use varies the type of bot/app you're making and what uses it needs and stuff like that

slender thistle
#

I heard PostgreSQL has fairly descent performance?

ornate shoal
#

Yeah PostgreSQL is a good db too

#

there are quite a few good options, but it really depends on what you want to make and do with it

earnest phoenix
#

postgres is basically mysql without oracle and with features you wish mysql had

#

which is why i love it so much

#

it's really performant

true basin
#

It'll be a bot that deals with an extensive workload

slender thistle
#

Is it worth migrating to PostgreSQL from mongo? 02lul

earnest phoenix
#

mongo is just glorified json

#

so yes

ornate shoal
#

hey, mongo isn't that bad.. altho i'd personally prefer postgres tho

slender thistle
ornate shoal
#

if you have a lot of time series data you can also use the timescale extension for postgres

true basin
#

Why postgres?

ornate shoal
#

because its a great sql database thats fast, well optimized, well supported and has good functionality

true basin
#

I'm currently leaning towards SQLite, I'm avoiding a non-relational database and it seems I'm also avoiding a managed database due to cost.

ornate shoal
#

SQLite is probably the easiest to set up and good for small to medium workloads

earnest phoenix
#

but it's also local, meaning you can't manually access it through a server

#

you have to make an interpreter which will communicate with the file

true basin
#

Is that regarding SQLite @earnest phoenix?

earnest phoenix
#

yes

ornate shoal
#

^ depends on what language/framework you're using, for .NET you can just simply install a package and you're done

true basin
#

hmm

#

So, Postgres is a similar kind of database, instead of being embedded into the program and writing to a file, it's an entity separate from the program that writes data more efficiently?

#

Whilst SQLite is embedded?

#

Python has a nice library for dealing with SQLite, so I'm leaning towards that but I need to make sure I'm making an educated decision.

earnest phoenix
#

if you're going for a large scale database, avoid sqlite

#

if it's small scale, sqlite is perfect for that

true basin
#

hm

green kestrel
#

when i connect my bot, the only member i get in each guild is the bot itself. how do i resolve this?

#

its going to be something simple, im sure

sinful lotus
#

dont forget mariadb

#

mariadb is really performat as well

quartz kindle
#

@green kestrel that is also a side effect of disabling guild subscriptions

green kestrel
#

ah. 😦

#

damned if i do, damned if i dont.

quartz kindle
#

that is why no library is even offering that option yet

#

because it screws up with almost everything

#

on the other hand, its perfect for my needs

green kestrel
#

ah

#

i think i'll leave subscriptions on for now until i can make my own lib

quartz kindle
#

yeah thats also an option

#

i stuck with modifying discord.js because i dont wanna bother having to handle the websocket connection and rate limits

violet dagger
#

wait what are guild subscriptions @quartz kindle

green kestrel
#

do embeds have a maximum length?

#

says 6000 in the api docs

#

field value 1024 chars, ah, i see my problem

quartz kindle
violet dagger
#

o h ok

#

ic

quartz kindle
#

supposed to opt-out of receiving typing and presence packets, but at the moment it also affects many other things

#

such as member add/remove packets and member lists in guild packets

violet dagger
#

ah i catch you now

green kestrel
#

hmmm

#

well, this thing ive made is going to be quite memory intensive.

#

i wanted to select a random user in a guild

#

seems that the only option i have, without having a cache of just ids, is to convert the entire cached user list into an array and slice it at a random point. stupid library.

quartz kindle
#

rip

#

well, memory isnt really a problem until you get into thousands of guilds

green kestrel
#

is identify the only place to enable and disable guidl_subscriptions?

#

guild*

rocky gale
#

I want to take all but one of the roles the user has. how can i do it?

#

Is there any that can help?

quartz kindle
#

@green kestrel yes

#

you'd have to disconnect and re-login to change it

green kestrel
#

@rocky gale loop through them and remove all but the id of the one you want to keep, calling remove on each?

rocky gale
#

@green kestrel I don't want to keep the process that long, but

green kestrel
#

isnt there a 'remove all roles' method?

#

if there is you can call that and then add back the other

#

im pretty sure there isnt such a method, though

rocky gale
#

but there is a problem

#

Nitro boost role 😄

slender thistle
#

Yeah that's a no chief

#

You can only delete the booster role from the server

solemn harness
#

hi

#
 if(cmd === `${prefix}serverinfo`){
        let sEmbed = new Discord.RichEmbed()
        .setColour(colours.cyan)
        .setTitle("Server Info")
        .setThumbnail(`message.guild.iconURL`)
        .setAuthor(`${message.guild.name} Info`, message.guild.iconURL)
        .addField("**Guild Name:**", `${message.guild.name}`, true)
        .addField("**Guild Owner:**", `${message.guild.owner}`, true)
        .addField("**Member Count:**", `${message.guild.memberCount}`, true)
        .addField("**Role Count:**", `${message.guild.size}`, true)
        .setFooter(`JavaBot | Footer`, bot.user.displayAvatarURL);
        message.channel.send({embed: sEmbed});
    }
#

why this is not working

mossy vine
#

any errors?

solemn harness
#

yea

#

no

#

but the bot bot is not responding

#

when i test this

#

is this correct?

quartz kindle
#

i dont think message.guild.size is correct

#

but that wouldnt cause it to fail

#

console.log(cmd) before the IF

#

to make sure it contains what you expect

solemn harness
#

ok

rocky gale
#

@slender thistle no, instead of deleting the role, I want to get other roles that the user has that role.

#
const otherRoles = msg.guild.roles.map(g => g.id != role.id ? g.name : "").join(", ");
#

can we distinguish this way?

solemn harness
#

is there any problem with using cmd not command

#

it doesn't cause any error

#

@quartz kindle

#

the bot is not listening

mossy vine
#

is your code on github

solemn harness
#

no

#

should i upload it

green kestrel
#

its possible to send an embed via direct message to a user, yes?

#

the library im using lacks it, im thinking its just an 'embed' property needs adding

slender thistle
#

An embed is an embed

#

yes it is possible

quartz kindle
#

@solemn harness did you put the console.log before the if? did anything show up?

#

of not, show the rest of your code

solemn harness
#

ok

#

this doesnot cause any erroe

quartz kindle
#

its not supposed to cause errors

solemn harness
#

ok

#

so i show my code

#

right?

green kestrel
#

@solemn harness please dont DM me, first im no expert and second if i was to help, nobody else here could benefit from the answer.

#

@slender thistle i fixed it, the User::sendMessage method was missing the $embed parameter and not passing it through to the promise. i basically copied the code from the one for Channel::sendMessage and it works fine. thanks!

slender thistle
green kestrel
#

by the time im finished this unsupported obsolete library won't be obsolete any more, and it will be unrecognisable.

late hill
#
.setThumbnail(`message.guild.iconURL`)

is also a problem @solemn harness

earnest phoenix
#

lul

late hill
#

But I doubt that's why it doesn't send without any errors

tranquil drum
#

Ya where is cmd defined

heady lichen
#

Hey how can i host simple peice of coding ||( no cmds just logs and status updates for my minecraft server)|| in discord.py on vps

quartz kindle
#

Get a vps, login via ssh, install python, install discord.py, code it, run it

heady lichen
#

I have done coding stored in git

#

And wrote to instal py

#

In heroku but demanding an cmd as dyno but my coding diesnt have any cmd to run @quartz kindle

quartz kindle
#

What

heady lichen
west spoke
#

@heady lichen there is a minecraft plugin for it

#

that sends chatfeed to a channel

heady lichen
#

Yup

#

With minetools api

west spoke
#

You can likely configure it to send command logs too

green kestrel
#

im really surprised at how many people come here just wanting random bot help with someone elses bot theyve just deployed somewhere.

west spoke
#

since as long as the mc server is online, the bot will be too.

split gulch
#

Hello, I am just a fellow gamer

#

Is anyone else a fellow gamer?

west spoke
#

wrong channel

earnest phoenix
quartz kindle
#

You could probably just have minecraft send webhooks and ditch the bot entirely

earnest phoenix
#

lul

#

technicially right but

heady lichen
#

How to deploy this coding in an 24/7 free vps can somebody suggest

earnest phoenix
#

with jda as mc plugins r coded in java

west spoke
#

No good vps is free @heady lichen

#

you can research on how to host a bot through your server, though.

split gulch
#

(U killed the moment, I shall now cry in a corner)

#

Wait

#

Ohhhhhh

west spoke
split gulch
#

I'm in Discord bot list

earnest phoenix
#

bro

split gulch
#

I didn't know

#

Sorry

quartz kindle
#

Does python support installing packages fron github like npm does?

earnest phoenix
#

i think?

#

idk tho bc i dont use

quartz kindle
#

Same

west spoke
#

Yeah it does

quartz kindle
#

But basically thats what you need @heady lichen

west spoke
#

I dont remember exactly, but you can

slender thistle
#

@quartz kindle pip supports that

west spoke
#

pip install -G?

quartz kindle
#

Yeah so tell fan_k to do that

slender thistle
#

pip install git+<repo_url>

west spoke
#

ah

#

@heady lichen

slender thistle
#

Except Heroku won't support that, will it?

west spoke
#

it might

#

I mean you would just add it before the url

#

wouldnt you?

slender thistle
#

Not that

quartz kindle
#

Does heroku support python at all?

slender thistle
#

Yup

#

Looks like pip will actually work

green kestrel
#

can fields themselves contain another embed?

#

if the answer's yes then that really puts things down the rabbit hole 🙂

slender thistle
#

An embed can't contain another embed chadthonk

earnest phoenix
#

no

green kestrel
#

thats a shame for me 😛

#

i have a rather complex help response where it would be a fitting solution

#

been working on enhancing a simple search/replace macro language in my bot's responses

#

its simple enough to understand but needs a fair bit of docs, perhaps im moving into somewhere that needs a website, not help DM responses...

west spoke
#

What were you needing @earnest phoenix ?

green kestrel
#

anyone here want to test out my bot to check ive not done something fundamentally wrong and cant see the wood for the trees? i'd be willing to do the same for your bot if needed at some point.

earnest phoenix
#

@green kestrel im kinda bored rn, so Ill do it

#

do you have a test server or smthn?

#

just dm me

green kestrel
#

ok

warm marsh
#

What methods can be used for oAuth? JavaScript preferable.

#

Discord OAuth.