#development

1 messages · Page 1308 of 1

drifting wedge
#

but like in a file?

earnest phoenix
#

literally every event on discord py stopped working for my bot since yesterday even though I never changed any code. also nothing appears on console

drifting wedge
#

like a = 69

earnest phoenix
#

can someone help me?

misty sigil
#

@earnest phoenix intents?

earnest phoenix
#

oh maybe

spare goblet
#

is it possible that the shard 0 takin too long to get ready thing might be related to ratelimits due to fetching a lot of stuff from api uwot_confused

#

or would we be getting another error kittynarroweyes

earnest phoenix
#

@misty sigil enabled both and still doesn't work

misty sigil
#

They need to be in the code too

#

They need to be in the code too

earnest phoenix
#

wdym

#

how to do that?

#

oh ok

misty sigil
#

look at the docs

earnest phoenix
#

still doesn't work

#

oh my lord

toxic jolt
#

my bot so many restarting in my vds
and discord generating new token

#

i how to disable restart in any error

#

pls helpp fast :c

woeful pike
#

remove the code that restarts your server when there's an error

#

you're welcome

toxic jolt
#

i have not restart code's

earnest phoenix
#

wait are you hosting at glitch

quiet rose
#

@toxic jolt your bot is epicum

toxic jolt
#

wait are you hosting at glitch
@earnest phoenix nope

earnest phoenix
#

o

toxic jolt
#

yeah im using glitch boi

quiet rose
#

your bot is epicum

toxic jolt
#

epicum?

#

what is this

quiet rose
#

epic

toxic jolt
#

im looking a error messages in my bot

#

OMGG

quiet rose
#

work ?

#

yeah ur bot is online rn

toxic jolt
#

HOWLY

#

SHIT WHAT THE

#

SO MANY ULTIMATE ERRORS

#

OMG....

earnest phoenix
#

😳

solemn leaf
#

Can I put this in my config file

earnest phoenix
#

cortex is havin seizure

solemn leaf
#
"SEND_MESSAGES", "VIEW_CHANNEL", "EMBED_LINKS", "ATTACH_FILES", "USE_EXTERNAL_EMOJIS"
#

for checkign this

#

message.guild.me.permissionsIn(message.channel).has(

quartz kindle
#

@solemn leaf put them in an array

#

.has(["a","b","c"])

topaz fjord
#

the name can't contain spaces

solemn leaf
#

No I mean like

toxic jolt
#

i fixed!

topaz fjord
#

ok

solemn leaf
#
{
    "token": "TOKEN",
    "prefix": "ch-",
    "prems": ["SEND_MESSAGES", "VIEW_CHANNEL", "EMBED_LINKS", "ATTACH_FILES", "USE_EXTERNAL_EMOJIS"]
}
#

.has(config.perms)

quartz kindle
#

now you made a double array lol

solemn leaf
#

that?

quartz kindle
#

ye

solemn leaf
#

k

#

thank

toxic jolt
#

omg...

#

400k user

#

and 4k guild

#

bot

quartz kindle
#

lmao

toxic jolt
#

lol

quartz kindle
#

@earnest phoenix most likely what turtle said

toxic jolt
#

my bot is dead

#

really

#

look this errors log

quartz kindle
#

package name cannot have spaces

#

remove the -y

#

and define a name yourself

solemn leaf
#

@quartz kindle can I just do

#

config.perms.content

#

for my error message in dms

misty sigil
#

No

solemn leaf
#

what can i do

misty sigil
#

config.perms.content doesn’t exist

#

nor does config.perms

#

it’s config.prems

solemn leaf
#

fixed

#

gee

lucid prawn
#

i have no name

solemn leaf
#

@misty sigil

#

nvm

#

sorry fro the ping

lucid prawn
#

u cant ping me

solemn leaf
#

@lucid prawn

#

@oak cliff

#

We cant ping him

#

dad help us

#

rename thiem to `

quartz kindle
#

@earnest phoenix when you do npm init the program will ask you to answer a few questions, one of them is for you to chose a name for your application

#

if you add the -y, it means to just use all the defaults, instead of asking you

#

and since your folder contains a space, it will try to use your folder's name as your application name

#

but application names cannot have spaces

#

where does it say that

toxic jolt
#

my bot so many error getting econnreset

#

i how to fix this error

#

@quartz kindle thx man

#

i use this

#

xd

dire obsidian
#

well

#

whats the best way to make a web server?

#

in python or js?

#

and yes, hi

#

.-.

toxic jolt
#

what is a rick astley -,-

dire obsidian
#

there

toxic jolt
#

lol

dire obsidian
#

yes, but...

#

best way to make a web server

#

python or node.js

#

oh luck with the backend

earnest phoenix
#

@earnest phoenix that image

#

please tell me you at least understand whats going on

#

jesus christ

quartz kindle
#

@earnest phoenix the program is asking you questions, one at a time

#

first question: package name, you answered: bot-stuff

#

second question: package version.

#

now its waiting for you to give it a version

#

like 1.0.0

#

or whatever you want

#

it shows the default value in parenthesis

#

yes

edgy niche
#

Logda ne yazıyor

earnest phoenix
#

What Is Undefined In This Encoding?

#

hic bir hata almiyorum Logda

still merlin
#

undefined = not defined

slender thistle
#

-notr

gilded plankBOT
#

İngilizceden başka dillerde sohbet etmek için #general-int kanalını, top.gg hakkında (Türkçe olarak da) destek almak için #support kanalını kullanın.
Bu kanalda Türkçe konuşmayın.

still merlin
#

Also

#

Are you using discord.js v11?

quartz kindle
#

there are so many things wrong with that code

stable eagle
#

Im trying to install mongoose, but I get this error:

npm ERR! Unexpected token in JSON at position 0 while parsing near ' ...'

solemn leaf
#

node index.js

drifting wedge
#

how can i get channel count?

agile lance
#

How do I get the mentioned users ID? I basically did this below:

let user = message.mentioned.users.first()

message.channel.send(user.id);

and it doesnt work, Discord.js v12

solemn leaf
#

const user = message.mentions.users.first();

agile lance
#

I tried that as well and it didnt work.

solemn leaf
#

const member = message.guild.member(user);

#

correct @quartz kindle ?

#

pls tell me yes

quartz kindle
#

@earnest phoenix its asking you to define an entry point file from where to start your program. the default is a file named index.js

agile lance
#

Ohhh, Thanks. I’m used to discord.js v11 so it’s hard.

drifting wedge
#

how can i get channel count?
@drifting wedge total channel count? d.py

quartz kindle
#

@solemn leaf message.mentions.members.first()

#

no need for guild.member

solemn leaf
#

I had it

#

so I counts

#

ez pz

agile lance
#

Oh, members not users?

#

Discord.js v12 is hard to get used to

solemn leaf
#

nvm

#

me stupid

quartz kindle
#

@agile lance what you had is correct

#

but you wrote mentioned and not mentions

agile lance
#

That errored

#

Both time

#

I tried mentions as well

quartz kindle
#

message.mentions gives you all mentions in a message

#

then .users gives you their user forms, while .members gives you their member forms

agile lance
#

Ohh I had .users

quartz kindle
#

both users and members have .id tho

earnest phoenix
#

how do I add images to my bots page?

quartz kindle
#

so both will work

agile lance
#

I’ll try .members

quartz kindle
#

@earnest phoenix upload them to somewhere and then put the link in the page

#

or convert them to base64

solemn leaf
agile lance
#

Doesnt work and no error in the console

quartz kindle
#

show code

agile lance
#

The entire code?

quartz kindle
#

yes

agile lance
#

Okay

#
const token = process.env.token
const discord = require('discord.js')
const {MessageEmbed} = require('discord.js')
const db = require('quick.db')
const Client = new discord.Client()


let prefix = "!"

Client.on('message', message => {
  const user = message.mentions.members.first() || message.author
  if(message.author.bot) return;
  let Messages = db.fetch(`MessagesSent_${message.guild.id}_${user.id}`)

  db.add(`MessagesSent_${message.guild.id}_${message.author.id}`, 1)

  if(message.content == '!messages') {
    const messagesEmbed = new MessageEmbed()
    .setTitle("Command: Messages")
    .setColor("FFFFFF")
    .addField(`**Messages!**`, `${user.username} has \`${Messages}\` messages.`)
    .setFooter("Credit to Quatenus for this.")
    message.channel.send(messagesEmbed)
  }
if(message.content == '!commandsused') {
 let cmdused = db.fetch(`COMMANDSUSED_${user.id}`)

  let SENDER = MessageEmbed()
  .setTitle("*Commands Used\\*")
  .addField("**Commands Used By: " + user.username+"!", `${user.username} used \`${cmdused + 1}\` `)
  .setFooter("Credit to Quatenus for this.")
message.channel.send(SENDER)
}

  if(message.content.startsWith(prefix)) {
    db.add(`COMMANDSUSED_${message.author.id}`, 1)
  }

})


Client.login(token) ```
quartz kindle
#

use code blocks please

solemn leaf
#

code block

#

-codeblock

#

luca shit bot

#

man

quartz kindle
#

still not a code block

agile lance
#

Do I put js at the top?

quartz kindle
#
this is a code block
#

thank you

agile lance
#

Np.

solemn leaf
#

```js
/code
```

earnest phoenix
#

can someonehelp me do this- likeinserting the img like i am confuesed how this works

quartz kindle
#

@agile lance so, members don have .username, users do

#

members have .displayName

agile lance
#

I tried .users and it didnt work either

quartz kindle
#

which checks if they have a nickname first

solemn leaf
agile lance
#

But let me test if theres a error with .users

ebon topaz
#

Here is developer support?

quartz kindle
#

yes

ebon topaz
#

Ok

earnest phoenix
#

it does not help me that much-

agile lance
#

.users still doesnt work and no error

earnest phoenix
#

like how do i turn that image to into a code-

quartz kindle
#

@agile lance what does "not work" mean here?

#

no answer at all?

#

or a wrong answer?

agile lance
#

No answer

ebon topaz
#

I have a bot and i don't know how invite it in my server

agile lance
#

if i did !messages myself it works but when I mention somebody, Nothing happens

quartz kindle
#

thats beacuse you're using a string comparison

#

"a" == "a" works, but "a someone" == "a" does not work

#

you have message.content == '!messages'

#

the moment you write !messages someone the message content is no longer !messages

agile lance
#

Ohh

#

Do I just do 1 equal then?

quartz kindle
#

no

#

use startsWith

agile lance
#

Ohhh Thanks

#

Nothing happened again

earnest phoenix
#

can someone help me turn the image that i sent into a img code, im very confused... ;-;

ebon topaz
#

I have a bot and i don't know how invite it in my server
Khm khm

quartz kindle
#

@earnest phoenix you want to upload it somewhere or you want to convert it to base64?

earnest phoenix
#

basicsally..

surreal sage
#

How do i set channel permissions? My code is: js channel_Def.overwritePermissions([ { id: message.guild.id, deny: "VIEW_CHANNEL" }, { id: message.author, allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"] } ], `Ticket for ${message.author.tag}`)
This doesn't work and no errors are given. (This is D.js v12)

earnest phoenix
#

like insert the image than it turns into a code

quartz kindle
#

@earnest phoenix do you know what uploading means?

earnest phoenix
#

Like inserting the image... im very confused and i just woke up im sorry-

quartz kindle
#

uploading means storing the image somewhere, like in a server, or in a service like imgur

#

once you have the image stored, you can then gain access to a direct link for the image

drifting wedge
#

how can i get all the channels the bot is in?

quartz kindle
#

you use this link in your top.gg description to display it

drifting wedge
#

like all the channels from all the servers?

quartz kindle
#

client.channels most likely

#

check the dpy docs

earnest phoenix
#

like this??

#

is this correct?

surreal sage
#

How do i set channel permissions? My code is: js channel_Def.overwritePermissions([ { id: message.guild.id, deny: "VIEW_CHANNEL" }, { id: message.author, allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"] } ], `Ticket for ${message.author.tag}`)
This doesn't work and no errors are given. (This is D.js v12)

blissful coral
#

message.author isn’t a id

surreal sage
#

does it have to be a id?

blissful coral
surreal sage
#

in v11 it doesnt

#

in v11 it has to be a user object

blissful coral
#

Well he sets it as “id:”

#

So

dense patio
#

what is this error (discord.js v12)

 UnhandledPromiseRejectionWarning: AbortError: The user aborted a request.
earnest phoenix
blissful coral
#

Show code

rose warren
#

@earnest phoenix check line 211 of your bot.js file. Send us the code.

blissful coral
#

Oh

#

It’s because guild is undefined

#

Null*

#

Meaning it is a dm channel

#

@earnest phoenix

earnest phoenix
#
 if(!db.has(`reklam_${msg.guild.id}`)) return;
        const reklam = [".com", ".net", ".xyz", ".tk", ".pw", ".io", ".me", ".gg", "www.", "https", "http", ".gl", ".org", ".com.tr", ".biz", "net", ".rf.gd", ".az", ".party", "discord.gg",];
        if (reklam.some(word => msg.content.includes(word))) {
          try {
            if (!msg.member.hasPermission("ADMINISTRATOR")) {
                  msg.delete();
                    return msg.reply('**Bu Sunucuda** `Link Engelleme`** Aktif Link Atmana Izin Veremem !**').then(msg => msg.delete(3000));
   
 
  msg.delete(3000);                              
 
            }              
          } catch(err) {
            console.log(err);
          }
        }
    });```
blissful coral
#

Can’t get guild id in a dm channel

dense patio
#

do msg.guild?.id

rose warren
#

👆

dense patio
#

then it will only try to get the guild id if the message guild is defined

earnest phoenix
#

thank you so much 🙂

dense patio
#

does anyone know why i'm getting this error:

 UnhandledPromiseRejectionWarning: AbortError: The user aborted a request.
#

never seen it before

#

no idea what's causing it

blissful coral
#

No clue I am curious too

opal plank
#

usually the cause of that is bad internet

#

or a sudden disconnect

drifting wedge
#

how do i get total channel count? dpy? cant find in docs

dense patio
#

i don't see why that would happen

#

i've restarted my bot multiple times and it works for a bit, then errors, stopping it all together, then it stops erring but is very laggy

opal plank
#

thats likely the issue

#

when the bot becomes unresponsive that can happen too

surreal sage
#

@blissful coral This is my code now: js channel.overwritePermissions([ { id: message.guild.id, deny: "VIEW_CHANNEL" }, { id: message.author.id, allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"] } ], `Ticket for ${message.author.tag}`) still doesn't work and not give a err

#

Is it that the deny: isnt a array?

#

it isnt

dense patio
#

put it in a try catch block

surreal sage
#

Nothing returned @dense patio

opal plank
#

didnt we just say its likely a DM and guild doesnt exist?

earnest phoenix
#

how would i like ```html
#middle {
background: #96bceb;
width: 100%;
height: 68%;
margin: 0px;
}

#bottom {
background: black;
height: 38%;
margin: 0px;
}``` fade these into each other

opal plank
dense patio
#

@surreal sage is the bot accepting commands in dms? like @Not Erwin said?

surreal sage
#

wdym

dense patio
#

if you dmd the bot a command, would it respond in that dm

surreal sage
#

y

dense patio
#

because dm messages don't have the "guild" property

surreal sage
#

ik

dense patio
#

you could really just replace message.guild.id with message.guild?.id

#

or put the whole thing in an if statement that checks if it is a guild

#
if(message.guild) {
  ...
}
surreal sage
#

i know its a guild

#

im sending the msg in a guild

#

this is a ticketing cmd

dense patio
#

try removing that last line

surreal sage
#

what

dense patio
#

, `Ticket for ${message.author.tag}`

surreal sage
#

the string?

dense patio
#

yeah

earnest phoenix
#

do you have to get an SSL with a .dev domain

#

im new to this type of thing and have no idea what im doing

compact oriole
#

yea

#

it will not allow to show a webpage if you don't have ssl

#

but if you have a mc server behind a .dev domain, it will allow to connect to that

#

but that's probably because it directly connects to it's ip and only pings the dns

earnest phoenix
#

how do you get one

surreal sage
#

didnt work @dense patio

earnest phoenix
#

how do you get one
@compact oriole

#

How to delete glitch project

compact oriole
pale vessel
#

no way

#

what is that

earnest phoenix
#

google gross

compact oriole
pale vessel
#

let's encrypt ftw

compact oriole
#

I use Cloudflare so I get it from there, but when no cloudflare, let's encrypt is my friend

earnest phoenix
#

How to delete glitch project

#

you could really just replace message.guild.id with message.guild?.id
@dense patio wtf is the ternary operator doing there

misty sigil
#

How to delete glitch project
@earnest phoenix it’s literally in the project options

quartz kindle
#

thats not a ternary operator, thats the new optional chaining feature

#

from node 14+

misty sigil
#

ok so what now

earnest phoenix
#

I'm deprecated :(
how to switch ECMAScript versions in node

misty sigil
#

I need to update my bot to support intents

dense patio
#

?. makes it so it only continues reading if that property exists

#

really useful

quartz kindle
#

ES version depends on the underlying V8 engine that powers javascript

#

node.js updates their built-in V8 every few node versions

earnest phoenix
#

they're literally a modification of V8

quartz kindle
#

they are not a modification

#

they are built on top of V8

misty sigil
#

@earnest phoenix I seen that

quartz kindle
#

last update was node.js v14.6, which updated V8 to v8.4.371.19

earnest phoenix
pale vessel
#

node v15 soon

quartz kindle
#

so if you head over to the V8 website, and see all the features that were added in 8.4.371.19, then node.js 14.6+ has all of those features

misty sigil
#

node v69 when

earnest phoenix
#

Lol

#

Approximately 2030

#

node node-more-like-nose.js.js

#

can you have trailing whitespace in a file name

#

Skulbite is typing...

misty sigil
#

always will be

trim saddle
#

@quartz kindle hey, if i created a class could i modify it's variables, like uhh

class yee {
    constructor(two) {
        this.haw = two
    }
}

const cowboy = new yee("hee")

cowboy.haw = 'haw'
console.log(cowboy.haw) // haw
earnest phoenix
#

I need help making a logo for my bot, I made one but i dislike mine-

quartz kindle
#

@trim saddle yup

earnest phoenix
#

Well i mean its okay-

trim saddle
#

hm.

earnest phoenix
#

trailing hyphen

#

but i need help making a better one

trim saddle
#

also what do you know about jsdoc tim

quartz kindle
#

very little

trim saddle
#

i've been trying to document this module i made, but i don't understand index.d.ts

earnest phoenix
#

also what do you know about jsdoc tim

very little
@quartz kindle jsdoc.very_little is undefined

#

Hi. My code is very basic but it is not working. Please DM me if you can help me fix my code.

#

I can send the repl

trim saddle
#

Bot Website is down Above ↖️

earnest phoenix
#

link

#

....

quartz kindle
#

i mean

earnest phoenix
#

Hi. My code is very basic but it is not working. Please DM me if you can help me fix my code.
@earnest phoenix wow man we can perfectly help even if you sent zero information about the code and/or error

quartz kindle
#

index.d.ts is ts not jsdoc

earnest phoenix
#

Help

blissful coral
#

Is it that the deny: isnt a array?
@surreal sage has to be in a array yes

earnest phoenix
#

when my bot will be approved ? ??

#

I just need a free software no downloading to make one-

#

its just a client=commands.bot(command_prefix=';') and then @ client.event

#

it says:

#

thats steam?

#
Traceback (most recent call last):
  File "main.py", line 31, in <module>
    @client.event
AttributeError: 'Client' object has no attribute 'event'
#

when my bot will be approved ? ??
@earnest phoenix READ THE BLASTED RED MESSAGE

#

please dont ask, read pins

#

in support

blissful coral
#

@earnest phoenix copyrighted image btw

olive rune
#

@earnest phoenix commands.Bot

earnest phoenix
#

yep-

olive rune
#

Capitals matter

earnest phoenix
#

i did

#

i made mine using Canva-

#

i might use adobe

trim saddle
#

could you please just send the code in a code block

earnest phoenix
#

k

#

@earnest phoenix commands.Bot what the fuck KEKW

trim saddle
#

@earnest phoenix that's the d.py command client

earnest phoenix
#
import discord
from discord.ext import commands


client = commands.Bot(';')

@client.event
async def on_ready():
  print('ready')

@client.command()
async def ping(ctx):
  await ctx.send('pong')

client.run('token')
#

@earnest phoenix puttint a hyphen at the end of each message is not good emphasis

olive rune
#

Oh

pale vessel
#

isn't it command_prefix=';'?

earnest phoenix
#

oop

trim saddle
#

^

earnest phoenix
#

?

#

lemme try that

#

python is weird

olive rune
#

commands.Bot(command_prefix="prefix")

earnest phoenix
#

@earnest phoenix puttint a hyphen at the end of each message is not good emphasis
@earnest phoenix what do you mean?

#

still not working

olive rune
#

python is weird
@earnest phoenix nope

#

Any new errors?

earnest phoenix
#

@earnest phoenix READ THE BLASTED RED MESSAGE
@earnest phoenix what is blasted red

#

no same

#

event cant be found

#
Traceback (most recent call last):
  File "main.py", line 30, in <module>
    @client.event
AttributeError: 'Client' object has no attribute 'event'
olive rune
#

Can you send new code?

earnest phoenix
#

My glitch hosting so lagging

#

k

#
import discord
from discord.ext import commands


client = commands.Bot(command_prefix=';')

@client.event
async def on_ready():
  print('ready')

@client.command()
async def ping(ctx):
  await ctx.send('pong')

client.run('token')
#

Py?

#

yea

#

What issue

#

Error*

olive rune
#

Are you sure you’re running that code and not the old code?

earnest phoenix
#
Traceback (most recent call last):
  File "main.py", line 30, in <module>
    @client.event
AttributeError: 'Client' object has no attribute 'event'
#

yea i am

#

Oh it is working

#

thanks

pale vessel
#

how did you fix it?

earnest phoenix
#

i forgot my token

#

because i copied my code from here

pale vessel
#

o

earnest phoenix
#

wait

#

the problem is not that

#

@earnest phoenix gev me link server add frends

#

i have some side code

#

and when i un tag it

#

it stops working

#

Sorry

#

?

olive rune
#

Can we see that code too?

earnest phoenix
#

k

slender wagon
#

how do i make a request to a certain url to give me info

earnest phoenix
#

one sec

trim saddle
#

@earnest phoenix do you have the d.py package properly installed?

lost stone
#

hey

trim saddle
#

i just ran your code and it worked just fine for me

earnest phoenix
#

@earnest phoenix READ THE BLASTED REDESSAGE
@earnest phoenix what is blasted red
@earnest phoenix the big block of text on your bot page which is just top.gg begging you to have patience and not be a dick screaming APROVUM MY BOTUM

#
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pprint
import json
import discord
from discord.ext import commands


client = commands.Bot(command_prefix= ';')


@client.event
async def on_ready():
  print('ready')

@client.command()
async def ping(ctx):
  await ctx.send('pong')


#Authorize the API
scope = [
    'https://www.googleapis.com/auth/drive',
    'https://www.googleapis.com/auth/drive.file'
    ]
file_name = 'client_key.json'
creds = ServiceAccountCredentials.from_json_keyfile_name(file_name,scope)
client = gspread.authorize(creds)

#Fetch the sheet
sheet = client.open('POTD Scores').sheet1
python_sheet = sheet.get_all_records()
print(python_sheet)

#Insert Row
row = ['1020','1010','200']
index = 7
sheet.insert_row(row,index)

client.run('i didnt forget token this time :P')
lost stone
#

hw can i use vsc without internet?

earnest phoenix
#

yeah i do

#

hw can i use vsc without internet?
@lost stone you just use it normally

#

it works when i take away the rest of the code

#

turn off your internet and use it

#

done

#

all the code after the API doesnt work

#

like now the error message is the run

last escarp
earnest phoenix
#

@earnest phoenix please hastebin your code instead of pasting everything in a code block

#

wdym hastebin

last escarp
#

mee6 developer?

earnest phoenix
lost stone
#

what is that then

earnest phoenix
#

my code

trim saddle
#

not the fucking phone screenshot

blissful coral
#

Ew

earnest phoenix
#

lmao face reveal kind of

misty sigil
#

@earnest phoenix is that a google sheet database

earnest phoenix
#

yeah

trim saddle
#

@lost stone you can't install packages without internet

misty sigil
earnest phoenix
#

it works when i either take out the discord.py completely or the API compltely

lost stone
#

uh

earnest phoenix
#

@lost stone bruh you're trying to use npm on a computer with no internet that's not VSC's fault

trim saddle
#

try reinstalling d.py

earnest phoenix
#

im using repl

lost stone
#

buy me internet

earnest phoenix
#

Best free hosting websites know anyone

olive rune
#

Pay for hosting

earnest phoenix
#

try reinstalling d.py
@trim saddle repl has it installed

olive rune
#

Free hosting is bad

#

Check pins for good hosting

trim saddle
#

maybe buy a host

misty sigil
#

Best free hosting websites know anyone
@earnest phoenix check pins

earnest phoenix
#

help

#

buy me internet
@lost stone how da fuk are you chatting on discord then

#

does anyone see a fix for my code

lost stone
#

@lost stone how da fuk are you chatting on discord then
@earnest phoenix by a code

misty sigil
#

selfbot

earnest phoenix
#

OH I SEE THE PROBLEM

#

client is reused

#

in the API

#

omg it works now

lost stone
#

selfbot
@misty sigil no

olive rune
#

Nice

earnest phoenix
#

Anyone have glitch monitor trick GWcorbinTopKek

#

omg it works now
@earnest phoenix Congrats, you just advanced to the next stage of life. Welcome to common sense.

#

Anyone have glitch monitor trick :GWcorbinTopKek:
@earnest phoenix spoonfeeding and also WHY GLITCH

#

@earnest phoenix I like it

#

i used adobe-

misty sigil
#

I like it

compact oriole
#

pretty cool

earnest phoenix
#

God stop putting a dash at the end of every message

compact oriole
#

and good color shceme

earnest phoenix
#

Anyone have glitch monitor trick GWcorbinTopKek

lost stone
#

lol

earnest phoenix
#

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

#

Fucked with this shit

compact oriole
#

but maybe make the hat dark gray

earnest phoenix
#

:((

misty sigil
#

Anyone have glitch monitor trick :GWcorbinTopKek:
@earnest phoenix bruh

compact oriole
#

like almost black but not black

earnest phoenix
#

I made an avatar command but it ain't working

misty sigil
#

provide details

earnest phoenix
#

Should I send the code?

misty sigil
#

please

#

YES

earnest phoenix
#

K

lost stone
#

who can forkfeed me
i dont want spoonfeed

earnest phoenix
#

Fucked with this shit
@earnest phoenix Or are you just refusing to accept that you're trying to do something single-handedly without learning how to do it first?

#

wait one sec

#

Nah @earnest phoenix

#

Yes

#

Yes you are

#

I made one avatar command. I want it to show like when we mention others. It should show that mentioned user avatar

#

-_-

#

Get the avatarURL of the mentioned user?

#

Yeah

#

That's what I mean

#

so grey?
@earnest phoenix yup

#

@earnest phoenix see that's why

#

Wha-

#

Do you know how discord.ext handles User avatarURL stuff

#

not experienced with Python but I'm sure you're fetching a GuildMember object instead of a User object

#

wait that's discord.js

#

Yeah

compact oriole
#

discordjs is just...

earnest phoenix
#

please send the code

compact oriole
#

bad

#

like I use js and I hate it

earnest phoenix
#

discordjs is just...
@compact oriole not meant for advanced people it's only for beginners

compact oriole
#

true

#

the caching is just braindead

earnest phoenix
#

like I use js and I hate it
@compact oriole but you used javascript for the website trivia.wtf?

compact oriole
#

well typescript and nextjs

#

the js on the site is just compiled stuff

tame kestrel
#

@earnest phoenix if you send me the code I can help you 🥺👉👈

earnest phoenix
#

Op

#

@earnest phoenix if you send me the code I can help you 🥺👉👈
@tame kestrel 🥺 👉 👈

#

@client.command()
async def avatar(self, ctx, member : discord.Member = None):
if member is None:
embed=discord.Embed(title="This command is used like this ,avatar <member mention>")
await ctx.send(embed=embed)
return
else:
embed2 = discord.Embed(title = f"{member}'s Avatar!" , colour = discord.Colour.orange())
embed.set_image(url=member.avatar_url)
await ctx.send(embed=embed2)

#

Add

misty sigil
#

@wet dove

tame kestrel
#

Try editing them in code tags around the code so it makes it look better

misty sigil
#

Wait

#

fuck I misread

wet dove
#

?

misty sigil
#

I’m an idiot

#

sorry

earnest phoenix
#

Wtw discord verified bot developer context end?? GWmythsBlobGlare GWmythsBlobGlare

#

Anyone reply me

compact oriole
#

???

#

makes no sense

earnest phoenix
#

Nope

#

how do you get a custom discord bot page...

#

that looks wayyy diffrent from top.gg

#

Redirect

#

?

#

Redirect page

#

Web

#

oh so a website.

surreal sage
#
            channel.overwritePermissions([
                {
                    id: message.guild.id,
                    deny: ["VIEW_CHANNEL"]
                },
                {
                    id: message.author.id,
                    allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"]
                }
            ])
// Discord.js v12```

I'm trying to overwrite permissions but this doesn't change anything nor error anything.
How can i fix?

Ping me if you can help me.
earnest phoenix
#

Try editing them in code tags around the code so it makes it look better
@tame kestrel Will it make it work then?

tame kestrel
#

@earnest phoenix Nope, I meant for discord.

Anyways um I haven't used discord.py like ever. So here are my two cents.

for your avatar props, you may want to change the first property to have the first input as ctx.

https://stackoverflow.com/questions/59835933/how-to-fix-discord-ext-commands-errors-missingrequiredargument-ctx-is-a-requir

Here's a stackoverflow with a similar problem.

https://discordpy.readthedocs.io/en/latest/ext/commands/api.html?highlight=context#discord.ext.commands.Context

Here's some documentation stating that this is the case.

earnest phoenix
#

Thankssssss❤️

lost stone
#

i want to put my other codes into another file as a second main file i puted
require = ("index.js") is that correct?

sudden geyser
#

no

tame kestrel
#

@lost stone nope,

the require method looks more like this:

var myModule = require("resource://path/to/my/module.js");```

If you want to learn more look up CommonJS modules 🙂
lost stone
#

so
var main2 = require("index.js")

tame kestrel
#

try it

#

Just a heads up you may want to refresh your token after this

clever thunder
#

o

tame kestrel
#

Other people can steal it and abuse it

clever thunder
#

:/

#

i will

tame kestrel
#

It takes two clicks

clever thunder
#

k i did

tame kestrel
#

@clever thunder are you on windows or

clever thunder
#

windows

#

i cant stand mac

#

honestly

tame kestrel
#

Okay well I think in windows if you want to set an environment variable you can use

#

SET KEY=VALUE

clever thunder
#

yesh thank you

tame kestrel
#

SET TOKEN=ANYTHING

pale vessel
#

you should use the dotenv module, it's much more convenient

tame kestrel
#

I didn't know that existed, thank you flaze

earnest phoenix
#

should i get a .com or .dev domain

clever thunder
#

extension

pale vessel
#

dotenv is better since it doesn't actually modify the system's environment variables

#

it just adds properties to process.env

surreal sage
#

Flaze, whyu copy chip's logo?

pale vessel
#

long story short, i had to

surreal sage
#
            channel.overwritePermissions([
                {
                    id: message.guild.id,
                    deny: ["VIEW_CHANNEL"]
                },
                {
                    id: message.author.id,
                    allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"]
                }
            ])
// Discord.js v12```

I'm trying to overwrite permissions but this doesn't change anything nor error anything.
How can i fix?
lost stone
#

if i put my bot codes into visual studio code he will be online 24/7?

surreal sage
#

lmao

clever thunder
#

i think its DEBUG CONSOLE

pale vessel
#

@surreal sage try specifying type: { id, deny, type: "member/role" }

tame kestrel
#

@surreal sage the Id for everyone isn't the guild id. You need to add everyone's id

I think the best way to get it would probably be through <guild>.roles['everyone']

surreal sage
#

@surreal sage try specifying type: { id, deny, type: "member/role" }
@pale vessel il try

pale vessel
#

the id for @everyone is the guild id

surreal sage
#

y y

lost stone
#

???!!

tame kestrel
#

is it?

pale vessel
#

yes, try<@&264445053596991498>

lost stone
#

if i put my bot codes into visual studio code he will be online 24/7?
@lost stone

pale vessel
#

264445053596991498 is this guild's id

balmy anchor
#

Hi guys,
I need help, I want to make prefix like as a variable for each server.
and the moderators at the same server could use a command to change the prefix.
Any help will be useful thx 😄

earnest phoenix
#

@lost stone No. You need a hosting provider.

#

It will only be online as long as your computer is.

pale vessel
#

so the first type should be "role" and the second one would be "member"

surreal sage
#

@balmy anchor Make a database and put for each guild its prefix

#

yea i saw

#

Did not work

#
            channel.overwritePermissions([
                {
                    id: message.guild.id,
                    deny: ["VIEW_CHANNEL"],
                    type: "role"
                },
                {
                    id: message.author.id,
                    allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"],
                    type: "member"
                }
            ])```
pale vessel
#

no errors?

lost stone
#

@earnest phoenix how can i do it?

clever thunder
#

my debug console says Uncaught Error: Cannot find 'express'

surreal sage
#

nop

#

lmao

#

npm i express

clever thunder
#

o9

surreal sage
#

@clever thunder

clever thunder
#

o

#

oki

balmy anchor
#

@balmy anchor Make a database and put for each guild its prefix
@surreal sage You mean like a .json file and I'll put there like:
Guild Settings: {
Blabla Server: {
prefix: '!'
}
}

pale vessel
#

so nothing changed in the permission overwrites for the channel

surreal sage
#

nop

earnest phoenix
#

@earnest phoenix how can i do it?
@lost stone google "hosting"?

surreal sage
#

@balmy anchor json = ew

balmy anchor
#

.txt? lol

surreal sage
#

also i did the wrong ping on a message above

#

no

#

quick.db

#

sql

pale vessel
#

json is nice but not for dynamic values

balmy anchor
#

oh ok

surreal sage
#

^

#

so, flaze?

#

It didn't give errors

balmy anchor
#

thx ill try something like this 😄

clever thunder
#

thx

pale vessel
#

nor did it set the overwrite?

#

hm

surreal sage
#

my full code is: ```js
if (command === "ticket" && botConfigs["Offical Plugins"].ticketsystem.enabled) {
if (message.channel.type === "dm") return;
if (message.guild.channels.cache.find(ch => ch.name === message.author.id)) return message.channel.send(new Discord.MessageEmbed().setTitle("You already have a ticket!").setColor("RED").setTimestamp())
const Category = message.guild.channels.cache.find(ch => ch.name === botConfigs["Offical Plugins"].ticketsystem.categoryName); if (!Category) { console.log(${chalk.red('✘')} + 'No Category Channel Set!'); process.exit(0) }

    message.guild.channels.create(message.author.id).then(channel => {
        channel.overwritePermissions([
            {
                id: message.guild.id,
                deny: ["VIEW_CHANNEL"],
                type: "role"
            },
            {
                id: message.author.id,
                allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES"],
                type: "member"
            }
        ])

        channel.setParent(Category).then(() => {
            channel.send("<@!" + message.author.id + ">").then(() => {
                channel.send(new Discord.MessageEmbed().setTitle("Ticket").setColor("GREEN").setDescription(`Inquiry: \`${a = message.content.split(" ").splice(1), delete a[0], a = a.join(" "), a.slice(1) || "None"}\``).setTimestamp())
            })
        })
    })
}```
#

nop

pale vessel
#

did it at least create the channel?

surreal sage
#

Yea

pale vessel
#

with the author id as name

surreal sage
#

And put the name etc

#

Everything but the perms

clever thunder
#

and.. that made more errors

#

:/

tight plinth
#
${a = message.content.split(" ").splice(1), delete a[0], a = a.join(" "), a.slice(1) || "None"}``` excuse me what
surreal sage
#

then ur code is wrong @clever thunder

#

@tight plinth it removes the first 2 arguments then there will be random spaces left the .join.split fixes that

tight plinth
#

replace , by ; plz

clever thunder
#
SET TOKEN = <token>
#

thats what i did

pale vessel
#

replace , by ; plz
@tight plinth no

tame kestrel
#

You want to use set token when you're running it from your console. If you're using dotenv package, you want to use whatever you had before

#

@clever thunder

clever thunder
#

o ok

#

i had the mikestead

#

ok so i did discord.js, express, and dotenv

#

and theres still errors :/

#

(node:5268) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided

trim saddle
#

uhh

clever thunder
#

uh hello?

trim saddle
#

is this sql?

ionic dawn
#

skullbite, wheres your cute furry pfp

trim saddle
#

waiting for my comissions to be done

clever thunder
#

how do i do my token

#

script

#

or help

#

:/

trim saddle
#

what library are you using?

clever thunder
#

vsc

#

.env

opal plank
trim saddle
#

that's not a library...

clever thunder
#

.js

opal plank
#

thats a language

trim saddle
#

i suggest using a json instead of .env

clever thunder
#

oki\

trim saddle
#
{
    "token": "botumtoken"
}

then require the token in your main file

clever thunder
#

k thx

prisma oriole
#

he’s using a json library guys

#

smh

clever thunder
#

so?

earnest phoenix
#

so?

balmy anchor
#

Guys I just started working with discord youtube api does anyone knows what's the prob here?

earnest phoenix
#
  1. you dont log with console.log("element","element2")
  2. idk whats wrong with ytapi
#

you can log doing [video1,video2,video3,videoArray1,videoArray2].forEach(console.log). which is probably the shortest way to do it in this scenario

balmy anchor
earnest phoenix
#

selfbot?

sudden geyser
#

console.log(1, 2) is fine.

earnest phoenix
#

is it?

sudden geyser
#

yes

earnest phoenix
#

console.log can take Infinite amount of parameters i think

#

probs ...args

opal plank
#

also forEach()

earnest phoenix
earnest phoenix
opal plank
#

i should make a tag for how poor forEach() is as a loop

earnest phoenix
#

...args

faint prism
#

Performance testing framework is coming along. Got it scaffolded and working with GET requests. Async Tasks hit it for a specified duration.
Next up is metrics, then reports, then implement the rest of REST 😛

opal plank
#

hell yeah auger

umbral zephyr
#

hi

#

i code on java script

faint prism
#

Can't share it since it's proprietary IP though 😉 (for my company)

opal plank
#

i just need to fix some small issues with my sharding(which isnt even my fault, its the lib swallowing errors)

clever thunder
#
const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
    console.log('Ready!');
});

client.login('your-token-goes-here');
#

this work

faint prism
#

looks like a stripped down example of the one of d.js lmao

opal plank
#

why would you think a snippet from the guide would be wrong?

clever thunder
#

idk lol

umbral zephyr
#
const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
    console.log('Ready!');
});

client.login('your-token-goes-here');

@clever thunder make sure client is always after commands

opal plank
#

lets teach users looking for resources is wrong

#

cuz logic

earnest phoenix
#

Wot

faint prism
clever thunder
#

i think

#

idk im dumb

opal plank
#

@clever thunder make sure client is always after commands
@umbral zephyr wrong

#

javascript (with exception of hoisting) is always run in sequence

umbral zephyr
#

will this work guyz
@faint prism yes

#

bot.on("ready", () => {
console.log(Bot is online as ${bot.user.tag});
});

trim saddle
#

@opal plank ngl, i can't stand the eris/d.js command handler

faint prism
#

Look, I know it'll work. It was a joke... lmao

opal plank
#

its actually a good handler imo

#

makes code a hell lot cleaner

earnest phoenix
#

Imagine opening useless braces on that event

trim saddle
#

the d.js handler is way too easy for users

umbral zephyr
#

im good with code

opal plank
#

which is good, its dynamic and it works fine

trim saddle
#

and the eris one is kinda under developed

faint prism
#

im good with code
@umbral zephyr Oh yeah?

opal plank
#

i dont have too many complaints tbh

earnest phoenix
#
<client>.on("ready", () => console.log(`Bot is online as ${<client>.user.tag}`));```
umbral zephyr
#

for a starter as i started a weekago

earnest phoenix
#

Easy as that, no {} needed for that

opal plank
#

though i did modify mine quite a bit

umbral zephyr
#

but my bot is good

faint prism
#

for a starter as i started a weekago
@umbral zephyr Oh, so you can't help me do a bitwise XOR? 😦

opal plank
#

thats what everyone thinks, then they learn more and see how abd the bot is @umbral zephyr

umbral zephyr
#

i use discord.js

opal plank
#

you dont purposefuly make bad code, you simply learn as you go and improve on it

#

unless you already know what you doing

trim saddle
#

i mean

umbral zephyr
#

true

trim saddle
#

there's purposely bad code

opal plank
#

i did purposefully bad code lmao

pale vessel
#

@earnest phoenix <client>.user.tag :p

trim saddle
earnest phoenix
#

Yes

faint prism
#

Is that a no, Dogo?

opal plank
umbral zephyr
#

wdym

#

Is that a no, Dogo?
@faint prism wdym

earnest phoenix
#

<Bruh>

faint prism
umbral zephyr
#

i cant help with that

opal plank
#

gates are a bit annoying ngl, minecraft has taugh me a lot

earnest phoenix
#

check out my nifty command handler @ everyone
@opal plank Anger

opal plank
blazing portal
#

check out my nifty command handler @ everyone
@opal plank my eyes 😦

opal plank
#

its so easy to trigger people here lmao

#

i'll fix it later, still busy sharding the fuck out of this

trim saddle
#

telegram is ass

faint prism
#

i cant help with that
You mean you can't help me XOR 00000101 and 00001111?

gentle lynx
umbral zephyr
#

no

balmy anchor
umbral zephyr
#

i use discord.js

earnest phoenix
#

Imagine saying "HTML is a programming language" here, you'll regret it for your life lmao

gentle lynx
#

look at

                        message.channel.send(`${food}: ${result[0][food]}`);
balmy anchor
#

(im pretty new to youtube api)

faint prism
#

It's still possible in Javascript

trim saddle
#

did you actually run the function

gentle lynx
#

i want to put this in one string

opal plank
#

HTML is a programming language, no?

faint prism
#

No

opal plank
pale vessel
#

Yes

faint prism
#

It's markup you memelord

opal plank
#

lmao

balmy anchor
trim saddle
#

i want to put this in one string
@gentle lynx it's already one string

pale vessel
#

i use css as backend

cinder patio
#

My command handler best handler

gentle lynx
#

it sends indivually

#

i want to put it in one string

trim saddle
#

ok api abuse

gentle lynx
#

i tried defining a string and doing += 'sentence here';

pale vessel
#

optimize your sql statement

opal plank
#

@gentle lynx no shit it sends each, you doing a for loop with message.send in each

gentle lynx
#

but it wont work

earnest phoenix
#

Push them into an array and join them

trim saddle
#

use foodItems.map()

gentle lynx
#

@opal plank i know

#

i want to put them in one string

#

instead of 6

opal plank
trim saddle
#

instead of for looping message.send

#

join each object to one string

opal plank
#

push into an array or concat a string

#

preferably concating a string

sudden geyser
#

console.log can take Infinite amount of parameters i think
@earnest phoenix fun fact, the maximum number of arguments you can pass is actually 65536

trim saddle
#

and then out side the loop, message,send

gentle lynx
#

there isnt hashmaps right? :(

#

could be really useful for this

opal plank
#

why would you want hashmaps in this?

#

just concat onto a string

clever thunder
#

ima stop scripting for now

faint prism
#

The XOR joke was just a^b

pale vessel
#

** 😎

faint prism
#

or that

balmy anchor
#

Guys there's anyone who knows how to use discord youtube api that can help me?

faint prism
#

discord youtube api
waitWhat

balmy anchor
#

idk

opal plank
balmy anchor
#

im new to all of this

opal plank
#

there is a discord packacge for ytdl iirc though auger

#

lemme see if i can find it

faint prism
#

I only know how to use wikigoognetflitwitter's api

opal plank
balmy anchor
#

thx

honest perch
#

ew ytdl

opal plank
#

ew music bots

honest perch
#

ew money

faint prism
#

ew general-purpose bots

opal plank
#

good luck buying ipv6's blocks

honest perch
#

good luck buying ipv6's blocks
@opal plank i mean if you can balance everything

#

its not bad

opal plank
#

see ya in 5 days once you realise music is a bad idea if you dont want to put in money for music bots @balmy anchor

honest perch
#

funnily enough i havent cycled a single ip

opal plank
#

its all about usage, that shit will get your quota done in 3 seconds

honest perch
#

but with ytdl will get you banned after 2 songs

earnest phoenix
#

@gentle lynx All that was possible with this

let items = message.client.items.filter(i => i.category === "Food");
let foods = await Promise.all(items.map(it => message.client.con.query(<sql query with 'it'>)));

message.channel.send(Object.entries(foods).map(f => `${f[0]}: ${f[1]}`).join("\n"));```
#

I think

opal plank
gentle lynx
honest perch
#

ew sql

#

all my homies use json

gentle lynx
#

bruv

#

i used to use json

opal plank
#

imagine not using a single .txt file as your database, scrubs

honest perch
#

0:

gentle lynx
honest perch
#

i need

gentle lynx
honest perch
opal plank
#

i will kink shame you if you dont use postgres or cassandra, end of story

honest perch
#

cassandra do be hot

earnest phoenix
#

i used to use json
@gentle lynx 0.0, happy u don't use it anymore lool

gentle lynx
#

yes

earnest phoenix
#

I am doing an on message event that only works when the message is in the DMs. That works perfectly. ALl my other commands are not working now. How do I fix this?

discord.py

#

There is no error message or anything

lost stone
solemn latch
#

iirc, quickdb has a troubleshooting page on their page

earnest phoenix
#

hello can someone help me

#

all my commands are not working

pale vessel
#

"not working" does not help

#

obviously there's a reason why it didn't work; you need to tell us that

#

were there any errors?

#

don't just say "it no work!!1"

earnest phoenix
#

no

#

just didnt work

#

i stated stuff here:

#

I am doing an on message event that only works when the message is in the DMs. That works perfectly. ALl my other commands are not working now. How do I fix this?

discord.py

thin turret
#

Do they work inside the dmsm

earnest phoenix
#

no

#

only the part in the on_message event works

#

nothing else

#

let me skim over the docs

#

oh i see the problem in FAQ
I didnt put this line

await bot.process_commands(message)
#

it works now

livid lichen
#
function SetRedditPost(table){
  try{
    const subreddit = table[Math.floor(Math.random() * table.lenght)];
    const { body } = request
      .get(`https://www.reddit.com/r/${subreddit}/hot.json`)
      .query({ limit: 100 });

    const posts = body.data.children.filter(post => {
      if (!post.data)
        return false;
      return types.includes(post.data.post_hint) && post.data.url && post.data.title && !post.data.over_18;
    });

    if (!posts.lenght)
      return;

    const post = posts[Math.floor(Math.random() * posts.lenght)].data;
    
     request
      .post(`https://disocrdapp.com/api/webhooks/${POSTER_ID}/${POSTER_TOKEN}`)
      .send({ content: `${post.title}(<https://www.reddit.com${post.permalink}>)\n${post.url}` });
    
    logger.info(`Posted "${post.title}" from r/${subreddit}.`);
  } catch(err){
    logger.error(err);
  }
} ``` Cannot read property "data" of null.
#

Huh

#

Maybe I need to implement a delay function?

earnest phoenix
#

why are you using a deprecated lib

livid lichen
#

Explain?

faint prism
#

Maybe I need to implement a delay function?
@livid lichen if you mean adding a hard-coded sleep, don't do that outside of debugging.

livid lichen
#

@livid lichen if you mean adding a hard-coded sleep, don't do that outside of debugging.
@faint prism Alright.

#

Thanks for the help.

earnest phoenix
solemn latch
#

libraries are maintained by their creators. once they are no longer maintained they become "deprecated"
generally you should stop using deprecated libaries

#

they will stop working, or even worse become a security risk.

livid lichen
#

Yeah.

#

Except I can't find a non-dep lib.

earnest phoenix
#

node-fetch

livid lichen
#

I am using that-

#

nvm

earnest phoenix
#

you're using request

livid lichen
#

Yea

#

But how would I customize my function to a new lib?

earnest phoenix
#

read the readme on node-fetch

#

it has a ton of samples

livid lichen
#

I changed request to node-fetch.

pale vessel
#

change your request structure too

near otter
#

I Made A Discord Music Bot. It's Working 24/7. I Made A .bat File In The Code Folder To Start The Program. When I Close The .bat File The Bot Stays 24/7 Online But It's Not Replying To My Commands. When I Start The .bat File It Start To Reply To Commands. I Want Some Help For This. Because When I Release My Bot To The Discord Page It's Gonna Be A Problem, Cause I Can't Keep My Local Machine Powerup For Forever.

earnest phoenix
#

well... yeah

misty sigil
#

You need to run the bot constantly

earnest phoenix
#

why do you think it would magically stay on if you close it

near otter
#

No, Cause I 'm New To This.

misty sigil
#

it’s kinda easy to assume

earnest phoenix
#

doesn't matter if you're new to programming or not, it's common sense lol

#

can your pc be on if it has no power?

near otter
#

no

faint prism
#

When I Close The .bat File The Bot Stays 24/7 Online
Sounds like a token leak

earnest phoenix
#

that's the same case here

misty sigil
#

turns off PC -> "Why PC no work?"

near otter
#

yeah but how i'll get the power for my bot

earnest phoenix
#

that was just terminology

#

if you close the thing that's running the bot, it obviously won't stay on

misty sigil
#

by leaving it on

#

Or buying a vps

near otter
#

you mean my local computer

#

on

misty sigil
#

yes

faint prism
#

or an android phone mmLol

misty sigil
#

With the batch file

drifting wedge
#
OSError: cannot write mode PA as PNG```
#

op1.save('op1.PNG')

#

py

quartz kindle
#

what are you trying to save...

#

what is op1

drifting wedge
#

a file

#

a image

near otter
#

i have an computer which is not use to me

drifting wedge
#

its the users pfp

near otter
#

i will use that, thank you for the advice

quartz kindle
#

how did you create op1? what does op1.save do?

drifting wedge
#
            fp = io.BytesIO(raw_image_data)
            im = Image.open(fp)
            im = im.resize((150, 150));

            bigsize = (im.size[0] * 3, im.size[1] * 3)
            mask = Image.new('L', bigsize, 0)
            draw = ImageDraw.Draw(mask)
            draw.ellipse((0, 0) + bigsize, fill=255)
            mask = mask.resize(im.size, Image.ANTIALIAS)
            im.putalpha(mask)

            op1 = ImageOps.fit(im, mask.size, centering=(0.5, 0.5))
            op1.putalpha(mask)
            op1.save('op1.png')```
quartz kindle
#

what is imageOps

#

a library?

drifting wedge
#

yes

#

PILLOW

quartz kindle
#

what version

drifting wedge
#

newest?

quartz kindle
#

im checking the docs for 7.2.0 idk if thats the right now

drifting wedge
#

Pillow==7.2.0

#

yep

quartz kindle
#

do im = Image.open(fp).convert("RGB")

drifting wedge
#

it has to be rgba

#

its complicated

quartz kindle
#

you add alpha later

#

with putalpha

drifting wedge
#

?

#

why cant it just be now?

quartz kindle
#

you're adding alpha later

earnest phoenix
#

I need help on how to do something. Every day at 12:00 AM PST, i want to do a command. My bot runs all the time so it will be able to do it. I know how to do it once, but i want it to do it every day.

still merlin
#

then run a command at 12:000 PM PST

earnest phoenix
#

how

still merlin
#

Be on your computer, type the command, click enter.

drifting wedge
#

not helpful