#development

1 messages · Page 676 of 1

earnest phoenix
#

Show your index file

#

Just hide the token, if the index file containt your token

sterile quarry
#

want me to paste it in

#

omg

#

the last guy who tried to help me put like into it and then logged off

earnest phoenix
#

Line 0-10

sterile quarry
#

i just found it

earnest phoenix
#

Okay

sterile quarry
#

lemme try run it again

drowsy sentinel
#

Just takes those extra few seconds to look over your code. 😂

sterile quarry
#

its still saying like is not defined

#

even tho i removed it

#

and saved and restarted cmd prompt

drowsy sentinel
#

Code

sterile quarry
#

what

abstract crow
#

We need to see your code..

sterile quarry
#

want me to copy and paste it

abstract crow
#

Well I mean how else would we see it 😛

#

-_-

#

Use code blocks and remove the token

#

I deleted that so no one knows the token

sterile quarry
#

im new to this idk what code block is

abstract crow
#

Use 3 `

#

And then end it off again

drowsy sentinel
#

@sterile quarry Your token has been exposed. Please reset it in the bot developer tab.

#

We cannot help you until afterwards.

sterile quarry
#

done

#

regenerated it

#

where should i put the code blocks at

manic geode
#

So I am creating a moderation bot, and trying to add a ticket create command. Code: ```js
const Discord = require('discord.js');
const client = new Discord.Client();
const {prefix,token} = require('./config.json');

client.once(ready,() => {
console.log(${client.user.username} has started up!);
client.user.setActivity(ess help | Watching ${client.guilds.size} servers!, {type: LISTENING})
});

client.on(message, message => {
if (message.content === ${prefix}ticket) {
guild.createChannel('ticket',{type: 'text'})
}
)};

client.login(token);


It says that 'guild' is not defined, how do I define it?
hoary helm
#

message.guild

manic geode
#

OH

#

Got it, thx.

hoary helm
#

lmao
no problem

sterile quarry
#

wth

#

someone made my bot say hi 3 times

#

before i reset token

manic geode
#

Did one of your commands make the bot reply 'hi'?

sterile quarry
#

i dont have that set yet

manic geode
#

If so, you may/he may have had 3 terminals open.

#

Oh.

sterile quarry
#

someone went on it before i reset token and got it working and made it say hi

manic geode
#

@hoary helm Also, how would I make it so the author of the message can only view the channel?

hoary helm
#

uh

#

wym

manic geode
#

Like.

hoary helm
#

like when someone runs a command, it locks the channel so that only they can view it?

manic geode
#

No like, the command creates a new channel, but how do I make it so only the person that ran the command can view the new channeL?

hoary helm
#

message.guild.createChannel(name) creates a new channel with the name you want to set

manic geode
#

I have that.

#

This is what I have in the command:

#
      if (message.content === `${prefix}ticket`) {
        message.react('✅')
        message.guild.createChannel('ticket',{type: 'text',permissionOverwrites: [{
          deny = 
        }]
      })
      }
#

It is in client.on('message'), etc..

earnest phoenix
#

That's a weak command handler

#

I don't recommend using if (message.content === blah blah) it will make your code less clean

manic geode
#

What would I do?

earnest phoenix
#

However I have a good tutorial you may want to follow in order to have better settings

#

Cleaner code = Better quality

#

And not the opposite

hoary helm
#

hold on, i'm just scanning the documentation right now as I haven't really dealt with channel permissions in a long time
since i'm guessing you're using discord.js, here is the documentation https://discord.js.org/#/docs/main/stable/class/PermissionOverwrite

earnest phoenix
#

Even if Rythm is one the greatest bots to ever exist, we'll still have to rate its code

#

@manic geode The tutorial I'll send you isn't easy but I'll help you through it since I myself used and still using it now

#

In DM's obviously

sinful lotus
#

I would use if else command handler for a non public bot

earnest phoenix
sinful lotus
#

less hassle, but again that depends on your use case

manic geode
#

My bot will be public.

#

And used.

#

@earnest phoenix I would like that tutorial. 🙂

sinful lotus
#

then use a special command handler

#

but tbh you can use frameworks

#

Klasa, Akairo, or Discord.js-Commando

#

all achieve what that tutorial does but with better features

abstract crow
#

Ok so I can't seem to find anything that works. I want to call a separate PHP file from my HTML file. How can I do that?

#

In the HTML file I want to call the php file

earnest phoenix
#

I'm not sure if I know how but try this

#
<link rel="stylesheet" href="pama.php"> <!--You may want to change stylesheet-->
abstract crow
#

What would I change stylesheet to?

alpine lark
#

How do you select something from a JSON object

#

And save as a variable

mossy vine
#

i dont use php, but i think this is exactly what you need

earnest phoenix
#

@alpine lark good question

#

first of all you make a variable to require the file

#
const pama = require("../pama.json/")
#

The dots depend on your file's location, the more dots there are the further you go out of the command's location in the project

#

Then let's make a variable requiring the file's object

#
let prototye = pama.name;
message.channel.send(prototype) //returns PAMA for example.
manic geode
#

How can I keep my bot online for a long time? Do I just have the terminal running until I want the bot to go offline?

earnest phoenix
#

yes

manic geode
#

Oh.

earnest phoenix
#

Never close the terminal

manic geode
#

Well, that makes things way easier!

amber fractal
#

w h a t

#

use a process manager

manic geode
#

I can just buy a computer and keep it on forever, with some autoclicker so it doesn't turn off. With the terminal on it.

earnest phoenix
#

This is what i have do @manic geode

amber fractal
#

dont give him bad advice...

earnest phoenix
#

I host my bot on my old pc

manic geode
#

Like Minecraft servers.

#

It's good advice.

amber fractal
#

It isnt.

manic geode
#

How?

earnest phoenix
#

But you need to have a good internet connection

manic geode
#

I have good internet.

amber fractal
#

The only issue if you self host is it will go offline when you shut your pc down, which is why it's recommended to get a vps

#

my $3 vps runs like 6 bots 24/7

manic geode
#

What is a VPS?

earnest phoenix
#

Virtual proxy server

amber fractal
#

a virtual private server

earnest phoenix
#

Private*

manic geode
#

Can you use other users VPSs?

amber fractal
#

You can also get a Raspberry Pi if you really want to self host

#

they'd need to let you.

manic geode
#

Ok.

earnest phoenix
#

If you dont want to pay money, host it on a free service, or host it on your computer

manic geode
#

Alright, thanks!

tight heath
#

free services are trash usually

lusty dew
#
db.prepare("CREATE TABLE IF NOT EXISTS guilds (id TEXT, prefix TEXT, log_toggle FALSE, log_channel TEXT, guild_premium FALSE, case_counter 0")

I also want to add in individual toggles for each event there is like, guildMemberAdd, guildMemberRemove, messageUpdate, roleUpdate, etc, but that seems to be a bit messy so I wanted to know if there was a better way to do it

tight heath
#

something cheap like galaxygate is key

#

@lusty dew wdym

earnest phoenix
#

😂😂😂

#

@amber fractal your advice isn't sufficient either

lusty dew
#

What?

#

It’s pretty simple I want a true false toggle for each event ima use but that seems messy

#

And long asf

manic geode
#

uh

winged thorn
#

Why are you storing log channel as text

tight heath
#

well disabling events are discord.js client options

earnest phoenix
#

@manic geode not all bot hosts paid, and not all free bot hosts bad

lusty dew
#

Cause IDs aren’t ints

tight heath
#

^

winged thorn
#

oh in my lib they are rip

tight heath
#

@winged thorn they're above max safe in js

lusty dew
#

IDs are numeric or smth

winged thorn
earnest phoenix
#

By that I meant that there are some free bot hosts that aren't bad because they're free GWmythiBlobLUL

lusty dew
#

Oof

tight heath
#

i mean why not like

#

pay instead

lusty dew
#

What hosts are those

tight heath
#

and get something working

manic geode
#

👁‍🗨

lusty dew
#

Free hosting is always a bad choice unless your friend is allowing you to host on their vps

tight heath
#

the $3 a month for a GG vps is worth more than the 40h of trying to get a free host to work like you want it to lmao

#

and yeah agreed with panda

lusty dew
#

But things like Heroku, glitch, etc are bad options

tight heath
#

glitch you use by essentially breaking their ToS

#

heroku is just garbo

lusty dew
#

Neither was meant for bot hosting

#

Lmao

tight heath
#

i mean heroku kinda

lusty dew
#

Nah

tight heath
#

but the free version is still garbo

winged thorn
#

I host on one of my rpis

#

I had 4 lying around

tight heath
#

i host on a k3s cluster on galaxygate

lusty dew
#

Wanna give me one Jkjk

winged thorn
#

lol

maiden mauve
#

speaks for my competency but, I spent days trying to get GCP working and gave up

lusty dew
#

I don’t like raspberry pi

tight heath
#

gcp is cool

maiden mauve
#

Heroku had my nodejs going in 30 minutes

tight heath
#

but complicated as fuck

winged thorn
#

why don't you like rpis

lusty dew
#

Eh

tight heath
#

well galaxygate had my nodejs going in 30 seconds

earnest phoenix
#

arm devices are meh

lusty dew
#

Just don’t like it can’t handle music bots well

winged thorn
#

I couldn't vouch for that as my bot doesn't do music stuff

lusty dew
#

I had a raspberry pi and it was so butt hurt cause of music functions lmao

tight heath
#

well arm is not as good for audio processing

#

that's true

#

but like

maiden mauve
#

lol I felt so bad, GCP even emailed me multiple times "Don't give up, give the tutorial another try"

tight heath
#

rpis are still dope

winged thorn
#

I love my rpi

#

Little beast

lusty dew
#

Ye for non music purposes it’d be bomb asf

tight heath
#

i asked the owner of GG for an rpi4 cluster

#

but the power/networking costs are too high to sustain it

winged thorn
#

Rip

lusty dew
#

I wonder if you could host your bot on multiple rpis

#

Lmao

tight heath
#

yes

winged thorn
#

I mean yes

lusty dew
#

Never tri3d it

#

Tried*

tight heath
#

but why that

#

if you have a k3s cluster

lusty dew
#

Mainly cause none of my bots get past 30-40 servers lmao

earnest phoenix
#

rpis are really useful for making a home server for iot devices ngl

hoary helm
#

you can with sharding i think

#

host your bot on multiple pis

lusty dew
#

Anyway does anyone know a way I could fix my problem well not really a problem but to avoid a mess of code

#

I was going to try arrays but better-sqlite3 doesn’t support array data types

amber fractal
#

I gave him the advice that would last the longest and performs the best.

#

Amazon offers a 1 year trial

#

you can use GitHub student to get a ton of credit and discounts if you are in school.

#

There's many options

scarlet phoenix
#

For shits and giggles I used balena to do a 10 pi cluster with each pi running 1 shard

#

It worked, but was just for shits and giggles. Not super viable imo

tulip wave
#

anyone know how to get a channel mention in d.js

#

message.mentions.channels.first() didnt work for me

hollow saddle
#

It should

#

Odd that it didn’t

#

What happens when you use it?

tulip wave
#

Cannot read property 'first' of undefined

#

its really weird

amber fractal
#

That means the object doesnt exist...

#

you sure it's called message?

tulip wave
#

yes

amber fractal
#

can you show the code?

tulip wave
#

sure give me a sec

amber fractal
#

little test

tulip wave
#
const discord = require("discord.js");

module.exports.run = async (bot,message,args) => {
    let row = await bot.serversConfig.findOne({
        where: {
            "serverID": `${message.guild.id}`
        }
    });

    if(!row) return message.channel.send("error could not find this server in the database please contact the developer in the support server");

    let log = message.mentions.channels.first()
    if(!log) return message.channel.send("please specify a channel for logs to be sent in")

    row.update({
        "log": log.id
    }).then(message.channel.send(`updated log channel to ${message.mentions.channel.first()}`))

};

module.exports.help = {
    name: "setlogs",
    aliases: ['sl']
}
amber fractal
#

channels

#

you forgot the s

tulip wave
#

not the 2nd one

amber fractal
#

mentions.channels

tulip wave
#
let log = message.mentions.channels.first()```
amber fractal
#

oh

tulip wave
#

thats the part that errors out

amber fractal
#

positive? because that looks fine

abstract crow
#

Do if(message.mentions.channels.first()) {log = blah}

amber fractal
#

just try adding the s to the second one, because that one for sure wont work

tulip wave
#

and its fixed now

#

code is like a girl with me

#

one min it works the next it complains then its fine

abstract crow
#

lol

lusty dew
#

Do you use sql?

abstract crow
#

if you don't ur gay

tulip wave
#

sqlite

lusty dew
#

I’m having better-sqlite3 problems

#

Since it doesn’t support array data types I’m trying to find a work around

tulip wave
#

im not the best with sql but ill try my best

abstract crow
#

Just do DROP ALL TABLES. Always works

#

I don't actually really know SQlite3 tho so sorry

tulip wave
#

im only learning to use it

#

all i have is a lil cheat sheet someone gave me

abstract crow
#

What are some good bot stats to list?

#

Servers, users, total points, total levels, total xp, what else?

tulip wave
#

total command usage

abstract crow
#

Ooo

mossy vine
#

number of codes, for example 17000+ codes

tulip wave
#

most used commmand

abstract crow
#

Very good ideas

#

i am too stupid to dink of dose

tulip wave
#

yeah number of lines if youre into that

abstract crow
#

I need to make an eval command. How can I do that?

lusty dew
#

Was thinking of this:

let arr = ["guildMemberAdd FALSE", ”guildMemberRem FALSE”]

let str = arr.join(” ,  ”)

db.prepare(`CREATE TABLE IF NOT EXISTS guilds (blah blah, blah blah, event_toggles ${str}))
abstract crow
#

I'll just run cloc xxxx everytime lol

lusty dew
#

But idk if .join would turn it into a string or leave it as an array

abstract crow
#

console.log it 🙂

mossy vine
abstract crow
#

Thx mate

mossy vine
#

just please please please secure it properly

abstract crow
#

Ye lol

#

Is 12.5 transactions a second bad or good?

#

for SQL*

lusty dew
#

Are you not able to put numbers in an sql statement?

abstract crow
#

Not sure, I only use numbers in prepared statements

lusty dew
#

That’s what I’m doing

abstract crow
#

Its bland rn ik

mossy vine
#

the Stats color doesnt stand out much

abstract crow
#

Yeah... I wish there was a color palette picker based on a color or 2 u give

#

Like if I give that dark grey background, I want it to give similar looking colors

mossy vine
#

i think theres a website that does exactly that

#

forgot name tho

manic geode
#

is this good

#

for cmd list

earnest phoenix
#

don't hardcode your help command

manic geode
#

w d y m

lusty dew
#

I just loop through my commands and split them up based off the category they are in lmao

earnest phoenix
#

do not make it static text

#

yes, what SatanPanda said

manic geode
#

do i make it embed??

lusty dew
#

Yes

earnest phoenix
#

what

#

no

lusty dew
#

You put it in an embed

earnest phoenix
#

no

manic geode
#

ok

lusty dew
#

What why

manic geode
#

can you tell me how you make an embed?

earnest phoenix
#

it's unnecessary

manic geode
#

its cool tho

lusty dew
#

Sending it out just like it is, is ugly

earnest phoenix
#

it's unnecessary and it doesn't fix the issue of it being static text

lusty dew
#

Well yea, but it’s an option

earnest phoenix
#

what are you blabbing about

manic geode
#

would it look good if i used code blocks

earnest phoenix
#

it's irrelevant to the issue

manic geode
#
?
lusty dew
#

Now it’s relevant cause he asked

onyx summit
#

What should I use if I want to fork a child and then communicate with it, but like request => response and not that clunky ipc channel node gives you?
(node)

earnest phoenix
#

shut up, please, you aren't contributing to the issue

as for @manic geode you should dynamically generate your help command, get all of the commands, including their names and descriptions, and then generate a string based on that

lusty dew
#

Lmao

earnest phoenix
#

static text for a help command is very bad practice

lusty dew
#

You shut up

earnest phoenix
#

why so

lusty dew
#

He asked a question I’m answering

topaz sphinx
#
2019/08/16 22:18:44 [warn] 497#497: "ssl_stapling" ignored, host not found in OCSP responder "ocsp.cloudflare.com/origin_ca" in the certificate "/etc/nginx/ssl/gofven-cloudflare-cert.pem"

Can any gods explain what i've ran into?

earnest phoenix
#

you aren't contributing to any issue at all, stop being low iq

lusty dew
#

Lmao okay bud

manic geode
#

satand how to create rich embed??

#

im confuse

lusty dew
#

What Lang

#

Js?

manic geode
#

js

lusty dew
#

What lib Eris or d.js

earnest phoenix
#

if you're using discord.js i believe you can use commando which provides you with a full command framework

manic geode
#

i dont use frameworks

#

i dont know how to use them

lusty dew
#

Or use d.js and just do Discord.RichEmbed() for stable and Discord.MessageEmbed() for master

manic geode
#

alr

earnest phoenix
#

why not to use static strings for help commands is simple, you're required to update the string with every command you add, delete or update and it will eventually get so large to the point where it's unreadable

manic geode
#

wdym

earnest phoenix
#

based on that, dynamically generate your help command

lusty dew
#

Why make it more trouble for em when d.js offers a method of created an embed

manic geode
#

how

earnest phoenix
#

embeds are irrelevant to static help commands, how does that not go inside of your brain

lusty dew
#

It does

#

But he asked how to make an embed lmfao

#

How are you not understanding that

earnest phoenix
#

they asked is this good for a command list - a static string is not

#

and you then gave them a faulty advice (thanks ac)

manic geode
#

so

#

how do i make

#

it

#

like you are telling me @earnest phoenix

lusty dew
#

Are you blind about something you failed to help with

lusty dew
#

You’re still being the idiot here lmao

sterile quarry
#

hey guess whos back for help

lusty dew
#

That or you’re blind as fuck

#

They clearly asked how to make a richembed as well

earnest phoenix
#

like i said - you gave them a faulty advice; "oh just put it in an embed" does not fix an issue of having a static string as a help command

#

after you gave them a faulty advice

#

which is why i keep noting it

lusty dew
#

It wasn’t faulty advice

#

Maybe not related to the topic

sterile quarry
#

Satan

lusty dew
#

But embeds make things look nicer

#

And before that

earnest phoenix
#

; "oh just put it in an embed" does not fix an issue of having a static string as a help command awhat

#

What's happening here boi

lusty dew
#

I said loop through your commands

sterile quarry
#

Limaaa

unique nimbus
#

No arguing please

lusty dew
#

So cry shut the fuck up

unique nimbus
#

Both stop arguing

earnest phoenix
#

Stay calm @lusty dew

manic geode
#

satan

#

dms

#

pls

earnest phoenix
#

honey you're being low iq

unique nimbus
#

Oi cry stop arguing smh

sterile quarry
#

Limaaa

mossy vine
#

to be fair, this argument isnt helping anyone here. hardcoding your help command is a bad idea if you have many commands, and plain strings dont always look the best. insulting each other isnt beneficial to either of you

sterile quarry
#

cyber

earnest phoenix
#

ask your question

lusty dew
#

Cry stfu lmao

naive gull
#

popcorn ?

unique nimbus
#

@lusty dew stop

mossy vine
#

@sterile quarry yes?

sterile quarry
#

how tf do i make my bot actually use the commands

earnest phoenix
#

in which library

mossy vine
#

are you the guy who posted on r/discord_bots earlier about commands not running or is this a coincidence

lusty dew
#

Talking about I have low iq when you ignore the fact they asked a separate question cause you’re too afraid to admit you were wrong about something

unique nimbus
#

@lusty dew can you stop

sterile quarry
#

coincidence

unique nimbus
#

Take arguments elsewhere

naive gull
#

rtfm

lusty dew
#

Meh fuck it I’m done with the dirty ass hoe

mossy vine
#

ah okay, so whats the problem exactly?

earnest phoenix
#

Please this is a development channel not a fight area

sterile quarry
#

i cant figure out how to make my bot run like -kick -ban ect

earnest phoenix
#

in which library

naive gull
#

pls dont watch a yt tutorial and then complain something isnt working..

alpine lark
#

How can I turn those into variables. Like a variable for each one

earnest phoenix
#

Yt tutorial can be good

naive gull
#

nah

earnest phoenix
#

youtube tutorials aren't ever good

mossy vine
#

the first and most important question is, did you write any code for your bot? if yes, which library did you use? if you know which one, post the code with things like tokens and api keys removed

earnest phoenix
#

Depends of the youtuber

unique nimbus
#

YouTube tutorials can be useful if you learn by watching it happen

earnest phoenix
#

the only youtube tutorials i approve of are from officials; e.g microsoft dev teams reviewing changes etc.

naive gull
#

most are outdated

unique nimbus
#

I learn best by watching others sometimes

earnest phoenix
#

Same

naive gull
#

so people with the question "wHy Is ThIS NOT WOkIng"

earnest phoenix
#

learn by watching is an excuse for "im lazy to read and think for myself"

#

atleast in programming

#

Some people just copy/pasta code and then complaining about that

naive gull
#

yeah

#

and most of the time outdated code

#

from a forum or yt

earnest phoenix
#

what's even more ironic is that most of the times the code in youtube tutorials is absolute spaghetti

naive gull
#

that guy probably doesnt even know what a library is so they just ignore

earnest phoenix
#

more than likely

mossy vine
#

nah, im trying to help him in dms

manic geode
#

So, how would I make it so when my bot replies to the command it uses code blocks?

naive gull
#

oh

mossy vine
#

same as if you would otherwise

#

```\ncontent```

naive gull
#

a bot can send the same shit as you can

manic geode
#

just a differen

#

t way

naive gull
#

what?

earnest phoenix
tight heath
#

@topaz sphinx ocsp stapling needs a third file thingy; it's basically pre-fetching the root ca to improve speed

#

it's not a required thing though

#

so just comment it out

#

@alpine lark wdym

#

also are you running a bot in pterodactyl lmao

abstract crow
#

So I want to make a div that is a box. The box contains 4 more sub boxes, but I want 2 on the left and 2 on the right. How can I do that?

tight heath
#

npm install 2-boxes-on-the-right-and-2-boxes-on-the-left

abstract crow
#

lol

warm marsh
#

@abstract crow grid or float? I'm fairly bad at css but try that.

prime cliff
#

😔 i did it mom get the camera will add youtube url in Discord message too

mossy vine
#

damn, that looks sick

prime cliff
#

Thanks i've been working on some nice updates for my bot this is a bit of an experiment

unique nimbus
#

much better then what I can ever do

#

¯_(ツ)_/¯

abstract crow
#

So the Discord Oauth2 docs show this

API_ENDPOINT = 'https://discordapp.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'

def exchange_code(code):
  data = {
    'client_id': CLIENT_ID,
    'client_secret': CLIENT_SECRET,
    'grant_type': 'authorization_code',
    'code': code,
    'redirect_uri': REDIRECT_URI,
    'scope': 'identify email connections'
  }
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  r = requests.post('%s/oauth2/token' % API_ENDPOINT, data=data, headers=headers)
  r.raise_for_status()
  return r.json()

But how do I put this into JS forms?

warm marsh
#

You'll need to make an OAuth url, E.g.
https://discordapp.com/oauth2/authorize?client_id=client_id_goes_here&scope=identify+guilds&response_type=code&callback_uri=ip_address/auth

#

Something like that might work.

abstract crow
#

Right I did all of that

#

I just need to make this POST request

warm marsh
#

Ok.

#

Use something like node-fetch or snekfetch

abstract crow
#

Right but how do I convert all of this(the code above) into JS terms?

warm marsh
#

You'll need to make a base32 secret

#

something like btoa will do it for you.

abstract crow
#

a wut

warm marsh
#

Nvm, I think that's the wrong name all you need to know is you need it.

abstract crow
#

Do you know how I can do this with Passport.js?

warm marsh
#
        const cred = btoa(`client_id:client_secret`);
        post(`https://discordapp.com/api/oauth2/token?grant_type=authorization_code&code=${code}`)
          .set('Authorization', `Basic ${cred}`)
          .then(response =>  res.redirect(`/guilds`))
          .catch(console.error);
#

that's how it's done with snekfetch

#

I've no clue about passport never used it.

abstract crow
#

Ok

warm marsh
#

Oh, You'll need to use the auth token so response.body.access_token and add to variable or in url params like res.redirect(`/wheretogo?token=${response.body.access_token}`);

abstract crow
#

Well right now I have the Oauth2 pop up that you sign in with, then it redirects you to another page. All I have is the code

warm marsh
#

Although that's only if you're using express.

abstract crow
#

I am

warm marsh
#

Ok.

abstract crow
#

What do I do after getting the code tho?

warm marsh
#

Create more requests to discord.

#
        get('https://discordapp.com/api/v6/users/@me/guilds')
          .set('Authorization', `Bearer ${userToken}`)
          .then(response => {
            res.json(response.body);
          })
          .catch(console.error);```
abstract crow
#

Make the Access Token Exchange right?

warm marsh
#

I guess?

abstract crow
#

K

warm marsh
#

I'm still fairly new to OAuth so I'm probably doing stuff wrong but what I've sent seems to work for me.

earnest phoenix
#

-bots

gilded plankBOT
manic geode
#

-bots

gilded plankBOT
manic geode
#

👋 hi essentisals

#

you'll be through soon

#

dont worry

jade parcel
#

-bots

gilded plankBOT
warm marsh
#

Does anyone know how to change the image hash into an actual format?
OAuth - Discord.js@12.0.0

inner jewel
urban gust
#

-bots

gilded plankBOT
earnest phoenix
prime cliff
abstract crow
#

Does anyone know how I can pass Express.JS variables to the script side in an EJS file? I know I could do <%=var %> but that doesn't work with just javascript, only HTML

opaque eagle
#

How do u tell if a user is using GET/POST/PUT/DELETE with Node.js's http module?

valid frigate
#

you should just be able to parse the request headers

#

according to mdn it's the first thing the client sends

zealous veldt
#

You can if you reference the variable as if it were HTML iirc @abstract crow

#

Idk I haven't used EJS in years

valid frigate
#

test it first

sterile quarry
#

what im asking is how tf do i make my bot run -kick -ban ect can anyone tell me

zealous veldt
#

lol moreinfo

covert turtleBOT
#

Please provide as much information as possible to get the most efficient assistance as soon as possible; state the library, language, the specific part of the code in question, and what you are trying to do and/or what you think may be causing the error.

echo jewel
#

433?

amber fractal
#

Standard https is 443

earnest phoenix
#

Hey everyone, what setup will I need to reward the user when they vote without having them run the command twice?

#

For now its command1, they vote, command2, the bot rewards them if they have voted

#

But I'd like it to automatically reward them the moment they vote

pine edge
#

Hello guys i want help for my script when i run command i save item and i let the random script choice the item mined but after the random script i want adding the item +1 in my data array how i can do it with my actually script ?

echo jewel
#

Is it possible to send data to webhook as using the get method?

opaque eagle
earnest phoenix
#

Hey everyone, what setup will I need to reward the user when they vote without having them run the command twice?
For now its command1, they vote, command2, the bot rewards them if they have voted
But I'd like it to automatically reward them the moment they vote

dusky mist
#

The users votes in a web?

#

@earnest phoenix

earnest phoenix
cursive dagger
#

@earnest phoenix webhooks

earnest phoenix
#

What are those XD

#

And how do i implement them

#

Got any good links?

cursive dagger
#

Check the docs

dusky mist
#

@earnest phoenix

earnest phoenix
#

Thanks

#

@latent cosmos

cursive dagger
#

@dusky mist wrong. Please if you dont know how to help dont

dusky mist
#

Wrong why?

#

@cursive dagger

cursive dagger
#

It's a vote webhook

#

Not a discord webhook

#

Stack what lib do you use

#

*lang

slender thistle
#

(They seem to be offline AoSmug)

dusky mist
#

Ok srry

earnest phoenix
#

it's python

azure mirage
#

p!daily

sterile quarry
#

i prob sound dumb as fuck asking this but how to u define args

mossy vine
#

you learn javascript properly before making a bot mmLol

sterile quarry
#

wanna see the script ive made for this

mossy vine
#

you have your arguments defined..

sterile quarry
#

well when i run it says args are not defined

late hill
#

you put arges

mossy vine
#

because you are defining it as arges

earnest phoenix
#

how do i update the server count

#

?

#

can it be manual?

#

or it has to update every da

earnest phoenix
#

^

wet void
#

Wdym by server count

#

Number of guilds a bot is in?

earnest phoenix
#

just did this yesterday

#

or day before that

#

it should be done automatically if you have the discord bot website -token (not the discord dev portal token) and library (dbl) installed and setup correctly @earnest phoenix

earnest phoenix
#

what do you mean

#

you have to make it update by yourself

earnest phoenix
#

no

#

it's automatic

#

if you already have server count posting worked, it should update by itself

onyx summit
wispy cove
#

How to activate members count...

hollow saddle
#

Activate? Not sure what you mean here

earnest phoenix
#

Hello I have a question if we are working on the bot when we submit it on the bot does moderators will accept? I have just a few commands but usefull ones so idk if I can submit now or if I have to wait

hollow saddle
#

It doesn’t matter how many commands you have, just that they perform the main function of you bot

earnest phoenix
#

Okay and if I change the bot concept I should ask for an audit again?

manic geode
#

in php what is the difference between GET and POST

wispy cove
#

@hollow saddle how to add member count

tight heath
#

@manic geode GET and POST are not related to php at all

#

they're HTTP methods.

#

and the names are pretty self-explanatory

#

usually you'd use a GET request to get data from a webserver

#

and a POST req to post data to it

#

that's the point of the naming convention

#

in theory it's possible to do it differently

#

but you rarely should to avoid confusion

#

@earnest phoenix no

#

@wispy cove DBL.postStats(serverCount)

#

I suggest you do it periodically

manic geode
#

i remember using GET or POST in php forms

wispy cove
#

@tight heath were to type this... DBL. poststats

tight heath
#

this is the code for the js library

#

perhaps you should take your time to introduce yourself with the libraries before asking questions here

manic geode
#

who?

stray garnet
#
  const embed = new Discord.RichEmbed()
  .setAuthor(`Ban`)
  .setColor(color.green_light)
  .setDescription(`I just joined ${guild.name}!`)
  message.channel.send(embed)
});```

`message` is undefined
manic geode
#

arent you supposed to have a semi colon after the last embed property edit??

#

you add it here

#

.setDescription(I just joined ${guild.name}!)

stray garnet
#

uh no

manic geode
#

oh

#

thats what is says on discordjs.guide

#

i refer to that

stray garnet
#

ok

#

but it does work without semicolon.

#

so yea

manic geode
#

oh i know why (i think)

stray garnet
#

why

manic geode
#

maybe

#

eh

stray garnet
#

tell it

manic geode
#

well you dont have 'message' as an argument but that may not be the case wait nvm

tight heath
#

@stray garnet on a guildCreate event there is no message

#

what message is it supposed to pass

#

when you join a server

manic geode
#

i think its when the bot joins the server

stray garnet
#

Yea

manic geode
#

i dont know

#

oh

#

+1 for me

#

🙂

stray garnet
#

:D

manic geode
#

i think you need message argument

#

i am not very experienced with the guild argument tho

inner jewel
#

you don't get a message with guild join events

manic geode
#

so

#

is there a event in client/bot that detects when the bot joins??

#

that would be helpful

inner jewel
#

you get a GUILD_CREATE event

mossy vine
#

it works because of javascripts ASI, automatic semicolon insertion

#

wow im late

inner jewel
#

if the id in that event wasn't sent with the READY payload, you know it's a guild join

stray garnet
#

But, how can i define message?

inner jewel
#

you don't

mossy vine
#

in a guildCreate event, you dont

inner jewel
#

get the channel with another method

mossy vine
#

^

stray garnet
#

@inner jewel Which

manic geode
#

maybe if there was like guild.systemchannel

#

or something

#

that would work

#

depending on the usage

mossy vine
earnest phoenix
#

@tight heathok thanks

tight heath
#

@stray garnet the channel you want to post in lol

#

there is no default

mossy vine
#

not anymore

tight heath
#

yup

#

used to be a systemChannel

#

but still

#

there's no message arg

#

because why tf would there

hoary helm
#

you could get all the channels and pick one from random

inner jewel
#

there's still a system channel

#

it's where the join messages go

hoary helm
#

or just DM the owner of the server if what you want to send is help commands

inner jewel
#

what's gone is the default channel

tight heath
#

well no

#

the system channel used to be unchangeable

#

but its always been the system channel

inner jewel
#

the system channel property is new

#

as far as the discord api goes

#

idc whatever libraries called it

tight heath
#

me neither

#

tbh idc about the system channel in general cuz it's irrelevant

inner jewel
#

the system channel field in guilds was added when the join message channel feature became a thing

#

the default channel was the channel created along with the guild that shared it's id and couldn't be deleted

tight heath
#

ye ik about the shared ids

#

might also wanna use that for your join message @stray garnet

#

test if there is a default channel since some guilds still have it

#

as in

#

have a channel same id as the guild

#

which probably has some importance as the first one

#

and if not, just pick guild.channels.first()

#

should give the oldest one if its are ordered chronologically

#

idr if they are

earnest phoenix
#

if i need help

#

my bot doesnt start

#

what i do

#

?

tight heath
#

depends

#

what's the error

earnest phoenix
#

i press start

#

and nothing happends

#

no errors

tight heath
#

what where do you press start

earnest phoenix
#

visual studio

olive kindle
#

You should be using node mainfile.js

earnest phoenix
#

idk js

#

i use c#

olive kindle
#

Oh wait sry

#

My bad

earnest phoenix
#

aga

#

help?

#

how do i update the server count

#

by myself or do i set a timer ?

tight heath
#

library?

earnest phoenix
#

.net

tight heath
#

await me.UpdateStatsAsync(serverCount);

#

periodically however that works in .NET

earnest phoenix
#

help

#

my internet sucks

tight heath
opaque eagle
#

How could we help with that? @earnest phoenix

tight heath
#

yes

earnest phoenix
#

i dont know uwu

opaque eagle
#

We don’t know either

sudden geyser
#

download better internet

opaque eagle
#

BetterInternet.dmg

abstract crow
#

Ok so I have no clue what's going on but both Cloudflare and Digital Ocean have separate DNS settings and I don't know if I need to connect them or wut

#

Well I have CF directed directly towards my VPS IP

#

But not Digital Ocean

earnest phoenix
#

@earnest phoenix disconnect all of your devices from internet HyperThinkRotate

abstract crow
#

So do I direct all traffic to DO from CF?

earnest phoenix
#

where can i download free internet no registration no sms no virus 100%m

#

?

#

Download free internet??

#

Not possible

#

Read what @abstract crow have said

dense cipher
#

I'm awaiting approval

earnest phoenix
west spoke
#

@earnest phoenix you would need to pay for it. That kind of thing isnt free.

tight heath
#

@abstract crow ok so

#

where do you have your domain registered

#

and more importantly

#

where do your NS records point

idle mountain
#

@dense cipher ok, so wait. it can take up to a week

abstract crow
#

I don't have any

tight heath
#

wdym you don't have any

#

what's the domain

abstract crow
#

I use Cloudflare and just have A and CNAME

tight heath
abstract crow
#

Oooo

#

those yeah

tight heath
#

you very much have NS records and they point to cloudflare

#

so you manage your DNS at cloudflare

abstract crow
#

Srry lol

tight heath
#

¯_(ツ)_/¯

abstract crow
#

Correct

tight heath
#

DO is outta the game

abstract crow
#

Ok so just fuck DO

#

Gotcha

tight heath
#

just ignore it

#

ye

abstract crow
#

My email

#

I just got approved for Github student, so I tried out sendgrid lol

#

FUCK MY ADRESS

tight heath
#

you're an owner huH

abstract crow
#

lol

west spoke
tight heath
#

i wont tell it

#

:)

marble juniper
abstract crow
#

haha

west spoke
#

Same here

marble juniper
#

ok

west spoke
#

I didn't even notice lol

marble juniper
#

tell what tell me

tight heath
#

ye

#

very tell

marble juniper
tight heath
#

automated teller machine

#

vinnie has an atm

abstract crow
#

lol

marble juniper
#

ok

tight heath
#

i want ice cream

#

brb

marble juniper
#

bye

earnest phoenix
#

Do any of you have any ideas how I can get my bot to play a certain sound byte from a file, NOT from youtube?

#

Just for sound effects like applause, ding, spinning wheel, boo, drum roll etc

#

All the guides seem to redirect you to youtube-dl

west spoke
#

What lang

#

since retrieving the bytes from that file can be used, you can play audio from the bytes. Same thing for images and text

earnest phoenix
#

nodejs

#

Do you know of any existing bot code that does this, is it open source?

west spoke
#

google will

earnest phoenix
#

what am I looking for specifically?

tight heath
#

one sec

#

are you using d.js stable or master

earnest phoenix
#

11.5.1

tight heath
#

stable

#

oof

earnest phoenix
#

my linux server won't do 12

tight heath
#

ok

#

oh why not

earnest phoenix
#

The guy who owns it insists Centos is cool and hates arch

#

np with 12 on my arch at home, but beggars can't be choosers

tight heath
#

but why doesn't it do 12

#

lik

#

it's not different from 11.5.2 in the install process except requiring git

#

anyways

earnest phoenix
#

something to do with a windows library that centos hasn't get plugged

tight heath
#

voiceChannel.join().then(c => c.play('/path/to/file.mp3'))

#

c being a VoiceConnection object

#

requires node-opus iirc

earnest phoenix
#

thanks

tight heath
#

the d.js docs can tell you quite a lot

earnest phoenix
#

possibly also an if statement to see if it's already joined that channel

tight heath
#

:)

#

yeah I mean you could store the voice connection somewhere

#

and yeet it upon leave()

#

but personally idk about voice in d.js

#

only used lavaplayer so far

#

and even that rarely

earnest phoenix
#

lavaplayer?

tight heath
#

good luck

#

java lib for voice stuff

#

all the big music bois use it

earnest phoenix
#

how do I get the voiceconnection, the bot returns a map of voice connections

#

What?

#

&ts

#

You mean user in a channel?

#

Try with console.log(bot.channels.get('id')) its returning a collection

#

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'playFile' of null That's the error

#

??

#
        if(vcChannel!=null) {
                if(bot.guilds.find(g => g.id === message.guild.id).channels.find(c => c.id === vcChannel).members.has(bot.guilds.find(g => g.id    === message.guild.id).me)==true) {
                        bot.guilds.find(g => g.id === message.guild.id).channels.find(c => c.id === vcChannel).join();
                } else { console.log(`ALREADY IN VOICE CHANNEL!`); }
                let c = bot.guilds.find(g => g.id === message.guild.id).voiceConnection;                          
                await c.playFile("/home/humansheeple/bot/sounds/FlatIntro.mp3");


        } else {console.log(`ERROR NO VOICE CHANNEL!`);}
#

This is what I put

#

What did I do wrong?

#

VOICE CONNECTION: null

tall mist
#

I Want Use The Bad Word Blocker

#

But I Have Err

#

TypeError: db.fetch(...).then is not a function

earnest phoenix
#

I can help you make one

tall mist
#

what is this

earnest phoenix
#

don't waste your time on word filters, they'll be bypassed no matter how hard you try

#

Yeah I didn't do it the db mehtod I did it the json methon

tall mist
#

how

earnest phoenix
#

well you'll need a swearlist.json

#

You'll need the to get the index of the swear in the message

tight heath
#

@earnest phoenix bUt MuH Ai

earnest phoenix
#

check the precedign character for wildcards and the succeeding character for wildcards if its found and both the prefix char and suffix char are wildcards then delete the message

#

that way you can distinguish between
ass and assistant

tight heath
#

yes but

#

actually wait

earnest phoenix
#

ravyToday at 6:51 PM
cry bUt MuH Ai

if(...) {
    if(...) {
        ....
    }
}

🙃

tight heath
#

lmao

#

@earnest phoenix well if the preceding character has a wildcard

#

bass would trigger the filter *ass*

#

wouldn't it

#

also in general filtering words is bad

#

context is always better

#

and not giving a direct feedback, but instead profiling

#

so they don't try finding a bypass

#

¯_(ツ)_/¯

earnest phoenix
#

no you're wrong because "b" isn't a wildcard

tight heath
#

what

earnest phoenix
#

wildcards are "", " ", "!", ".", ",", "?", ":", ";"

#

So you have them in an array

tight heath
#

do you know what a wildcard is

earnest phoenix
#

lol

tight heath
#

wildcard (plural wildcards) (computing)

A character that takes the place of any other character or string that is not known or specified.

earnest phoenix
#

so long as the succeeding or preceding characters are one of those it will trigger the message.delete() and the message.channel.send(${message.author.name} stop bloody swearing!)

#

even if, ravy already said that context is more important than profiling

tight heath
#

so since

#

it's

#

actually

#

can't I just use a zws to bypass that

earnest phoenix
#

I have an array called wildcards, maybe it's the wrong name to call it, but that's what it does

tight heath
#

@earnest phoenix

earnest phoenix
#

yup

tight heath
#

nice

#

so

earnest phoenix
#

you can mix and match space characters to bypass filters anywhere

tight heath
#

a<zws>ss should bypass that whole thing altogether

#

and if you completely remove spaces

earnest phoenix
tight heath
#

you get something like

earnest phoenix
#

speechWidCards, i made an array

tight heath
#

as speaking is not my strongest suite

earnest phoenix
#

So if you typed !ass! it would work

tight heath
#

and too many false positives

earnest phoenix
#

but if you typed bassed it would not

tight heath
#

but if I typed

#

as speaking

#

it wouldn't right

#

but

#

if I type as s

#

it wouldn't either

earnest phoenix
#

and if you went to that level of measure, you'd get too many false positives to the point the filter would be unusable in a casual conversation

tight heath
#

@earnest phoenix do you have a server with that bot

#

I want to show you something

#

󠀀

#

󠀀

#

󠀀

#

^ this wonderful character

earnest phoenix
#

there's two types of zws

#

normal and no-break

#

so it's even harder to detect

#

two servers

#

the two bots are coded slightly differently

#

some of these bypass discord's internal api filter

#

so you can have text channel names with spaces

tight heath
#

yes I have a command for that lol

#

that lets you do

#

-channelname <name with spaces>

#

and replaces the spaces with 2 half-width spaces

#

lmao

#

works quite the well

idle basalt
#

can you copy/paste the correct type of space

tight heath
#

wdym

idle basalt
#

when i do that i get a -

#

likely because discord only checks for certain types of spaces

earnest phoenix
#

you need to modify it using an api request

#

the client has a filter too

idle basalt
#

oh thats a pain in the ass then

#

oh nvm its really easy lol just did it with eval

tight heath
#

yes

idle basalt
#

ty for the tip

warm marsh
#

I know this is gonna be a stupid question, But can discord bots listen to voice?

tight heath
#

in theory yes

#

but it's like

#

not well supported

#

because noone uses it

earnest phoenix
#

it's undocumented

#

it depends on the lib you're using

#

some implement it some don't

tight heath
#

dIsCoRd.Js

trim wind
#

i feel like you could use a voice to text plugin to circumvent most of the hastle of setting up a vc bot. but i could be completely wrong.

earnest phoenix
#

wat

#

@warm marsh Discord has two gateways, the textchannel gateway is easy to work with. The voicechannel gateway is an entirely different beast I'm working on that issue myself right now

tight heath
#

wdym by vc bot

earnest phoenix
#

I got the bot to join then nothing else

#

it's a PAIN

trim wind
#

voice command bot

tight heath
#

well that's because you use d.js

earnest phoenix
#

there's no textchannel gateway and voicechannel gateway omegalul

tight heath
#

voice commanda aren't scalable

#

at least not without operating at a loss

earnest phoenix
#

you need to have a voice recognitioner on for each user stream, very expensive

#

@earnest phoenix are you any good with voicebots and node.js?

#

i don't do js

#

python?

#

nope

#

i mainly work with .net

#

Is there stuff .net can do that .js can't?

#

that's a very wide question

#

they both implement stuff differently

#

but i rather prefer working with .net (c#) than js

#

c# is windows

#

I hate windows

#

there's .net core

#

which is cross plat

#

i managed to get a speech to text bot working once with GCP speech to text and discord.net

#

What did you do decrypted packet assembly?

#

me?

#

yeah

#

discord.net handles the entirety of voice, including receiving and sending packets through the udp connection

#

you can read user streams and send a stream through the connection freely without hassle

#

Is this impossible in js or just a pain?

#

i have no idea

#

i've never tried

#

I tried ages ago it was a pain

#

one thing worthy to note is that you need to send to receive

tight heath
#

.net is a pita to work with for me

#

I perosnally microservice in langs good for it

#

contextual message scanning in py because easy to understand

#

bot&ws in js because weblang

#

soundboard with lavaplayer

#

imagegen in C++ (used to be Go)

earnest phoenix
#

i mostly process my audio through soundtouch

tight heath
#

oh huh never heard of that

#

what it do?

earnest phoenix
#

it's an opensource audio processing lib in cpp

#

it's really quick

tight heath
#

sounds cool

#

ah tempo, speed, pitch

#

nice

earnest phoenix
#

i mostly pipe youtube audio through it to get it to a PCM float

quartz kindle
#

Anyone good with node's Nan api?

#

Im trying to get a number value from a js array into a double, but object->get(key) is deprecated, and im having trouble figuring out how to use Nan::Get()

idle basalt
#

all numbers in js are doubles by default

#

what are you trying to accomplish...?

quartz kindle
#

Yes but you cant assign them directly in c++

idle basalt
#

i thought your question was about node...

quartz kindle
#

Node's Nan api

#

Native addons

idle basalt
#

ohhh i see what you mean

#

yea ive never used that... my bad

quartz kindle
#

Yeah, i need to pass js arguments to a C function

earnest phoenix
#

Is there a way to get a users uptime?

#

Can the playFile function play mp3 files?

chrome olive
#

Anyone can help me with my web dashboard?

loud salmon
#

@chrome olive what I meant by that was actually state your problem here, not just repeat your question :p

earnest phoenix
#
Error: Media must be provided
    at Function.verifyOptions (/home/humansheeple/bot/node_modules/discord.js/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:13:31)
    at FfmpegTranscoder.transcode (/home/humansheeple/bot/node_modules/discord.js/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:59)
    at MediaTranscoder.transcode (/home/humansheeple/bot/node_modules/discord.js/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
    at Prism.transcode (/home/humansheeple/bot/node_modules/discord.js/node_modules/prism-media/src/Prism.js:13:28)
    at AudioPlayer.playUnknownStream (/home/humansheeple/bot/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
    at VoiceConnection.playArbitraryInput (/home/humansheeple/bot/node_modules/discord.js/src/client/voice/VoiceConnection.js:458:24)
    at bot.guilds.find.channels.find.join.then.connection (/home/humansheeple/bot/triggers/flat.js:36:34)
    at <anonymous>```
#

Any ideas?

abstract crow
#

code?

chrome olive
#

ok

earnest phoenix
#

const soundFile = fs.readFile("/home/humansheeple/bot/sounds/FlatIntro.mp3");

#
        if(vcChannel!=null) {
                if(!(bot.guilds.find(g => g.id === message.guild.id).channels.find(c => c.id === vcChannel).members.has(bot.guilds.find(g$
                        bot.guilds.find(g => g.id === message.guild.id).channels.find(c => c.id === vcChannel).join()
                        .then(connection => {
                        console.log(`CONNECTION: ${connection}`);
                        const dispatcher = connection.playArbitraryInput(soundFile);
                        })
                        .catch(console.error);
                } else {console.log(`ALREADY IN ${vcChannel}`);}


        } else {console.log(`ERROR NO VOICE CHANNEL!`);}
#

Help?

chrome olive
#

I get an error when I'm trying to fetch the user guilds

#

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

mossy vine
#

wouldnt soundFile contain a buffer then, which is something it cant handle? why dont you just use connection.playFile() instead?
https://discord.js.org/#/docs/main/stable/class/VoiceConnection?scrollTo=playFile

chrome olive
#
  • Code
            fetch('https://discordapp.com/api/users/@me/guilds', { method: 'GET', headers: { authorization: `${response.token_type} ${response.access_token}` }, })
                .then(res2 => res2.json()).then(guildResponse => {

                    req.session.guilds = guildResponse;
                    res.redirect('/');
                })
earnest phoenix
#

Alright Ichanged the code now the bot joins the channel but is SILENT

#

Any ideas?

#

@mossy vine

#

Bare in mind this linux server has no on board gui or sound card it's a terminal

mossy vine
#

that shouldnt matter

#

and i have no idea, sorry

earnest phoenix
#

Who might ?

mossy vine
#

someone here ¯_(ツ)_/¯

#

does it show that the bot is "talking"?

earnest phoenix
#

no it doesn't

#

it joins, no error message, no sound

chrome olive
#

so can anyone help me?

earnest phoenix
#

I can try

#

I'm having problems myself however