#development

1 messages ยท Page 1845 of 1

shell crest
#

error*

#

even though its a command

#
class config(commands.Cog):
  def __init__(self, client):
    self.client = client

  def write(self, file, data):
    with open(os.path.dirname(__file__) + f'\\..\\json\\{file}.json','w') as f:
      json.dump(data, f, indent=4)

  def cmdCheck(self, cmd, guild):
    with open(os.path.dirname(__file__) + f'\\..\\json\\data.json','r+') as f:
      data=json.load(f)
      if cmd not in data[str(guild.id)]:
          return True
      return False

  @commands.command()
  async def test(self, ctx):
    await ctx.send(
      "test",
      components = [
          Button(style=ButtonStyle.grey, label="EMOJI", emoji="๐Ÿ˜‚"),
          Button(style=ButtonStyle.green, label="GREEN"),
          Button(style=ButtonStyle.red, label="RED"),
          Button(style=ButtonStyle.grey, label="GREY", disabled=True)
      ],
    )
    while True:
        interaction = await self.client.wait_for("button_click")
        await interaction.respond(content=f"{interaction.component.label} clicked!")
#

this is my code

#

its a cog

#

and im trying the new discord components

#

please ping me if you know

sudden geyser
#

@shell crest that shows a command with the name test, not bruh.

#

By the way, you could reduce

if cmd not in data[str(guild.id)]:
  return True
return False

to

return cmd not in data[str(guild.id)]
shell crest
#

oh thanks!

signal estuary
#

How do I get a list of guilds the user is in?
I have the guild scope enabled in the oAuth2
But it returns undefined when doing this:

        fetch("https://discord.com/api/users/@me/guilds", {
          headers: {
            authorization: `${tokenType} ${accessToken}`,
          },
        })
          .then((result) => result.json())
          .then((response) => {
            const { guild } = response;
            document.getElementById(
              "server"
            ).innerText += `Server ${guild}`;
          })
          .catch(console.error);

guild = undefined

shell crest
#

Oh wait it still gives me the error

#

even though I used the right command

#

I'm sure I have everything right but its not working...

#

My command isnt registering

boreal iron
signal estuary
#

I am talking about oAuth2 with the bot and how I get the guilds of the user who authorized

boreal iron
#

You're listing guilds your bot is in and add them to the element "server" on your site.

pale vessel
#

What are you on about lol

pale vessel
#

Only the authorized user could see it

signal estuary
boreal iron
pale vessel
signal estuary
#

its an array

#

but guild is undefined

const { guild } = response;
pale vessel
#

There's no guild property in the array prototype

signal estuary
pale vessel
#

array.guild doesn't exist

#

It's an array, you'd want to loop through it instead

#

Or perhaps you mean [guild] = response? That would be the first guild response[0]

signal estuary
#
            let guild = response.forEach(element => {
                console.log(element)
            });

I did this and this works

quartz kindle
#

that will make guild undefined

signal estuary
quartz kindle
#

then get rid of guild

#

just do response.forEach()

boreal iron
#

lol now I see what he was trying to do

#

const { guild } = response;

#

should get a loop

signal estuary
#

yes yes my shit logic I know xD

boreal iron
#
for(const guild of response)
{
   document.getElementById("server").innerText += `Server ${guild}`;
}
#

const { guild } = response;

signal estuary
#

I got it

            let guild = "";
            response.forEach((res) => {
              guild += " " + res.name;
            });
boreal iron
#

If you have an array then loop through it

#

without using forEach

signal estuary
quartz kindle
signal estuary
#

thank you that you exist :P

quartz kindle
#

Lol

boreal iron
#

wtf didn't I post the solution already, did I?

signal estuary
boreal iron
signal estuary
low bone
#

i suggest using ejs if u use express

signal estuary
low bone
#

and pass to it that guilds list

signal estuary
#

first I have to google what ejs is

signal estuary
low bone
#

.<

#

you need to make express, render index.ejs when someone access profile.html

#

using

app.get("/profile.html",(req,res)=>{
...
res.render("index",{guilds})
})

where guilds is the list u got from api

wheat mesa
#

@scenic kelp

solemn latch
#

is that just whats returned when receiving an embed? like discords ext urls?

quartz kindle
#

pretty sure yeah

#

its like a secondary backup url

summer torrent
#

@earnest phoenix

earnest phoenix
summer torrent
solemn latch
#

yeah thought so. so devs realistically wont need it

summer torrent
#

yeah

#

thats "proxy"

split hazel
#

would be cool if interactions had that

#

a backup endpoint that returns custom errors

#

or something

rocky hearth
#

When there is will, there's is way

type OptionalOnly<T> = {
    [K in keyof T as {} extends Pick<T, K> ? K : never]: T[K] 
}

type Foo = {
    a: string;
    b?: number
}
type Bar = OptionalOnly<Foo>
//   ^? - type Bar = {
//       b?: number | undefined;
//   }
sage bobcat
errant flax
#

can u hide a .gitignore file vvGFXRT_flushedspin

earnest phoenix
#

What's the point

#

And hide it how

#

And from what/who

proper bolt
#

what

#

lol

earnest phoenix
#

The whole point of a gitignore file is to prevent things from being pushed to GitHub why would you wanna hide it

wheat mesa
#

.gitignore the gitignore mmulu

earnest phoenix
#

Oh no

next eagle
#

Hey all wave_DV

#

Anyone knows how to send global announcement to all the servers?

#

I am planning on updating the bot and thus wanna send Release Notes in form of an announcement

#

So is there any way to do so>

summer torrent
#

no

#

don't do that

#

it is api spam

earnest phoenix
#

If anything make a change log command or just upload a change log to a GitHub repo

next eagle
next eagle
summer torrent
#

sending message to "all servers" is api spam

earnest phoenix
#

hi

dense flame
#

hi

earnest phoenix
#

so like

dense flame
#

context?

earnest phoenix
#

Cosmic knows python?

dense flame
#

I do know a bit

earnest phoenix
#

like uh

#

its not the code

#

all the commands woerk

dense flame
#

simple classes and functions

earnest phoenix
#

on all my servers ive tried it on

#

but the command promt thing

#

keeps telling me "does not have permissions" or something

dense flame
#

when does it happen?

earnest phoenix
#

it only did this after it got varafied by top.gg

earnest phoenix
dense flame
#

Hm

earnest phoenix
#

Probably cause it doesn't have permissions in that server

dense flame
#

yea

earnest phoenix
#

yeah I was gunna say that

#

but how do I like

#

It could be because the bot is lower then the user

dense flame
#

could be

earnest phoenix
#

fix that

#

Idk but that's typically the issue

dense flame
#

if the bot doesnt have permission then return nothing

earnest phoenix
#

idk how to do permission check

#

also my code is mainl

#

It an embed stating so that way people don't get confused why it's not working

#

if : if : if : if : if : if : if : if : if : if : if : if : if : if :

#

so like

dense flame
#

i'll look it up

earnest phoenix
#

its a bit embaracing

#

Idk python so gl

#

oh

#

well an example of it in c# would be

#

if{}if{}if{}if{}if{}if{}if{}if{}if{}if{}if{}

#

in lua

#

if then if then if then if then if then if then if then if then if then if then if then

#

etc

#

im not using tables

#

or switches

#

or anything

dense flame
#

are you using discord.ext?

earnest phoenix
#

I don't know why youd use that many if statements

earnest phoenix
earnest phoenix
dense flame
#

in javascript its very simple to check the bot's permission

dense flame
#

you dont have this?

earnest phoenix
#

let me check

earnest phoenix
#

there import discord

dense flame
#

oh you dont have it then

#

yea I have no idea how to do it without discord.ext

slender thistle
#

@earnest phoenix which command do you have issues with?

earnest phoenix
#

I don't have isues with any

#

all my commands work

#

but the bot randmonly gets errors saying "does not have permsssion"

#

just randomly

slender thistle
#

Next time you get that error can you post the full traceback?

#

Stacktrace rather

dense flame
#

most likely it occurs when a command that requires a certain permission is not given to the bot

slender thistle
#

Might have something to do with the bot not having permission to send messages lol

dense flame
#

oh yea that too

small tangle
#

Hey everyone,
I have a part of my command here and wonder if I could implement this more elegantly. e.g. if I change 5 values of a db entry in a command, I would have to make a call 5 times for each specific field, is there a better way?
e.g. (so im in java)

//Balance changed
user.getInventory().setCurrency(-price);
// Inventory changed
user.getInventory().setItem(item.getName(SINGULAR), amount);
//other possible properties changed...
user.get()...
humble rock
#

why the thumbnail doesn't work

#

(discord.js v12)

earnest phoenix
#

hey

dense flame
#

hey

next eagle
earnest phoenix
#

so uhm where do i start

next eagle
earnest phoenix
earnest phoenix
next eagle
#

Cuz the channel create command is different in v12 and 13

next eagle
earnest phoenix
#

uhm i'm really really sorry but i don't know about what you're talking about yet, like i said im new so ://

humble rock
earnest phoenix
#

sorry i haven't learned that much

earnest phoenix
next eagle
earnest phoenix
#

ill talk to you guys frankly, i don't know sooo many basic things about bot developing yet, i just started like a week ago

next eagle
#

This is the version

#

like that

earnest phoenix
#

i already have a bot and has running commands

next eagle
#

wow cool

earnest phoenix
#

yea yea

#

ty

next eagle
#

wlcm :))

dense flame
#

I see

earnest phoenix
#

@dense flame sorry but is this what you mean?

#

wait

#

oh

#

im in console

wary flame
#

Type it in the shell tab

dense flame
#

you can simply do js message.guild.createChannel('channel_name', 'text')

earnest phoenix
#

dont mind the name

dense flame
#

to create a text channel

dense flame
earnest phoenix
#

lemme make a file

earnest phoenix
dense flame
#

oh you will need a setInterval for that

#

so your bot wont get ratelimited

earnest phoenix
#

hold on

#

i have this starting code

#

in every file

dense flame
#

mhm

earnest phoenix
#

do i copy it and do it on the file where the create channel is for?

#

as well

dense flame
#

sure

earnest phoenix
#

oh alright

#

alright so after that

#

im really sorry to bother your time cosmic

dense flame
#

you're missing brackets

earnest phoenix
#

oh yea

#

wait

earnest phoenix
dense flame
#

add your execute

#

or run

earnest phoenix
#

yea its good in console

dense flame
#

I meant you parameters

earnest phoenix
#

pardon but.. cry

dense flame
#

yk like execute(message, client, etc)

#

or if its run in your case

earnest phoenix
#

oh

dense flame
#

no not that

#

go to your other command files

earnest phoenix
#

did u mean like

#
message.channel.send(i dont know what to put in here tbh)
dense flame
#

like the serverinfo file

earnest phoenix
dense flame
#

yea there

#

you see line 7

#

you need that too on the other command file

earnest phoenix
#

oh

#

async run

#

so i just copy it?

dense flame
#

in any other commands honestly

#

yes

earnest phoenix
#

alright wait

#

ok now what

dense flame
#

so you wanted 10 channels in one command?

#

or just a single custon one

earnest phoenix
#

I wonder
What if you need to change smth about your command handler
How would you edit all your command files?

#

i want it to be more than 10 actually

#

i wanna test some things

#

just like to explore more about it

dense flame
#

well that will get your bot ratelimited

earnest phoenix
#

alright lets say

#

10

#

ok so

#

what do we do

earnest phoenix
#

also i asked my friend

#

about it

#

he said i can find it on docs

#

which he means here

dense flame
#

alright then

earnest phoenix
#

but i dont know which part

#

im bad at research

wary flame
earnest phoenix
#

copy that cmd

dense flame
#

yea you can

earnest phoenix
#

then im all good?

dense flame
#

yup

earnest phoenix
#

did u mean this? LMAO

dense flame
#

then you can just add a message that says its done

dense flame
earnest phoenix
#

ohhhhhhh

dense flame
#

you're missing another bracket btw

wary flame
earnest phoenix
#

yea ok after that

dense flame
#

then ig you're done

earnest phoenix
#

which part did i miss the brackets

#

oh

#

async

dense flame
#

last

#

line

#

closing bracket

earnest phoenix
wary flame
#

@earnest phoenix your run func is not in the exports

dense flame
#

he's just missing a bracket

earnest phoenix
#

@dense flame im sorry to ask but can u specify which area i need to put brackets

dense flame
#

can you show your code again

earnest phoenix
dense flame
#

line 21

#

and remove line 6

earnest phoenix
#

ahat do i do with line 21

#

how many brackets

dense flame
#

add a closing bracket

#

just one

earnest phoenix
#

2 brackets in line 21?

dense flame
#

simply transfer line 6 to line 21

earnest phoenix
#

oh

dense flame
#

no just one

earnest phoenix
#

yes

#

should work now

#

kk lemme test

#

wait

dense flame
#

dont put space between run and ()

earnest phoenix
#

whitespace doesn't matter

#

my friend sent me this code

#
for (var i = 0; i < 20; i++) {
   message.guild.channels.create("name", { type: "text" })
}
#

is that also a good one?

#

That is just replit being dumb

#

The program should run fine

lethal trout
#

I want to ask about how would i check what option the user selected like
if(option.selection == first_option){}
elseif(option.selection = 2nd_option){}
how do we check that

earnest phoenix
#

use a switch

earnest phoenix
#

they are using javascript

#

dictionaries don't exist

earnest phoenix
#

that's just more steps than a switch

#

much more organized than switch

#

u need an object and a single if statement

#

it worked

earnest phoenix
#

thanks for the help @dense flame

radiant kraken
earnest phoenix
#

and use a loop @earnest phoenix

earnest phoenix
dense flame
earnest phoenix
eternal osprey
#
client.on('messageReactionAdd', async (reaction, user) => {
    if (reaction.emoji.name === "๐Ÿ˜€" && user.id !== client.user.id) {```
how do i add a role to the user that reacts to the emoji? Isn't it like user.roles.add?
earnest phoenix
signal estuary
#

I want to use the client object in an index.ejs file. I already exported the client object to the app.js file where the webserver is started:

module.exports = async (client) => {}
res.render('index.ejs', { client });

How can I use the client object so I have access to the client?

eternal osprey
#

Isn't it like: client.users.fetch(user.id)?

earnest phoenix
pale vessel
#

you can't catch an ordinary method

hasty mulch
#

In Python, if I don't put in overwrites when creating a text channel, does it sync with the category's permissions?

pale vessel
#

client.user.username?

signal estuary
signal estuary
#

Index.js where the bot is:

require("./app.js")(client)

App.js, where the web server is started:

module.exports = async (client) => {
    res.render('index.ejs', { client: client });
}

index.ejs:

<p>Client username : <%= client.user.username %></p>

This works fine and the output is "Client user: [username]"

But when I use the client in javascript with
<script></script> it says client = undefined.
So how can I define the client to use it as a normal object?

earnest phoenix
#

@signal estuary a nodejs object most likely wont work in the browser and vice versa

hasty mulch
# pale vessel `client.user.username`?

Got it, but now I'm getting this error:

Ignoring exception in command create:
Traceback (most recent call last):
  File "C:\Users\###\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "D:\Room_Sealer_V2\cogs\room-sealer-admin.py", line 328, in _create
    await ctx.guild.create_text_channel(member.name, overwrites=overwrites, category=category, reason="Auto generated from command")
  File "C:\Users\###\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 948, in create_text_channel
    data = await self._create_channel(name, overwrites, ChannelType.text, category, reason=reason, **options)
  File "C:\Users\###\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 844, in _create_channel
    'id': target.id
AttributeError: 'NoneType' object has no attribute 'id'

Code:

@commands.command(name='create')
    @commands.has_permissions(manage_guild=True)
    async def _create(self, ctx, member: discord.Member):
        overwrites = {
            ctx.guild.default_role: discord.PermissionOverwrite(view_channel=False)
            ctx.guild.get_member(member): discord.PermissionOverwrite(send_messages=True,attach_files=True,embed_links=True),
            ctx.guild.get_member(431544605209788416): discord.PermissionOverwrite(view_channel=True,send_messages=True,manage_webhooks=False)
        }
        category = ctx.guild.get_channel(876423058825564181)

        await ctx.guild.create_text_channel(member.name, overwrites=overwrites, category=category, reason="Auto generated from command")
        pass
earnest phoenix
quartz kindle
#

that wont work either, you need to serialize it

#
<script>
const client_side_variable = <%= JSON.stringify(some serializable object from the server here) %>
</script>
worthy ivy
#

hi! does anyone know any simple like

#

pagination stuff in js

#

im developing a music bot right now and im on the queue list system, wanted to make a pagination system so you can browse thru the songs

#

right now, the queue list can only show 10 songs at once

quartz kindle
#

make one with buttons

worthy ivy
quartz kindle
#

there are many ways

worthy ivy
#

right now, i have this code

            const embed = new Discord.MessageEmbed()
            .setTitle(`Current Queue for ${message.guild.name}`)
            .setDescription(`${queue.songs.map( (song, id) => `**${id ? id : 'Playing'}**. ${song.name} - \`${song.formattedDuration}\``,).splice(0, 10).join('\n')}`)

            message.channel.send({embeds: [embed]})
#

get the queue then turn into songs, get the name and duration of the songs

#

then .splice them to show only 10 at once

#

so does anyone know how to have like

#

a simple pagination with this?

quartz kindle
#

for example, you can send it like that

#

then add a prev/next button

#

and use awaitMessageComponents

worthy ivy
quartz kindle
#

then on click, check if the prev or next button was clicked

#

and advance or reduce your splice indexes by 10

#

then edit the message

#

you can also do it with a messageComponentCollector

#

might be better

worthy ivy
#

probably just gonna use await message components

quartz kindle
#

you can also make it stateless and use the interaction event

#

by putting the queue id in the buttons

worthy ivy
#

wdym by putting the queue id?

quartz kindle
#

buttons have a custom_id field

worthy ivy
#

yeah that

quartz kindle
#

you can put anything on it, and you'll get it when you receive the button interaction

#

so for example

#

you can send 2 buttons, next and prev. next has in its custom id the queue id and the next slice indexes

#

the prev button has the same queue id but the previous indexes

#

on interaction, you get the queue id from the button, load the list from your queues, slice it by the indexes from the button, and edit the message from the button

signal estuary
#

Do you know how I can filter the server I get to the server you have mutual / sharing with the bot?

        fetch("https://discord.com/api/users/@me/guilds", {
          headers: {
            authorization: `${tokenType} ${accessToken}`,
          },
        })
          .then((result) => result.json())
          .then((response) => {
            console.log(response);
            let guild = response.map((g) => g.name).join(" \n ");
            document.getElementById("server").innerText += `Server ${guild}`;
          })
          .catch(console.error);
      };
quartz kindle
#

if thats using the user token by oauth2, you can filter the guilds by whether they exist in your client

#

eg: response.filter(g => client.guilds.cache.has(g.id))

earnest phoenix
#

Hello

modest maple
#

@drowsy crag

#

oh

#

oops

solemn latch
#

๐Ÿ‘€ hi nom

willow mirage
#

what it was called the ? : thingy?

#

i forogt smh

dense flame
#

if else

wooden kindle
#

Any2 know any open source discord bots that have a help command with buttons because cba learning anymore itโ€™s to hard

modest maple
#

Perfect definition of how not to make a good bot lmao

wooden kindle
#

Not even that

#

Itโ€™s just I donโ€™t understand a fooking thing Iโ€™ve seen on YT or google

next eagle
#

I was watching the Videos by FreeCodeCamp at first

wooden kindle
#

Can u send a link plz

next eagle
#

But They suxked ๐Ÿ˜ฆ
Their rest of the videos were pure class but the one of discord bot was totally bad

next eagle
wooden kindle
#

Oh

next eagle
#

But I can send CodeLyon's Videos if you want

wooden kindle
#

Because I wanna have buttons but I donโ€™t understand it

next eagle
#

I followed them only

next eagle
#

I thought you asking about discord.js beginners

cinder stratus
#

No one is going to write code for you

solemn latch
#

theres a whole section on buttons there which seems to break it down real to the basics.

wooden kindle
#

I want something like this

cinder stratus
#

That's pagination

#

And it's not really hard

#

It's kind of same as using reactions

#

But you use buttons

summer torrent
wooden kindle
#

Alr bet

#

Do u have any YT vibes

#

Vids

solemn latch
#

yt videos are a bad way to learn about djs imo ๐Ÿ‘€

summer torrent
#

Why don't you search yourself?

summer torrent
#

instead of asking us

solemn latch
wooden kindle
summer torrent
#

discordjs.guide is the best guide

next eagle
summer torrent
wooden kindle
#

Only good for one website and one website only ๐Ÿ˜‰

summer torrent
#

I don't think you live in car

wooden kindle
boreal iron
#

Regarding global commands...

Discord docs:

To create commands in a guild, your app must be authorized with the applications.commands scope.
In order to make commands work within a guild, the guild must authorize your application with the applications.commands scope. The bot scope is not enough.

DiscordJS docs:

Global application commands will be available in all the guilds your application has the applications.commands scope authorized, as well as in DMs.

There's no word about global commands need the applications.commands in guilds to show up in the Discord dev docs.
They should slowly fan out if a guild has added the bot, shouldn't they?
wtf is actually true?

#

Do I fucking need to wait up to one hour after a guild added the bot until the slash commands appear?

digital ibex
#

no

#

u need to wait 1 hour the first ever time u add a command (its not 1h per cmd)

pale vessel
#

You need the scope

#

Even for global commands

digital ibex
#

u send ur commands to discord and they store it in their db, it takes 1 hour

boreal iron
pale vessel
#

They gave the scope to already existing/invited bots but newer bots that get invited need the scope

boreal iron
quartz kindle
#

they said they would possibly do a new scope migration in the future

#

meaning all bots that dont have the scope should get it automatically later on

#

but its a good idea to change your invite link to have both scopes

boreal iron
#

Ah okay, so they just got it for all guilds they already in but still need to require the scope if the guilds adds them.

quartz kindle
#

ye

boreal iron
#

Wow I guess lots of bots didn't notice that.

quartz kindle
#

i noticed but didnt bother with it

#

lmao

boreal iron
#

Which means all guilds they got added to before changing their invite link can't use the bot at all

#

If you remain on slash commands only

quartz kindle
#

yeah unless they reinvite

boreal iron
#

wow what a bullshit

#

It should be granted automatically to all existing bots until the feature got rolled out

quartz kindle
#

it already was

#

and they said they would do it again before the intents come next year

boreal iron
#

I mean, still also if the bots get invited to a new guild

#

oh

quartz kindle
#

basically as far as i understand, only a small fraction of servers wont have the scope right now, those who were added after the migration and before the invite link was changed

boreal iron
#

๐Ÿคฆโ€โ™‚๏ธ

quartz kindle
#

the migration was march 25

boreal iron
#

oh really, lol

timid mesa
#

Is there any easy way to get notifications in disc channel when someone votes or leaves a review?

earnest phoenix
earnest phoenix
earnest phoenix
signal estuary
#

How is the API function called to send a message to the bot I can call?

solemn latch
solar cave
#
    cursor = db.cursor()
    sql = f"DELETE FROM main WHERE message_id=?"
    val = (m_id)
    cursor.execute(sql, val)
    db.commit()
    cursor.close()
    db.close()```
m_id = message id

`ValueError: parameters are of unsupported type`

whats the problem?
proper bolt
#

Can you log what m_id is

split hazel
#

is it because val is a tuple

#

i dont know if python would infer you're trying to create a tuple with that

#

oh no execute is supposed to take in a tuple

#

nevermind

split hazel
#

god python is confusing sometimes

#

the convenience and curse of loose types

sudden geyser
#

that's just syntax

#

not strong/weak typing

split hazel
#

but if you had strong typing the compiler would've caught thats not a tuple

#

if the error was also a bit more informative

sudden geyser
woeful pike
#

assuming the library you're using is nice enough to check types for you in runtime instead of pretending it's correct and throwing a random error

sudden geyser
#

either one works

#

though in this case it's the former

solar cave
#

idk why py asks for , XD

split hazel
#

because without one it thinks you're trying to add standard brackets (for example in math operations)

slender thistle
#

Yup

#

the comma implies that there's more than one element in a tuple (). Without it it just ignores them and returns the element within the parentheses because order of operations

pale vessel
#

Can't you also do tuple()?

modest maple
#

well it would have to be a iterable before giving it to tuple()

#

val = foo, also works

tulip ledge
#

Can someone explain this error?

> topazrpgadmin@0.1.0 dev C:\Users\Yarne\Desktop\youtube-react-admin
> cross-env concurrently -k "BROWSER=none npm start" "npm:electron"

[0] SET BROWSER=none npm start exited with code 0
--> Sending SIGTERM to other processes..
[electron] npm run electron exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! topazrpgadmin@0.1.0 dev: `cross-env concurrently -k "SET BROWSER=none npm start" "npm:electron"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the topazrpgadmin@0.1.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Yarne\AppData\Roaming\npm-cache\_logs\2021-08-15T16_59_32_111Z-debug.log
split hazel
tulip ledge
#

There

split hazel
#

doesnt really look useful, could you send the debug log file?

#

and what are you trying to do

tulip ledge
#

I'm trying to run my electron-react app

#
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v14.17.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle topazrpgadmin@0.1.0~predev: topazrpgadmin@0.1.0
6 info lifecycle topazrpgadmin@0.1.0~dev: topazrpgadmin@0.1.0
7 verbose lifecycle topazrpgadmin@0.1.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle topazrpgadmin@0.1.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Yarne\Desktop\youtube-react-admin\node_modules\.bin;C:\Python39\Scripts\;C:\Python39\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Yarne\AppData\Local\Microsoft\WindowsApps;;C:\Users\Yarne\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Yarne\AppData\Roaming\npm
9 verbose lifecycle topazrpgadmin@0.1.0~dev: CWD: C:\Users\Yarne\Desktop\youtube-react-admin
10 silly lifecycle topazrpgadmin@0.1.0~dev: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'cross-env concurrently -k "BROWSER=none npm start" "npm:electron"'
10 silly lifecycle ]
11 silly lifecycle topazrpgadmin@0.1.0~dev: Returned: code: 1  signal: null
12 info lifecycle topazrpgadmin@0.1.0~dev: Failed to exec dev script
13 verbose stack Error: topazrpgadmin@0.1.0 dev: `cross-env concurrently -k "BROWSER=none npm start" "npm:electron"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:375:28)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:375:28)
13 verbose stack     at maybeClose (internal/child_process.js:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid topazrpgadmin@0.1.0
15 verbose cwd C:\Users\Yarne\Desktop\youtube-react-admin
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v14.17.3
19 verbose npm  v6.14.13
20 error code ELIFECYCLE
21 error errno 1
22 error topazrpgadmin@0.1.0 dev: `cross-env concurrently -k "BROWSER=none npm start" "npm:electron"`
22 error Exit status 1
23 error Failed at the topazrpgadmin@0.1.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
quartz kindle
#

show your package.json

tulip ledge
#
{
  "name": "topazrpgadmin",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.11.4",
    "@material-ui/data-grid": "^4.0.0-alpha.29",
    "@material-ui/icons": "^4.11.2",
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "cross-env": "^7.0.3",
    "electron": "^13.1.9",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "recharts": "^2.0.9",
    "web-vitals": "^1.0.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "electron": "npm start && electron .",
    "dev": "cross-env concurrently -k \"BROWSER=none npm start\" \"npm:electron\""
  },
  "main": "src/main.js",
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "concurrently": "^6.2.1",
    "wait-on": "^6.0.0"
  }
}
earnest phoenix
#

I need a giveaway code please

tulip ledge
#

But I need to wait like 3 seconds ish

quartz kindle
#

does your dev script run without npm?

#

if you just run cross-env concurrently ... instead of npm run dev

harsh blade
#

Can anyone point me towards a "sticky role" tutorial please

#

cant find it anywhere

quartz kindle
#

what is a sticky role?

harsh blade
#

Like, when i mute someone, and they rejoin, then they will still have the muterole

#

and their roles will not get reset

quartz kindle
#

you need a database

rose warren
#

You need to store the user id and their roles in a database

#

Then check users joining against the rows in your database.

harsh blade
#

Problem is i know nothing about discord databases

#

only know a bit of sql

wheat mesa
#

Discord... databases...?

harsh blade
#

Yeah

#

idk how to use a db

#

i only work on a db i didnt create it

rose warren
#

It's the same. There's no difference whether it's discord or a website. A database is a database.

harsh blade
#

Alright.

#

So do you guys know any info / tutorial?

rose warren
#

You can use MYSQL, Postgresql etc

quartz kindle
#

or sqlite

#

or even something basic like quick.db

harsh blade
#

Alright

#

ill just ask one of our devs, thanks.

split hazel
quartz kindle
#

lmao

#

its much more limited yes, but its easy to use and okayish for beginners

#

and still better than json :^)

tulip ledge
rose warren
#

Why?

torpid tapir
#

Just wanna ask a simple question

#

Not anything about this

eternal osprey
#

hey i have a little code that sends an email:

#
!email (mail)(subject)(text)``` using this format. I have now set the fields with simple args[0] etc etc properties
#
 const args = message.content.split("\n")
  .map((x) => x.split(/ +/));```
#

how would i make sure that i can have a text and subject that isn't only 1 word long actually?

quartz kindle
#

based on what?

#

new lines?

#

how does the user separate the fields?

eternal osprey
#

it's basically just !email test@hotmail.com hey this is the subject and this is the text

#

which of course is not possible

#

so do you know any way to approach the problem?

quartz kindle
#

you need to separate them somehow

eternal osprey
#

any suggestions?

quartz kindle
#

for example new lines, or ; or something else

eternal osprey
#

if i wanted to split them based on a |, how would i do that?

#

like: !email test@hotmail.com|this is the subject| etc etc

quartz kindle
#

the same way you split anything else

eternal osprey
#

yeah i could split it, but it would split every word in the string right?

quartz kindle
eternal osprey
#

you are hot tim

quartz kindle
#

lol

split hazel
#

he is

eternal osprey
#

ait mission failed?

tulip ledge
quartz kindle
#

idk if the problem is with cross-env or with concurrently, never used either of them

winged mulch
#

I have this code:

const { ShardingManager } = require("discord.js")
import { token } from "./environment_variables/variables.json"
import * as functions from "./functions"

const manager = new ShardingManager("./bot.js", {token : token})

manager.on("shardCreate", async shard => {
    await functions.processShardCreate(shard)
})

manager.spawn()

Error:

This session would have handled too many guilds - Sharding is required.```
#

I'm running the sharding file:

#

Can someone please tell me what I'm doing wrong?

tawdry oracle
#

does someone know a good canvas template for a welcome bot?

tawdry oracle
tawdry oracle
winged mulch
tawdry oracle
#

then

#

totalShards: 10, for example

harsh blade
#

Can som1 help me with an "error" im having

client.on("message", async (message, member) => {
    if (message.member && message.member.roles.cache.has("765885271861624843")) return;
    if (message.author.id === client.user.id) return;
    var noWords = JSON.parse(fs.readFileSync("./antiping.json"));
    var msg = message.content.toLowerCase();
    for (let i = 0; i < noWords["antiping"].length; i++) {
        if (msg.includes(noWords["antiping"][i])) {
            message.delete(1000)
            const role = member.guild.roles.cache.find(role => role.id === "765885271861624844");
            member.roles.add(role)
            setTimeout(function () {
                member.roles.remove(role);
            }, 2000)
            let embed = new Discord.MessageEmbed()
                .setTitle("Please dont ping staff!")
                .setURL("https://client.dynamichost.xyz")
                .setColor("#ff2e2e")
                .setDescription("We can be really busy sometimes. \n Being at school or doing work... \n We do see your messages so please be patient. \n Dont ping staff without permission. \n \n If you pinged a staff in your ticket, \n The ticket is now less likely to get checked quickly.")
                .setFooter("Regards - DynamicHost")
                .setImage("")
                .setThumbnail("https://cdn.discordapp.com/attachments/726137537575518299/836649762656616528/450.png")
            return message.channel.send({ embed });
        }
    }
});

This just doesnt work anymore ๐Ÿ˜ญ
Its supposed to timed mute the user who pings staff, and delete the message + send that embed.

digital ibex
#

what error

harsh blade
#

It just doesnt work

digital ibex
#

and only send the loc which is causing the error

harsh blade
#

after a friend of mine edited the command

#

nothing in logs

#

or console

digital ibex
#

what debugging have u done

harsh blade
#

to be exact

#

just trying to use the command in general, and we've tried using vscode to find errors

#

but it reports 0 problems

digital ibex
#

okay

#

what debugging have you done

#

or ur friend

harsh blade
#

Just that.

#

my friend tried to edit the () part on the message.delete i think

digital ibex
#

debug ur code, the problems tab on vsc is only going to show syntax errors

harsh blade
#

Rightt..

digital ibex
#

when u debug ur code and u still have no idea, then come and ask

#

makes everyones life easier and i can have a better understanding on how to resolve ur problem ๐Ÿคท

wheat mesa
digital ibex
#

nah, u can do that since the variable name is the same

quartz kindle
#

except embed its deprecated

#

its embeds now

rocky hearth
#

I have a binary number in JS how do I invert it?
0b1001 to 0b110

quartz kindle
#

also .delete(1000) is not a thing anymore, its .delete({timeout: 1000}), and in v13 it was removed completely

rocky hearth
#

This operator is quite confusing to me

#

The num gets in negative

quartz kindle
#

because bitwise in js implicitly converts the number to signed int

digital ibex
tawdry oracle
#

does someone know a good canvas template for a welcome bot? (not discord-cavas)

cinder patio
#

oh wait nvm

rocky hearth
cinder patio
#

hmmm

rocky hearth
#

Actually i want x number of bits, all 1

quartz kindle
#

the only way afaik is to create a bitmask and xor it

#

actually, there might be a better way brb

rocky hearth
quartz kindle
#

wdym x number of bits all 1?

#

example?

rocky hearth
#

x = 4, 0b1111

#

x = 2, 0b11

quartz kindle
compact jay
#

Can someone help

#

Is this right?

quartz kindle
#

or this, if you're going above 32 bits

wheat mesa
#

Might not wanna do that

compact jay
#

Fucj

wheat mesa
#

just regen it

#

But what exactly is your problem?

#

Oh nevermind I see it

#

You're not defining client

compact jay
#

Regened it

wheat mesa
#

You're defining it as Client

compact jay
#

Phew

quartz kindle
#

also, your login is inside your message event lol

wheat mesa
#

^^

quartz kindle
#

so it will never login

split hazel
#

you havent even put quotes around your token

compact jay
#

Who?

split hazel
#

please learn some basic js first

rocky hearth
quartz kindle
#

yes

compact jay
#

But is this right?

split hazel
#

codecademy

compact jay
#

?

wheat mesa
#

No

#

That's not right

#

You're using js const Client = new Discord.Client() but you're trying to use it as client

digital ibex
#

every time a message is sent ur tryna connect to discords gateway lol

wheat mesa
#

You should learn javascript before making a discord bot

compact jay
#

Awh

#

But can help,?

#

???

digital ibex
#

is Client the same as client ?

#

no

#

they need to be the same

compact jay
#

Oh ok

boreal iron
quartz kindle
#

just put up a notice somewhere

#

like in your bots name or status

wheat mesa
#

Surely they'll change it in the future, seems like a massive hassle to do that

compact jay
quartz kindle
#

that says the guild admins need to kick and reinvite to enable slash commands

digital ibex
#

it can be anything, it can be monkey kangaroo anything. it just has to be the same

#

(with a few exceptions)

boreal iron
compact jay
#

Ok

boreal iron
#

Guess it will take a while until the bot got invited into all active guilds again.
But who caresโ€ฆ
Just got a verified bot with 3 guilds itโ€™s in now KEKW

rose warren
#

Saves having to set up any channels etc if your bot requires configuration

#

Since it never leaves

boreal iron
#

Ah Iโ€™ve left the guilds already.
No big deal as thereโ€™s no general bot configuration needed but still possible

compact jay
#

This error now help

boreal iron
#

Itโ€™s just a lookup & converter tool not more

quartz kindle
compact jay
#

Rip

#

Is there any other ways?

#

Cuz im on a phone

#

Hard :(

quartz kindle
#

there are ways to trick repl.it into running node 16

#

i never tried them tho

compact jay
#

Oh okay

boreal iron
compact jay
#

Can tell me tho?

#

@quartz kindle

rose warren
#

Sorry I was eating dinner dog_Happy

boreal iron
compact jay
#

Or should i just watch a tutorial

#

?

tired panther
compact jay
#

What the f4ck is that

quartz kindle
#

last time checked, the nix method only worked with node 16.4

#

not 16.6

compact jay
#

Oh okay

#

Ill go watch a tut after school tmw

#

Tmrw

#

Alright im gonna go sleep

#

Tmrw contiune

tulip ledge
#
    let channel = await this.channels.fetch("766019210454892644");
    console.log(channel)

Why is this returning null?

#

Ok nvm my bot wasn't ready yet

sterile tundra
#

l

hollow depot
#

i'm new to typescript, this is my code

class User {
    public age: number
    public name: string
    protected auth: string | void
    constructor(age: number, name: string, auth?: string){
        this.age = age
        this.name = name 
        this.auth = auth 
    }
    createAuth(v: any): void {
        let final: string
        for(var char in v){
            if(!allChars.includes(char)) return console.log('Impossible to create auth. Please insert a number, letter or \', / .\'')
            final += char;
        }}}```
i'm getting this error:
wheat mesa
#

Assign the variable first, like let final: string = โ€œโ€;

#

Unless thatโ€™s going to mess your code up somehow later

tulip ledge
#

Also I'm not sure but ts might not like it that v is of type any and you're trying to add it to a string type

hollow depot
tulip ledge
wheat mesa
#

Yes Iโ€™m aware

hollow depot
lament rock
#

the declaration is still unnecessary and adds to file size. I force my editor to shun me for useless type casting

quartz kindle
#

welp, i think it worked

#

takes a long time to load tho

boreal iron
#

// index.js
console.log("hi\nv16.6.2");

quartz kindle
#

it has to download the entire unstable repository

#

its inefficient as fuck lmao

boreal iron
#

.nix lmao

quartz kindle
#

ye

#

i think i can import it from gthub, let me try

boreal iron
#

Letโ€™s create a script out of it and sell it to all the poor dudes outside using that service to be able to update to djs13

#

Let me be your marketing manager

quartz kindle
#

xD

wheat mesa
#

Can you send attachments when you respond to a slash command?

rose warren
#

Not yet. The API doesn't support it yet.

#

They're working on it.

wheat mesa
#

Hopefully that'll be done soon

rose warren
#

Yep. A lot of people waiting on it.

quartz kindle
#

i wonder how they're gonna implement it on the inteaction webhook response

#

probably make us respond with multipart formdata

#

although its a bit weird to use it as a response rather than as a request

pale vessel
#

That's what I do

#

Defer, and then patch the thinking message with actual embeds and attachments

#

Since the PATCH method accepts same payload as you would when you edit a webhook/send a message

#

So you could upload attachments and JSON via form data

#

So yes it technically supports it

lament rock
#

webhooks are weird

#

you can have a text outside of an embed

boreal iron
#

Is there any chance or command option type other than STRING fetching any user input even if thereโ€™s a whitespace used?

pale vessel
#

No

boreal iron
#

Hmm what a crapโ€ฆ
Makes things more complicated than necessary.

#

Any idea then how to collect an user input in form or a text without using multiple command options and without using the message_created event?

pale vessel
#

What do you mean by multiple command options?

boreal iron
#

I could register multiple (optional) application command options for a single command.
โ€ฆ to collect not a single STRING the client enters but multiple words (split by spaces)#

#

/command optional_option1 optional_option2 etc.

#

Which would be an ugly solution

pale vessel
#

Why can't you just use string? It supports spaces

boreal iron
#

Huh wut no it doesnโ€™t ?!

pale vessel
#

It does

#

Press tab to submit

#

The text should be in black after that

boreal iron
#

Hmm that might be the issue

pale vessel
#

You don't need to press tab if there's only one option

#

It'll submit it with the space

boreal iron
#

Yeah noticed that right now while testing

#

Weird it works tho but didnโ€™t work earlier that day

arctic spindle
#

How to make a botlist like TOP.GG?

lyric mountain
#

Definitely not by asking here

lament rock
#

npm install express

lyric mountain
#

npm remove node

arctic spindle
lyric mountain
arctic spindle
lyric mountain
#

It's like working on Microsoft and asking at Apple how to make MacOS

solemn latch
#

Probably best not to ask for help with that here yeah ๐Ÿ‘€

fleet lion
boreal iron
#

ur not being helpful here, plz leave.

Yes, away with you Mr. Kuuhabakaubku. okeh

boreal iron
errant flax
#

where do i get started with discord's oauth2 monkaHmm

lyric mountain
#

Oauth2 is the same everywhere

#

Basically you exchange tokens with the service twice to get the info u want

errant flax
#

well im new with Oauth2

lyric mountain
#

I had an image showing oauth2 flow

#

Just a sec

#

Found it

cold ruin
#

im trying to put a background on my bots page.
This is the cod ei have: css .page { width: 100%; height: 100vh; overflow: scroll; overflow-x: hidden; background: url('https://cdn.discordapp.com/attachments/875699183556886560/876684332301975582/fate-series-fate-stay-night-unlimited-blade-works-rin-tohsaka-wallpaper-preview.jpg'); background-repeat: no-repeat; background-size: cover: } for some reason it doesnt change it even after refreshing multiple times and clearing cache

lyric mountain
#

Use imgur

#

Don't think images are visible for those outside the server

cold ruin
#

jmm

#

hmm

#

let me see

cold ruin
lyric mountain
#

Except for the last part where you write cover:

cold ruin
#

oh right

#

i put a :

cold ruin
lyric mountain
#

Did you pick the right imgur link?

cold ruin
#
.page {
  width: 100%;
height: 100vh;
overflow: scroll;
overflow-x: hidden;
background: url('https://imgur.com/a/ZIggedh');
background-repeat: no-repeat;
background-size: cover;
}
#

yes

lyric mountain
#

Yeah, totally wrong link

dense flame
#

and .png

#

at the end of your imgur link

cold ruin
cold ruin
lyric mountain
#

Not only that, there's a i prefix on the url

#

Like i.imgur

dense flame
#

yea

#

that's off

cold ruin
#

so should i do copy address

lyric mountain
#

Right click on the image

cold ruin
#

i get this

lyric mountain
#

Then click open in a new tab

cold ruin
#

https://i.imgur.com/D8kuMrO.jpeg

lyric mountain
#

Ye

dense flame
#

yea

cold ruin
#

no i can just right click to copy address

#

let me try

#

nope

lyric mountain
#

Generally "open in a new tab" will solve redirects, that's why I recommend it

cold ruin
#

still didnt change

lyric mountain
#

Gtg now, I'll leave it to cosmic

cold ruin
#

ahh

dense flame
#

what's your current css again

cold ruin
# dense flame what's your current css again
<style>

@keyframes float {
  0% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    -webkit-transform: translatey(0px);
            transform: translatey(0px);
  }
  50% {
    box-shadow: 0 25px 15px 0px rgba(0, 0, 0, 0.2);
    -webkit-transform: translatey(-30px);
            transform: translatey(-30px);
  }
  100% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    -webkit-transform: translatey(0px);
            transform: translatey(0px);
  }
}
.entity-header__image {
    animation: float 5s ease-in-out infinite;
   border-radius: 50% !important;
}

.page {
  width: 100%;
height: 100vh;
overflow: scroll;
overflow-x: hidden;
background: url('https://i.imgur.com/D8kuMrO.jpeg');
background-repeat: no-repeat;
background-size: cover;
}
</style>
#

this is all of it

dense flame
#

try changing .page to .entity-wrapper

cold ruin
#

ok

cold ruin
dense flame
#

that's weird

cold ruin
#

could you share some other code to change the bg then?

dense flame
#

yea I have the same code

dense flame
cold ruin
#

hmm

#
.entity-wrapper {
  width: 100%;
height: 100vh;
overflow: scroll;
overflow-x: hidden;
background: url('https://i.imgur.com/D8kuMrO.jpeg');
background-repeat: no-repeat;
background-size: cover;
}```
#

@dense flame this is supposed tow ork?

#

to work*

dense flame
#

yea

cold ruin
#

it did it

#

it works now

dense flame
#

nice

cold ruin
#

but @dense flame the whole image is not being showed

dense flame
#

may I see

cold ruin
#

@dense flame

#

its suppposed to have the character on the right

dense flame
#

I see

cold ruin
#

sorry, im new to css so idk much image formatting

dense flame
#

honestly, I am not sure why is that happening

cold ruin
dense flame
#

It could be

cold ruin
#

what should i do then

dense flame
#

Try cropping the image then reupload it to imagur

cold ruin
#

ok

cold ruin
#

im going to try another image3

#

what should the res be @dense flame

#

1920x1080??

dense flame
#

When I actually unzoom I can see the whole picture

cold ruin
#

p[retty weird

dense flame
#

yea lol

cold ruin
#

should i get a 1920x1080 image

dense flame
#

yea ig that's fine

near stratus
cold ruin
cold ruin
near stratus
#

an you're using cover

#

to cover the long page the image is getting cropped

#

try using repeat y

#

then it won't crop out
rather it'll multiply the image

cold ruin
#

then what should i do

dense flame
#

smart

#

I really am a noob at css

near stratus
#

but repeat-y would look weird

cold ruin
#

i havent even learnt css

near stratus
#

So I prefer getting a long image

#

then doing repeat

#

and blur out the bottom

#

so that the transaction go smooth

cold ruin
near stratus
cold ruin
#

no bbbut i want to use the same image

#

@near stratus

near stratus
#

wait a minute

#

I have an idea

cold ruin
#

ok

near stratus
#

can you crop out this part of the image only

cold ruin
#

ok

near stratus
#

then try

cold ruin
#

i want the character to be on the right

near stratus
#

....

cold ruin
#

beneath the invite and vote buttons

near stratus
#

can you fix the background then ?

cold ruin
#

im just going to try and crop it

#

until its perfect

near stratus
cold ruin
#

okay

#

@near stratus ayeee finally works

#

thanks!

near stratus
#

np

cold ruin
#

very nice

pale vessel
#

Y not use the preview button

snow urchin
#

If anyone here is good with PHP, can they shoot me a DM, just have a quick question

cold ruin
#

does someone know how i can put a black border around this

#

nvm ifigured it out

#

how can i change the color of the description on the bots page

lethal pine
#

Hi how to fix this error TypeError: isinstance() arg 2 must be a type or tuple of types

near stratus
lethal pine
near stratus
#

.....

lethal pine
#

-_-

feral aspen
#

Hey.

#

In order to make a !ping command in slash commands, does the strategy work the same in normal commands?

#

Like the code is like the same but in slash commands?

#

.. to send a message then calculate the time, etc?

digital ibex
#

yes

#

a slash command is essentially a webhook, and a webhook returns essentially the message object, and the message object does indeed have a timestamp

feral aspen
#

Wait.. if it is a webhook, I can use the webhook manager?

#

bot.ws.ping, right?

digital ibex
#

no

#

thats something else

feral aspen
#

What do you mean?

digital ibex
#

ws = websocket

#

bot.ws.ping is the websocket ping

feral aspen
#

Could you remind me what websocket is, also, again?

digital ibex
#

a protocol which communicate over tcp

feral aspen
#

Oh, I see, so I use the same strategy but in webhook in regards to the ping command, right?

digital ibex
#

which means realtime communication

feral aspen
digital ibex
feral aspen
#

๐Ÿ‘

digital ibex
#

all u need to know, whatever u can do with webhooks, u can do with slash commands

#

when u get a better understanding, look in the discord dev docs and it'll help

rose warren
#

You can't send attachments with slash commands yet

#

So that's not quite true

digital ibex
#

tf

feral aspen
#

Unless you're talking about something else.

rose warren
#

You definitely can't. The API doesn't support it.

feral aspen
#

You mean attach files/images to embeds?

rose warren
#

No. Not embeds. Message attachments.

digital ibex
#

?

feral aspen
#

๐Ÿ‘€

rose warren
digital ibex
#

wait wrong ss

rose warren
#

Even Discord acknowledged it doesn't exist yet.

#

A lot of of devs are stuck waiting for Discord to support attachments through the API including myself.

digital ibex
#

(channel#createmessage)

digital ibex
rose warren
#

No they're not. Where's the message attachments on what you sent?

digital ibex
#

the last screenshot?

rose warren
#

No you're not reading in the right place

#

channel#createmessage isn't an interaction response

digital ibex
#
Discord Developer Portal

Integrate your service with Discord โ€” whether it's a bot or a game or whatever your wildest imagination can come up with.

Discord Developer Portal

Integrate your service with Discord โ€” whether it's a bot or a game or whatever your wildest imagination can come up with.

rose warren
#

There

#

There's no point in arguing man. It's just not possible right now.

digital ibex
#

im confused then, cuz when u create an interaction response it says interaction structure has the message object

#

? im not arguing

pale vessel
#

It's possible blobweary

rose warren
#

Yeah it uses a message object.

pale vessel
digital ibex
#

yeah, and the message object has attachments ? confusion

rose warren
pale vessel
#

It's not huge at all

rose warren
digital ibex
#

i've only got content and embeds like workin on my bot