#development

1 messages Β· Page 203 of 1

sharp geyser
#

written using discordjs v13

#

well tim's djs-light v13 at least

#

its stupid how much it uses

#

in mac's case assuming no overhead from anything else its roughly 100-130mb per server.

#

I haven't been in the bot dev scene in a while so idk if that is abnormal, but it seems to be so

lament rock
#

That is very excessive

sharp geyser
#

I thought so

#

Then again when I was in the scene djs was my poison so it was normal for me even then

#

Though I think it’s gotten worse KEKW

sharp geyser
quartz kindle
#

djs now uses finalizationRegistry for memory management

sharp geyser
#

no idea what that is

quartz kindle
#

which makes it use even more ram, ironically

sharp geyser
#

I wonder what serenity's memory usage looks like

quartz kindle
#

but i remember logging into my bot with a barebones djs v12 would use 500-600mb on ready

#

and on v13 it would use 800-900mb

sharp geyser
quartz kindle
#

let me test v14 real quick lel

sharp geyser
#

and they don't see this as a problem?

quartz kindle
sharp geyser
#

I mean

#

js is kinda meh on ram usage

#

but still

#

900 mb on ready

#

πŸ’€

lament rock
#

Djs' class based approach is a shot to the foot since import strings are excessive on the memory footprint

quartz kindle
#

not to mention the cpu waste by moving data all over the place

#

933mib rss, 856mib heap

lament rock
#

glad I moved away during v12

quartz kindle
#

10109 guilds

frank hatch
#

hi

frosty gale
#

they add this but dont add decorators

quartz kindle
#

i guess someone wanted to have a way to receive a callback when an object gets garbage collected

frosty gale
#

gc gets called whenever it feels like it

#

i only see it useful for detecting memory leaks

quartz kindle
radiant kraken
#

but in return you get a giant executable size with over 500 dependencies

#

but it saves a lot of money (plus D++ is one of the most overly well documented C++ libraries out there)

sharp geyser
#

Indeed it saves money

#

but I do not recommend it as a lib for small bots

#

The jump from JS to C++ is too big a gap, its also not worth using if you are already invested in djs and your bot is still growing. It's better off to continue using djs/javascript as a whole until you actually need it.

#

Unless you are completely new to programming, at which point I will always encourage someone to go for a statically typed language like C++

radiant kraken
sharp geyser
#

While that is the case, I also don't think its a terrible first language.

radiant kraken
#

it is

sharp geyser
#

to each their own ig

radiant kraken
#

i absolutely despise the fact that it's the first language of many CS students

sharp geyser
#

C++ while annoying to work with, teaches you a lot of the fundamentals of CS

sharp geyser
#

its the optimal language for computer science as it stands right now

#

It works on any system, is low level enough, teaches you about memory management

radiant kraken
#

Java and C# are really good statically typed beginner languages

#

when i started learning C++ for the first time, i immediately quit after seeing all of the examples show << and >>

#

like why would operator overloaded functions good to show to first-time beginners

sharp geyser
#

Thats nitpicky though

#

Also, the reason (from what I can only tell because idk what those guys think) that c++ is taught in CS classes is because of its versatility

#

It can run on any system without anything other than a compiler, which comes with the OS

#

unless you want to use something like clang, but I digress that you can get by with the default compiler

#

the requirements to run a c++ program is also very low, you can have a super low end system or microcomputer like a rasp pi and it will run on it just fine without issues. While yes java and C# can do that to, but you need to install the .Net sdk or the jdk to even run a C# or java program

radiant kraken
#

i would recommend going on to higher level languages first, then jump to lower level langs

sharp geyser
#

Depends on what you want to do

#

starting off on a higher level language isn't always the best

#

If you never need it, why learn it.

#

your efforts are better spent in the area you want to study

radiant kraken
#

isn't that a bit too much for a first-time programmer...?

sharp geyser
#

Not necessarily

#

I mean, a lot of the people who go to college for computer science don't necessarily know what any of that stuff is either

#

They are expected to learn it though

#

There is a reason its widely taught is all I am saying.

radiant kraken
#

huh? the top #1 uni here teaches Python in its first semester, then Java in the following semesters

sharp geyser
#

It may not be the most beginner friendly, but it also teaches you a lot more. Now if you don't want to go into CS then you dont really need C++ unless you just want to learn more about the system as a whole. Cause thats what C++ ultimately teaches you, how to make use of the hardware

sharp geyser
radiant kraken
#

ah icic

sharp geyser
#

Either way, C++ is still imo a good first choice to learn a language

#

Though if you don't like a challenge then dont choose it

#

Some people like to challenge themselves (like me)

radiant kraken
#

yup, and that's fair

sharp geyser
#

I mean I literally jumped into rust head first on a big project

radiant kraken
sharp geyser
#

huh

#

does windows not come with the gcc compiler?

quartz kindle
#

no, you have to install visual studio

sharp geyser
#

da fuq

#

I didn't install visual studio and still managed to do it

#

πŸ€”

quartz kindle
#

windows compiler is msvc

#

its included in visual studio

#

you can install visual studio build tools separately tho

sharp geyser
#

All I did was install vscode

#

and it worked

quartz kindle
#

but its still part of visual studio

sharp geyser
#

maybe I already had the compiler installed at some point

#

I do a lot of shit I don't remember

quartz kindle
#

it was a thing to install it via npm

#

npm install windows-build-tools

sharp geyser
#

Oh maybe thats how I got it

quartz kindle
#

i think now node has an option to bundle them for you

sharp geyser
#

even more of a reason on why I already had it then

#

great now I look like a moron

#

πŸ’€

quartz kindle
#

lmao nah

radiant kraken
#

i dont recommend jumping into the MSYS2/MinGW rabbit hole for GCC

sharp geyser
#

yes I chose to install clang as well

#

fuck gcc

eternal osprey
#

hey guys

#

this is my priing page atm. Does anyone have suggestions? Any things i can add?

sharp geyser
#

Good rule of thumb, black on a background image is not ideal

#

Especially if its a dark background image

#

Use a grey washed white

#

something thats not too bright, but not too dark

#

Also kind of nit picky, but for the free plan it makes no sense to say its price is $0.00 billed monthly. Just display the "Choose Plan" button

eternal osprey
#

hmm what do you think of this layout

#

i think it's better than the first

eternal osprey
#

pretty colorful

sharp geyser
#

yea but black on a purple background

#

purple is already a dark color

#

so mixing 2 dark colors together to some people can be harder to read

sharp geyser
#

jokes aside Yea that layout looks better

eternal osprey
eternal osprey
eternal osprey
#

i think that this is the total pdrocut

#

what you think?

sharp geyser
#

Looks good to me

eternal osprey
#

yuhh lets go

#

idk i am currently creating the site but i am scared to publish it in the end

#

like, suppose there will be errors and such

#

i'll have to test the backend a lot

green kestrel
#

in all seriousness add a "enterprise/custom plans: contact us"

frosty gale
#

the fuck is tiktok cooking

#

why do they need a kernel developer

#

it looks like they either maintain their own linux for whatever reason or contribute to the linux mailin

radiant kraken
frosty gale
#

its funny how you can gauge the kind of internal and confidential projects a company is working on just by looking at their jobs page

radiant kraken
#

they tracked your clipboard and now they want your kernel

surreal sage
#

please

#

is there any way

real rose
#

there is not

surreal sage
#

to make vsc run extensions on the client and not on the remote server

#

I have this but it's not doing anything

surreal sage
real rose
#

hm

final lake
#

how to remove a bot from top.gg

real rose
#

the delete button

#

on the bot page

sharp geyser
#

how do i get to the bot page

real rose
#

do you need help getting to top.gg

sharp geyser
#

yes πŸ₯Ί

warm surge
#

no

glass acorn
#

Made options so that the user can choose items to buy from the economy shop

lyric mountain
#

that'll grow out of hand

lyric mountain
#

I mean, json is just a map

#

you just need to take care of cyclical nodes

sharp geyser
#

I don’t see why not?

acoustic dawn
#

Hello everyone! I just tried adding bots to my server for the first time ever and from top.gg They're all offline and don't work, would anyone know how to fix this issue? Thanks! Any help is appreciated!

sharp geyser
acoustic dawn
sharp geyser
#

It’s very well possible to be a visual bug

#

Also likely it’s offline for your guild if the bots sharded

wheat mesa
#

Arrays in static languages are different than arrays in dynamic languages

#

Arrays must have a known size at compile time

#

Anything else in rust is considered a "slice"

#

Which is a view into an array of sorts

#

What you're probably looking for is a vector

#
let some_array_of_zeroes = [0; 5];
#

Makes an array of [0, 0, 0, 0, 0]

#

Pretty sure you don't need that type annotation

#

Type inference is nice :p

sharp geyser
#

you just give it a size and it infers it

wheat mesa
#

You don't even need a size iirc

sharp geyser
#

really?

#

I thought you were forced to give it a size

sharp geyser
#

you are forced to give it both the type and size

wheat mesa
#

eh

sharp geyser
#

compiler complains otherwise

wheat mesa
#

static is weird and I don't like static in rust

sharp geyser
#

I try to avoid static myself

#

btw waffle

#

me and null are working on a game in our spare time

#

using rust

wheat mesa
#

bevy?

sharp geyser
#

Yessir

wheat mesa
#

I see

#

I wasn't a fan of rust for gamedev honestly

#

Not quite there yet imo

sharp geyser
#

Its pretty cool and I was getting bored of working on just one thing.

#

Have you looked at bevy?

#

Its not as well developed as built up engines like unity or godot

wheat mesa
#

yeah I actually stole their ECS for a project I was making instead of making my own

sharp geyser
#

but its pretty well built

wheat mesa
#

("stole" meaning used the bevy-ecs crate)

sharp geyser
#

lol

#

yea thats the beauty of bevy

#

its all plug n play

#

don't want their renderer? make your own!

wheat mesa
#

I haven't had the time to make any personal projects in a while

#

I wish I did

sharp geyser
#

College do me rough sadgemusic

wheat mesa
#

Just finished my first year at college though

sharp geyser
#

Luckily I am not dealing with college atm so I have loads of free time

wheat mesa
#

I'll have some time for literally a week then I go back to college πŸ’€

sharp geyser
#

That's rough

#

I didn't know college was that fast paced

#

Thought they'd give you at least 2 weeks off

wheat mesa
#

I have the summer off technically

#

But I'm going to community college over the summer to get some courses out of the way for cheap

sharp geyser
#

I see

wheat mesa
#

And that starts like may 14th or something

sharp geyser
#

So its busy by choice

wheat mesa
#

Yeah basically

#

But it'll also enable me to graduate a semester earlier so

#

Worth it

sharp geyser
#

Not bad

#

Are you going for 4 years?

#

or only 2?

wheat mesa
#

Technically 3 for my bachelor's and 1 for my master's

#

4 total

sharp geyser
#

Oh damn

#

Not bad

wheat mesa
#

I'll have my bachelor's spring 2026 and masters spring 2027

#

Or at least that's the expected timeline for me rn

sharp geyser
#

Dayum

#

Good luck with that man

#

What are you specializing in?

wheat mesa
#

Majoring in comp sci but probably specializing in interactive systems (computer graphics focused)

sharp geyser
#

Oooo

#

Seems fun

#

question

#

why do you convert file_name to a string only to convert it back into a slice

#

you can log slices

ashen notch
#

How do I make the bot send a message like mine?

frosty gale
#

i would look at discord api docs but since im making a chat app rn i dont want to take too much inspiration from discord

lament rock
#

@ashen notch

ashen notch
lament rock
#

The code for doing it is there

#

You have to figure out how to use djs internals to do it

quartz kindle
#

voice messages need 3 things: the IsVoiceMessage flag, the duration of the audio, and the waveform data

lament rock
#

the waveform can be an empty string

quartz kindle
#

i dont think discord.js has any tools to generate waveforms

#

if an empty string works, then its easy

lament rock
#

Very

quartz kindle
#

does discord generate a waveform from the audio?

lament rock
#

I was looking into how to generate one

#

Yes it does. There's a max of 256 samples iirc

ashen notch
#

I am not understanding xd

quartz kindle
ashen notch
#

oh ok

quartz kindle
#

although you probably need to generate the attrachment using djs's attachmentBuilder first

ashen notch
# quartz kindle try this then: ```js await message.channel.send({ files: ["./temp/voice-messag...

Error generating or saving audio: DiscordAPIError[50035]: Invalid Form Body
attachments[0].id[BASE_TYPE_REQUIRED]: This field is required
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:374:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 1,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { attachments: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}

quartz kindle
#
const file = new AttachmentBuilder("./temp/voice-message.ogg");
await message.channel.send({
  files: [file],
  attachments: [{
    id: file.id,
    duration_secs: 9999, // your audio file duration here
    waveform: ""
  }],
  flags: 1 << 13
})
frosty gale
quartz kindle
#

try this then

#
await message.channel.send({
  files: [{
    attachment: "./temp/voice-message.ogg",
    duration_secs: 9999, // your audio file duration here
    waveform: ""
  }],
  flags: 1 << 13
})
#

otherwise idk, i'd need to see the djs source code to see how they merge the file data with the attachment data

#

but im going out now

ashen notch
quartz kindle
#

what error this time?

ashen notch
# quartz kindle what error this time?

Error generating or saving audio: DiscordAPIError[50161]: Voice messages must have supporting metadata
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:374:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 8192,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Voice messages must have supporting metadata',
code: 50161
},
code: 50161,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}

quartz kindle
#

according to the source code, this should work

#
const file = new AttachmentBuilder("./temp/voice-message.ogg");
await message.channel.send({
  files: [file],
  attachments: [{
    id: 0,
    duration_secs: 9999, // your audio file duration here
    waveform: ""
  }],
  flags: 1 << 13
})
ashen notch
# quartz kindle ```js const file = new AttachmentBuilder("./temp/voice-message.ogg"); await mess...

Error generating or saving audio: DiscordAPIError[50035]: Invalid Form Body
attachments[1][ATTACHMENT_NOT_FOUND]: Attachment data not found
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:375:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 8192,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { attachments: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}

lament rock
#

Not exactly what I wrote for the code but whatever

ashen notch
#

But do when you're home! I'm not in a hurry

lament rock
#

How about you just install snowtransfer and use that

#

:)

#

and delete discord.js while you're at it

#

:))

quartz kindle
#

^

#

anyway seems like im not going out anymore for now

ashen notch
#

Ah

quartz kindle
ashen notch
quartz kindle
#

im looking at the djs source code

#

its gonna need some hacking for it to work lol

#

as usual, djs makes things complicated

ashen notch
quartz kindle
#
const { MessagePayload } = require("discord.js");
class VoiceMessagePayload extends MessagePayload {
  resolveBody() {
    super.resolveBody();
    this.body.flags |= 1 << 13;
    this.options.files.forEach((file, index) => {
      const attachment = this.body.attachments.find(att => att.id === index.toString());
      attachment.duration_secs = file.duration || 0;
      attachment.waveform = file.waveform || "";
    })
    return this;
  }
}


const payload = new VoiceMessagePayload(message.channel, {
  files: [{
    attachment: "./temp/voice-message.ogg",
    duration: 999 // your file duration here
  }]
});


await message.channel.send(payload);
#

no idea if this works

ashen notch
#

xd

quartz kindle
#

edited

ashen notch
quartz kindle
#

i mean, i edited/updated my original message

ashen notch
#

oh ok

#

WORK!!

#

thxxx

quartz kindle
#

lmao

#

cool

ashen notch
quartz kindle
#

nice

ashen notch
sharp geyser
#

Since when was a thing they can send voice memos

#

πŸ’€

quartz kindle
ashen notch
#

Ok thxx

quartz kindle
#

try this

#
sharp geyser
#

honestly kind of cool bots can send them like that

#

used to only be able to send the files as they are

ashen notch
#

Yes, in fact I thought it couldn't work xd

sharp geyser
#

L bozo skill issue

#

try better next time

#

🀑

spark flint
#

lol

sharp geyser
#

but nah thats weird

#

wonder what you did differently

sharp geyser
spark flint
sharp geyser
#

hm

spark flint
#

it downloads the ogg from youtube as webm, converts to ogg then sends

sharp geyser
#

that might be the problem

#

How are you converting it?

spark flint
#

ffmpeg

sharp geyser
#

πŸ€”

spark flint
#

lemme test converting manually

#

sending manually doesn't work

sharp geyser
#

hm

frosty gale
#

dont see how it works for that guy but not for you

#

definitely not a discord.js version issue?

sharp geyser
#

discord client version?

frosty gale
#

possible as well

#

although discord is usually good at keeping desktop clients up to date

#

its probably not an ogg issue but you can try using something else as an ogg file that isnt youtube

#

idk i havent touched discord bots in 20 years

sharp geyser
#

Aktually discord bots haven't been around for 20 years

#

πŸ€“

spark flint
#

lol

#

this doesn't work either

sharp geyser
#

Buffer is deprecated

frosty gale
#

sorry let me buffer.from really quickly

sharp geyser
#

thanks

pale vessel
#

does files also create an attachment field in the payload?

#

even if it does, it needs to have the id as 0 to refer to the first file for the voice message to work

sharp geyser
#

nice token

frosty gale
#

delicious token yum yum

sharp geyser
#

time to send spam requests with his bot token

frosty gale
#

by the way only real ones remember when tokens used to start with NT and not Nj

#

probably time based or something

sharp geyser
#

now they start with MT

frosty gale
#

oh right

sharp geyser
#

but nah I remember my token by heart for my bot I made back in 2014

frosty gale
#

discord tokens are the most overengineered thing ever

#

they made them so complicated for no reason

#

just make it a string of random characters pelase

sharp geyser
#

just make it a number

#

πŸ™„

frosty gale
#

keep the preamble for automatic detection of leaked tokens but thats all thats needed

radiant kraken
sharp geyser
#

choose a random timestamp and make a request

#

do so until you get a valid token

elder eagle
#

Hi guys, sorry, I need a hand

#

Hi guys, sorry, I need a hand.
I created the /clear command to delete messages but I noticed that I can't delete messages older than 14 days and I can only delete a maximum of 100 at a time (due to the .fetch limit).
I need to bypass these 2 limits, do you know how I can do it?

Here is my code:

deft wolf
#

The 14-day limit cannot be bypassed, no bot can. The only option is to delete the entire channel

#

As for the limit of 100 messages at once, you can call this function several times in your command, not just once. Wait until the first 100 messages are deleted and then delete the next 100

#

It would probably also be possible to fetch 1000 messages from a channel, for example, and delete them one by one every second or something like this

#

I don't know what the rate limit is, I wasn't too interested in deleting messages

quartz kindle
#

isnt the 14 day limit only applied to bulk delete?

#

i believe if you use the normal 1 at a time delete, the 14 day limit doesnt apply

#

but its ineficient af holy

#

it would take years to delete hundreds of thousands of messages

deft wolf
#

So it will be a real pain in the ass to delete a "significant" amount of messages

stiff tide
#

hey can someone help me ?

#

new to bots being in my server i jus wanna kno how to edit my afk bot settings

harsh aspen
#

Best thing is to let the afk bot support help you

frosty gale
#

thats why i dont like UUIDs because even though the chance of a collision is basically 0 its still possible

#

and if it does happen bad things could happen

frosty gale
#

although id personally set a limit on the amount of messages you can bulk delete rather than the days

frosty gale
#

does anyone know when the browser decides to download an image when viewing it in url and when it decides to preview it without downloading it?

#

im sending an image back as a response and even setting content type as the image mimetype (which is jpeg) but it keeps downloading it instead of previewing

pale vessel
#

did you check the response headers?

#

either

  1. it didn't set the content-type header properly
  2. it somehow has a content-disposition header
  3. the image is corrupted (i doubt it is if you already checked)
frosty gale
#

strange it seems to be set properly

HTTP/1.1 304 Not Modified
vary: Origin
content-type: image/jpeg
accept-ranges: bytes
cache-control: public, max-age=0
etag: W/"fbdb-18f43aa7f35"
content-length: 0
Connection: keep-alive
Keep-Alive: timeout=72
#

and the image is definitely intact

#

maybe its the fact it has a fucked up version of the cache since its sending back 304?

#

ill try hard reload

pale vessel
#

why's the content-length zero lol

#

are you sure the image is valid

frosty gale
#

probably because its sending back a 304 which tells browser to use cached copy

#

so it doesnt send the actual image

#

aah finally

#

i cleared the cache and now its working

#

i guess it had a broken cache from when i was debugging earlier

pale vessel
#

are the images supposed to be cached?

#

if it's something that returns something different every time, you probably shouldn't cache them i suppose

frosty gale
#

yes since they are attachments so they are expected to be static

#

so i enabled every kind of caching for them

pale vessel
#

gotcha

frosty gale
#

etags and whatnot

spark pebble
#

Whats this "Activity Ended, start a new one?" stuff

#

turns out it's not happening to anyone else using my bot?!?!?!

spark flint
#

its a discord issue

spark pebble
#

Honestly, my first course of action when anything seems wrong is to blame Discord from this moment on

spark flint
#

lol

sweet matrix
#

Hello supporters , I have a problem in my account , he gave me this error

#
const { AutoPoster } = require('topgg-autoposter')

const ap = AutoPoster('my token', Client)

ap.on('posted', () => {
  console.log('Posted stats to Top.gg!')
})```this is the error ```    throw new Error('Unsupported client');
    ^

Error: Unsupported client
    at new AutoPoster (C:\Users\med-r\Downloads\Myths-Ver.3\node_modules\topgg-autoposter\dist\index.js:46:11)
    at Object.<anonymous> (C:\Users\med-r\Downloads\Myths-Ver.3\index.js:162:12)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.18.0```
warm surge
sweet matrix
# warm surge again what client are you using

The bot called Myths-Bot : https://top.gg/bot/731948524203147304
the is the client ```javascript
const discord = require('discord.js');

const client = new discord.Client({
intents: [
discord.GatewayIntentBits.Guilds,
discord.IntentsBitField.Flags.GuildMembers,
discord.IntentsBitField.Flags.GuildMessages,
discord.GatewayIntentBits.GuildMembers,
discord.GatewayIntentBits.GuildMessages,
],
partials: [discord.Partials.Channel]
});```

warm surge
#

lowercase

warm surge
#

bru

sweet matrix
#

this is not the problem i guess cause i changed it already , and also don't worked

warm surge
#

remember it will post every 30 minutes

sweet matrix
#

Oooooh πŸ€¦β€β™‚οΈ its worked rn

#

thank uu

warm surge
#

your welcome

sweet matrix
#

hmm what about the votes i think don't work

#
const Topgg = require("@top-gg/sdk")
const express = require("express")

const app = express()

const webhook = new Topgg.Webhook("my auuth")

app.post("/dblwebhook", webhook.listener(vote => {
  // vote will be your vote object, e.g
  console.log(vote.user) // 395526710101278721 < user who voted\

  // You can also throw an error to the listener callback in order to resend the webhook after a few seconds
}))

app.listen(80)```
#

Webhook Auth i think this one , yes or no ?

#

but why he doesn't work

warm surge
#

It’s

#

but it’s usually your host ip and port and /dblwebhook

sweet matrix
warm surge
rose warren
#

Does anyone know why pinging some users doesn't add them to my thread? They do have permission to view the channel the thread is in.

#

When they join the server my bot adds a role to them automatically on the guildMemberCreate event and then creates a thread in the channel and pings them in it. It works for some members, but not for others. Even if I manually try and ping them myself to add them it doesn't work.

warm surge
rose warren
#

Even if I manually try and ping them myself to add them it doesn't work.

#

But then it will later on

#

even with no additional perms

warm surge
rose warren
#

Where is this issue documented?

warm surge
#

im not sure since this been happening for years now.

rose warren
#

Well I've only noticed it in the last couple of weeks

warm surge
#

ask in discord developer server

harsh aspen
#

Check category permissions

warm surge
#

They might have documentation to give you im not completely sure

rose warren
#

I'd like to think I can figure out Discord channel permissions with my experience kekw

#

That's not the issue

warm surge
rose warren
#

Everyone gets exactly the same role on joining but some can be added to threads and others can't

#

So it's not permissions

#

I even tried manually verifying them (accept rules) and pinging after that and it didn't work either

warm surge
#

it’s discord issue

harsh nova
#

Might be you hitting the thread members limit?

rose warren
#

It's like 7 people per thread so I doubt it?

harsh nova
#

Can't remember the exact number but iirc a thread can only have 1k members

warm surge
harsh nova
rose warren
#

It's for premium support tickets so no

#

Man I hate Discord mayaLaugh

#

That's the answer I didn't want to hear

#

Because there's nothing I can do I guess

warm surge
warm surge
rose warren
#

wdym?

#

they already get force added to the server when they subscribe. the flow is:
sub β†’ get added β†’ get given role β†’ get thread made β†’ get pinged in it

warm surge
rose warren
#

even if they're already in the server it doesn't work

#

i had a guy who's been in the server for 2 months prior to subscribing who couldn't be added to the thread

warm surge
#

You can add users by using pixxie

rose warren
#

that's the same as just pinging though no?

outer crater
#
#include<stdio.h>
#include<string.h>

struct info{
  char name[64];
    struct DOB{
      int date;
      int month;
      int year; 
    };
};

int main() {

  struct info usr1;
  struct DOB dob;
  strcpy(usr1.name, "Guy");

  usr1.dob.date = 7;
  usr1.dob.month = 5;
  usr1.dob.year = 2005;
  
  printf("name: %s\nDOB: %d-%d-%d", usr1.name, usr1.dob.date, usr1.dob.month, usr1.dob.year);

  return 0;
}
#

whats wwrong here

warm surge
#

await thread.members.add('140214425276776449');

rose warren
#

yeah i guess i can try that and see if it fixes it

#

alright i'm trying this to see if it'll work for the next ones

deft wolf
rose warren
#

gotta love how unreliable discord is

#

like if this is the solution and i wasn't a bot dev how would i add these people to threads? mayaLaugh

#

it's been half an hour and now the manual ping works

#

through my account

#

i don't get it, like nothing changed

sharp geyser
neon leaf
#

does discordjs have some sort of list const of all default discord emojis

frosty gale
#

theres probably an npm library that gives you a list of those emojis or whatever you need to do with them

neon leaf
rose warren
#

Why not just use unicode? I don't get it mayaLaugh

eternal osprey
#

hey guys does anyone have suggestions of what i can do here?

#

i think it looks decent already but i might be too inexperienced lmao

pale vessel
#

dark mode?

eternal osprey
#

nahh

#

not needed

frosty gale
#

weve all been there

rose warren
#

And make your top nav align with the left side of the FAQ section

#

It'll give the page a lot more structure

neon leaf
rose warren
#

Why do you need them though? What does that package achieve?

neon leaf
#

Im making a memory minigame

rose warren
#

Cool

queen needle
dense leaf
sharp geyser
#

I mean thats something anyone who reads the docs would figure out

radiant kraken
#

but it's a good thing to know either way

frosty gale
flat copper
#

is there any way i can append react component to a parent div ? without resetting it, i tried reactDOM.render it resets

real rose
#

bro

spark flint
real rose
#

not another

subtle spindle
#

?

spark flint
#

just temp block the role ID on automod

#

*868548511279480893*

subtle spindle
#

What's this

real rose
#

fake account bru

#

it's not official topgg

#

quick check will show that

spark flint
#

acc made today
acc just joined
acc telling you to run a command to... verify you

subtle spindle
#

Srry

real rose
spark flint
#

yeah

real rose
spark flint
#

might just be my paranoia but i always check dm authors before reading their instructions lol

real rose
#

so do i πŸ’€

subtle spindle
#

I was just curios

spark flint
#

curiosity killed the cat

subtle spindle
#

Uhm...

#

My cat just die

spark flint
#

...uhh

#

my bad

real rose
sharp geyser
quartz kindle
#

:^)

real rose
harsh nova
#

Another one

ivory siren
real rose
#

no

modern sable
#

someones doing the haha funny

radiant kraken
#

do you really need the header files though?

#

i find it unnecessary in my case

#

i don't generate any header files and it still works

#

what matters is the .dll/.so/.dylib file that was generated

#

then you can System.loadLibrary those files

#

i still dont think you need to generate a single header file

#

unless you're using C/C++ to interface with jni

#

wait so you are calling java from rust?

#

why tho

#

i guess you can write most of the code in rust and write some java code that interacts with the Java API

lyric mountain
#

there are like 8 other jvm languages

radiant kraken
#

but you would still need to use gradle to run it

lyric mountain
#

all compatible with java

radiant kraken
#

kotlin is pretty nice

lyric mountain
#

I dislike the syntax

sharp geyser
#

kotlin is like if java and js had a baby

lyric mountain
#

nah that's groovy

#

kotlin is more like ts

radiant kraken
#

kotlin is just java but sane

sharp geyser
#

I used kotlin a while back

#

I actually made a issue on haku's pagination library for JDA

radiant kraken
lyric mountain
#

what was it about? dont remember it

sharp geyser
#

429 errors when buttons were pressed/loaded

lyric mountain
#

ah yes

sharp geyser
#

Was a wacky thing

#

Wasn't until a year later that I realized you were who I was talking to

#

and I could of just pinged you

lyric mountain
#

lmao

deft wolf
#

@harsh nova PepoThink

real rose
#

-b @slim turtle nitro scam

gilded plankBOT
#

upvote incursiowastaken#0 was successfully banned.

deft wolf
#

Thanks love

#

Okay, wtf is this

neon leaf
#

wow !!!! what an amazing deal !1!!1 where buy. ..

#

tanks i send later

outer crater
#

DIY

sweet matrix
#

Hello everyone

#

I have a little problem in my command which is I want to creating commands VIP only for who voted in top.gg discord.js v14 like Premium users, I have a script but I don't know where is the problem , the console don't gives me anything but when I try to send the command , he still replying me by " Sorry, this command is only available for users who have voted. " I don't know why

#

this is the script messageCreate```javascript
client.on("messageCreate" , async (interaction) => {
if(interaction.content.startsWith(config.IGNORE_PREFIX + 'vip')) {

    const user = interaction.author;

hasUserVoted(user.id).then(voted => {
if (voted) {

// User has voted, execute VIP command logic here.
interaction.reply('Accessing VIP command...');
} else {

// User has not voted, inform them this command is for voters only.
interaction.reply('Sorry, this command is only available for users who have voted.');
}
})
async function hasUserVoted(userId) {
try {
const response = await fetch(https://top.gg/api/bots/YOUR_BOT_ID/check?userId=${userId}, {
method: 'GET',
headers: { 'Authorization': config.TOPGG_TOKEN },
});
const data = await response.json().catch((error) => {
console.error(Error when checking vote for user ${user.id}:, error);
});
return data.voted > 0
} catch (error) {
console.error('Error checking votes:', error.toJSON());
throw error; // rethrow the error after logging it, or handle it as appropriate

}

}

}

})```

outer crater
sweet matrix
#

when I try still gaves me this one

sweet matrix
outer crater
#

also kindly move ur ass to #development you will get better support there

deft wolf
#

I think this is development

outer crater
#

opps my bad

outer crater
#

😿

sweet matrix
outer crater
#

through top.gg api you can check if user has voted or not

#

there must be some endpoint for this

deft wolf
#

Make sure what voted is when using the command. It seems to me that despite containing data.voted, this function will return 0, i.e. if statemant will always be false

#

Wait, you didn't put your bot id in the URL? weirdsip

sweet matrix
sweet matrix
eternal osprey
#
    <div class="row justify-content-center align-items-center">
        <div class="col-md-8">
            <div class="d-flex flex-column justify-content-center text-start align-items-center p-5 text-center">
                <p style="color:black" class="fw-bolder fs-2">Cosmo? What's that?</p>
                <p class="texer text-dark">Dive into the cosmos of Cosmo, a realm where innovation meets imagination, and possibilities stretch beyond the stars.
                But what exactly is Cosmo? It's more than a name; it's a gateway to boundless creativity and endless discovery. Join us
                as we unravel the mysteries, explore the wonders, and redefine the limits of what's possible. <span class = "fw-bolder"><br>This is Cosmo. This is where
                curiosity knows no bounds.</span></p>
            </div>
        </div>
        <div class="col-md-8">
        <p style="color:black" class="fw-bolder text-center fs-6">Wait no more.. scroll down to reveal the secrets of Cosmo!</p>
    </div>
 
</div>
<div class="pt-5 mt-5 row justify-content-center align-items-center">
<div data-aos="zoom-in">test</div>
</div>```

hey guys how do i put that div that contains test onto a different page?
sharp geyser
#

Huh

#

You just make a new page?

coral yarrow
#

Ignore jk

sweet matrix
#

xD

#

bro hhh lol

#

I forgot

#

πŸ€¦β€β™‚οΈ πŸ€¦β€β™‚οΈ πŸ€¦β€β™‚οΈ πŸ€¦β€β™‚οΈ πŸ€¦β€β™‚οΈ πŸ€¦β€β™‚οΈ

#

I forgot to change the bot's ID in the api link

deft wolf
#

Yep

sweet matrix
#

now it's worked

coral yarrow
#

Haha OPE

sweet matrix
#

that's funny

coral yarrow
#

Weve all had worse not bug bugs

sweet matrix
#

hhhhhhhh

#

funny

#

thank uu guys for your support

pale vessel
#

almost leaked your entire token

wheat mesa
#

should still probably reset it

pale vessel
#

yeah @sweet matrix

civic scroll
#

leaked token???

sweet matrix
quartz kindle
civic scroll
spark flint
deft wolf
quartz kindle
#

lmao

deft wolf
#

Then we send these people information that thanks to voting for this bot they qualified for the nitro giveaway and we will give them a fake nitro gift

civic scroll
deft wolf
#

We will be rich kapp

sharp geyser
#

For the most part yes.

#

If you want to use react that is.

#

Svelte is also a good alternative.

frosty gale
#

i am a svelte enjoyer and i did not appreciate that response

sharp geyser
#

svelte is indeed odd at first

real rose
#

havent touched svelte

sharp geyser
#

but it has its uses

real rose
#

heard a lot about it tho

#

seems interesting

sharp geyser
#

@scenic kelp is an avid enjoyer

frosty gale
#

i call it the debloated react

sharp geyser
#

svelte's way of handling things is nicer than react.

#

Its just react is a lot more widely used due to its age, so a lot of people tend to choose it over any alternatives. With that said, svelte and solid are starting to see a rise in popularity.

frosty gale
#

i also have perfect lighthouse scores with it and i didnt even aim for a good lighthouse score

sharp geyser
#

no idea what that means

#

but good job πŸ‘

frosty gale
#

google lighthouse?

sharp geyser
#

never heard of it

#

πŸ’€

frosty gale
#

you must not do a lot of web dev then

sharp geyser
#

Indeed I do not

#

I am a backend developer, the frontend stuff I let other people handle

frosty gale
#

its this thing in dev tools which measures websites based on a set of scales

sharp geyser
frosty gale
#

this thing

sharp geyser
#

Although aren't those ratings not super duper important?

frosty gale
#

theyre not make or break but usually point to issues and improvements in your design

#

especially when it comes to performance and SEO

sharp geyser
#

Some of them seem like they could be obsolete and induce bad practices

#

Depending on what you are building, your performance will always be a problem, but not necessarily something you can avoid.

#

As for SEO I never really understood the point of it.

#

It seems like a bogus metric google made up

frosty gale
#

this is discords lighthouse score lol

#

@quartz kindle

real rose
#

SEO is basically just ranking higher in google results

sharp geyser
#

And thats understandable

#

That makes sense for an application like discord.

frosty gale
#

i dont blame that score considering it lags each time i switch channels

sharp geyser
#

Could they possibliy improve their performance? Most likely, but its also a large scale chat app serving millions of users getting millions of requests.

frosty gale
#

theres still a lot of room for optimisation

sharp geyser
#

Content should be served based on what you are searching for.

#

Not some ranking

real rose
#

thats exactly seo tho

#

like if you had 10x of the same html page

frosty gale
#

backend theyve probably done it as good as it gets but discord can do a lot more when it comes to optimising frontend

real rose
#

it's stuff like META tags that would set them apart

#

but yeah a lot of people avoid it

sharp geyser
real rose
#

because it can be tough in saturated results

sharp geyser
#

I dislike frontend with a passion

#

I refuse to do any frontend if I can help it

#

I'd rather eat my left shoe then do frontend

#

Me and CSS don't mix, I can't design anything to save my life

frosty gale
#

i used to hate and suck at css but something clicked inside of me some day

#

i suddenly became half decent at css and its kinda fun designing websites

#

but it takes like 300 lines of css to get decent results which is what sucks about it

sharp geyser
#

and thats even with stuff like tailwind

#

πŸ’€

#

css is just the bane of my existence. I do not have the patience to sit there and try things over and over until it looks good.

#

Backend stresses me out enough and stretches my patience thin as is

frosty gale
#

i would recommend practicing some frontend and overall full-stack development however

#

usually doing one or the other exclusively is not a good choice

#

when it comes to jobs or freelancing or whatever

#

you want to generalise yourself as much as possible

sharp geyser
#

that's fair

#

but if I am my own boss it don't matter what I know /j

#

I plan on practiciing some frontend at some point.

#

My plate is just too full rn with backend dev and game dev

surreal sage
#

how can I use something like ngrok to forward requests from a port on a remote server to my system

sharp geyser
#

well

#

most IDEs have a way to port forward from your remote server to localhost anyway

#

so using ngrok is useless now

surreal sage
#

nono

#

reverse

#

i want to work on a domain

#

like i have a server

sharp geyser
#

what?

surreal sage
#

running nginx

sharp geyser
#

yea?

surreal sage
#

with / for nextjs
and /api for api duh

#

and the server is too slow for development

#

running eslint and soforth

#

so I want to develop on my client

sharp geyser
#

Okay, so you can just port forward that port?

surreal sage
#

and then forward the ports on my system to the server

#

so that nginx can still operate

sharp geyser
#

Well, you might be able to open an ssh tunnel when you connect, but if not then using ngrok or cloudflared is definitely a good choice

surreal sage
#

ngrok is an ez "ran out of requests for this month"

#

i had a bug and wazah ddos'd myself

sharp geyser
#

So you can't use ngrok atm?

surreal sage
#

no xd

frosty gale
surreal sage
#

but i want to reverse tunnel to a port on my remote server

surreal sage
sharp geyser
#

use cloudflared or the -L option on ssh

surreal sage
#

and most vps' won't be able to handle that

frosty gale
#

i think you can configure vscode to force extensions to run on your client

frosty gale
#

but yeah they do warn you some extensions might bug out or not work

surreal sage
#

eslint just refuses to work

#

its so buggy that my single quote setting is ignored

sharp geyser
#

I mean...if you want to do development on your client you are shit out of luck

surreal sage
#

(on tsconfig, prettierrc, eslintrc, and even vsc settings)

sharp geyser
#

the only real way to do so is through the remote ssh plugin on vscode

#

any other way will be too buggy

surreal sage
#

will try that -L option

#

wait

sharp geyser
#

well that will only expose the port to localhost

surreal sage
#

no -L option is to and not from

#

i need requests from my nginx on my server to go to my system

sharp geyser
#

-L is for opening an ssh tunnel from the server to the client

#

but thats not what you really want if you want to do development.

#

Just clone the code from github onto your local machine

#

πŸ’€

surreal sage
#

nginx on windows?

frosty gale
#

do you have to do development on the server? cant you have a system where you can locally host the development version on your machine and then push those updates to the server by github or whatever?

sharp geyser
#

They want to use the domain they have

#

But honestly I don't see why

surreal sage
#

well its just that my api and web are on 2 diff ports

sharp geyser
#

you should be using that domain for prod release

#

not development

surreal sage
#

i know

surreal sage
frosty gale
#

but you shouldnt even have to do that

surreal sage
#

i have no router access 😭😭😭

sharp geyser
#

Its not worth the trouble

frosty gale
#

can be on your machine

#

networks are very flexible

#

i just use my github as portfolio

#

but i do need a page indeed

sharp geyser
#

Why make a page, just link your github ezpz

#

they can look at whatever they want

surreal sage
#

readme!

sharp geyser
#

I deleted all my project repos

frosty gale
#

i bought the domain chloe.fun just for this purpose but havent used it yet

sharp geyser
#

how expensive was that

frosty gale
#

very cheap actually

sharp geyser
#

shocking

frosty gale
#

$5 for a year

sharp geyser
#

usually names are expensive no matter the tld

frosty gale
#

my username is also chloe.fun if you didnt notice

#

so its a match

surreal sage
#

ssh -R

#

Specifies that the given port on the remote (server) host is to be forwarded to the given host and
port on the local side.

sharp geyser
#

seems to do what -L does as well

surreal sage
#

yeah but from remote-client

#

-L = client-remote

sharp geyser
surreal sage
#

spastic emoji

sharp geyser
#

All I know is I can access my db hosted on my server

frosty gale
surreal sage
frosty gale
#

the chronically online discord girlies tend to use it

surreal sage
sharp geyser
frosty gale
#

i was thinking of making my one stand out which you should probably do too

#

its gonna be a lot of work

sharp geyser
#

why not pull off those wacky designs youtubers react to

#

That one with the car

frosty gale
#

was thinking some kind of code editor as a web page that lets you run a custom language to find out projects and other things but i thought thats a bit too complicated for the average person

sharp geyser
#

super wacky

sharp geyser
#

Recruiters definitely would not like it

#

Looks like you copied carrd

frosty gale
#

so maybe it writes the code for you and that way i dont have to make a custom language

sharp geyser
#

the gradient background

frosty gale
#

carrd wants their copyright back

sharp geyser
#

classic

#

Chloe casually stealing my lines /j

#

sure sure

frosty gale
#

honestly though

#

go to paint

#

come up with a mock design

#

how you want it to look

#

then make it

#

much easier to make something when you have a plan in place

#

shouldnt be too difficult to come up with a page for a portfolio

surreal sage
#

oh my god

#

my server ram was at 7.5 gib

#

i ran echo 3 | sudo tee /proc/sys/vm/drop_caches
and wazah down to 2 gib

#

interesting

#

just gon

alias dropcaches="echo 3 | sudo tee /proc/sys/vm/drop_caches"```
frosty gale
#

the kernel uses them to speed things up

#

it will reclaim used memory for them automatically when its needed

#

this happens in windows as well but task manager doesnt show it to you in its memory calculation

#

so unless you want your system to run like shit you shouldnt drop caches manually

surreal sage
#

im transferring stuff with filezilla and didnt unselect node modules..
its been over 20 minutes
filezilla took over and i cant cancel it

#

winscp runs like shit for me dont recommend pls

frosty gale
#

insert node modules black hole meme here

surreal sage
#

idk if i sent it first, appears so here help

frosty gale
#

ftp is the slowest protocol known to man anyways

surreal sage
#

erm well akshually im using sftp

frosty gale
#

even slower then because you have encryption in the way

solemn latch
#

goof around in figma

surreal sage
solemn latch
#

got an outline of what you want?

#

I just use flat colors

#

for my background at least

civic scroll
surreal sage
#

on a scale from 1-10 where 1 is dogsheit

#

how json is this:

{Class:"Crewman"
Primary="Gun"
Secondary="Gun"
Tertiary="Mine"}

neon leaf
#

-1

radiant kraken
#

10

lyric mountain
#

well, NaN cuz this aint no json

radiant kraken
#

FINALLY i got wxWidgets to work

#

i literally had to modify internal header files in order for it to compile

quartz kindle
surreal sage
deft wolf
#

Thinkpad peepoPOGGIES

sharp geyser
#

love the picture of the dirty laptop and the screen we can barely make out

#

πŸ‘

wheat mesa
#

the epitome of ```js
try {
bot();
} catch(e) {
console.log([AntiCrash] ${e})
}

#

definitely good code design πŸ‘

spark flint
#

i would delete

#

you leak your school again

#

because your username

wheat mesa
#

do NOT let this man into a cybersecurity setting

spark flint
#

lmfao

wheat mesa
#

dude would leak military secrets faster than war thunder players

spark flint
#

πŸ—£οΈ

deft wolf
#

Interesting PepoThink

hidden gorge
sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

what a bunch of asshats

frosty gale
#

i only see discord doing the ID verification so that they can prosecute that person if their bot does something bad

#

but i still dont think its a good idea

#

theres plenty of countries with no extradition treaties with the US so they cant do shit to you

#

they would have to ban those countries from doing ID verification

quartz kindle
#

social media platform launches
people post shit on it
wokes complain to government
government orders platform to remove/censor
platform cant be bothered with it, so they implement AI/Automation to do it
innocent people start getting fucked over

#

rinse and repeat

neon leaf
sharp geyser
proven lantern
#

what have you done SD?

sharp geyser
#

Stable Diffusion can't really generate any nsfw pictures

proven lantern
sharp geyser
#

Right which is why I said the image πŸ’€

#

Is that flag message returned directly from sd?

proven lantern
#

too many people tried to make naughty pictures and now it can't do anything

proven lantern
sharp geyser
#

That's what UD is for trollface

frosty gale
#

try self host it

sharp geyser
proven lantern
sharp geyser
#

Im curious what was so bad SD flagged it

frosty gale
#

my stable diffusion doesnt do that

proven lantern
sharp geyser
#

wtf was it generating then

#

πŸ’€

#

People so down bad they corrupted the stable diffusion AI

frosty gale
#

im more curious on why its censoring you when youre running a local model

proven lantern
#

something about golden

frosty gale
#

did you enable that behaviour or something

sharp geyser
proven lantern
# frosty gale did you enable that behaviour or something

this is all my code

from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
pipe = pipe.to("cuda")

prompt = ("A golden trophy, cartoon style, green background, website icon")
image = pipe(prompt).images[0]  
    
image.save("icon1.png")```
sharp geyser
#

Is it bad ive drank 4 danimals in the past hour

solemn latch
#

nah

sharp geyser
#

Im 19 but this shit still tastes like crack

#

😭

frosty gale
#

are you 100% sure its local hosted

solemn latch
#

I saw a go-gurt on vacation and traded a beer for one.

#

lmao

sharp geyser
#

so valid

#

It tastes different from childhood

#

but somehow it tastes better than I remember

#

Haven't had one since I was like 7

proven lantern
sharp geyser
#

then again I know nothing about AI

frosty gale
frosty gale
proven lantern
frosty gale
#

that suggests theres some kind of filter that checks the output for nsfw

sharp geyser
frosty gale
#

i dont believe it is

sharp geyser
#

πŸ€”

frosty gale
#

that would be very fancy if it was

sharp geyser
#

I see

#

I thought thats how all those ais worked

frosty gale
#

@proven lanternah yep so the library youre using is using a nsfw checker on top too

#

its completely separate from SD

#

it checks the output image and compares its parts to some local database of potentially bad stuff

frosty gale
#

you can disable it however if you want and it gets in the way

proven lantern
#

i want SD to not think in NSFW ways since im using it for work

sharp geyser
#

its not SD doing it. Its the library by the sounds of it

#

It's filter flagged the image generated by SD as nsfw

proven lantern
#

i think the model is trained not to do NSFW stuff

frosty gale
#

if the model is trained not to do bad stuff i think thats already sufficient so you can safely disable that filter

proven lantern
#

ChatGPT is pretrained to not talk about a lot of stuff

sharp geyser
frosty gale
#

whats ud

sharp geyser
#

Unstable Diffusion

#

SD used to be able to generate nsfw images.

#

But after 2.0 they put filters in place.

#

Unstable Diffusion was made by the down bad people and funraised to keep training nsfw models of SD after 2.0

frosty gale
#

yes in 2.0 i believe its very difficult to get it to do anything nsfw

sharp geyser
frosty gale
#

but since theyre using sd 1.5 that training is probably not in place

sharp geyser
#

The people behind UD though seem to train SD models to generate NSFW images

frosty gale
#

sure you can always fine tune the models