#development

1 messages · Page 1093 of 1

lusty quest
#

@minor kelp you can embed Trojans and other bad stuff inside of .txt files

earnest phoenix
#

why mention.users.first() don't working?

lusty quest
#

someone is trying to get inside your machine

#

did you have fail2ban running?

#

ohh boy you dont secured your VPS?

weak rain
#

can u guys give me link of upgrading codes to V12

lusty quest
#

you know that you are getting fucked if someone steals your machine

viral iris
#
client.on("message", message => {
        if(message.author.bot) return;
        if(!message.content.startsWith(prefix)) return;
        if(message.content === ("-serverinfo")) {
var voiceChannelCount = message.guild.channels.cache.filter(c => c.type === 'voice').size;
          var TextChannelCount = message.guild.channels.cache.filter(m => m.type === 'text').size;
          let embed = new Discord.MessageEmbed()
          .setColor("#0012f5")
          .setThumbnail(message.guild.iconURL())
          .setAuthor(message.guild.name, client.user.avatarURL())
          .addField("Overview:",
              `Server Region: \`\`${[message.guild.region]}\`\` \n Owner:  \`\`${message.guild.owner.user.username}#${message.guild.owner.user.discriminator}\`\`\n Boosts: \`\`${message.guild.premiumSubscriptionCount}/30 (Tier ${tiers.message.guild.premiumTier || 0})\`\``,                                  
                true)
         .setFooter(`ID: ${message.guild.id}`)
message.channel.send(embed)
        }
});
```Cannot read property 'guild' of undefined
lusty quest
weak rain
#

ty @lusty quest

earnest phoenix
#

can someone tell me?

#

hello

weak rain
#

how much time does it usually take upgrading?

lusty quest
#

@minor kelp you have the duty to prevent others from taking controll over your hardware. if you fail it can have legal issues for you (depending on the countrie)

#

@weak rain depends on your skills

weak rain
#

@weak rain depends on your skills
@lusty quest but if a begginner does then?

lusty quest
#

yea you have to follow the US law then

#

@weak rain idk how good are you with javascript? took me 2 days

#

i dont do DMs

weak rain
#

@lusty quest okay ty

viral iris
#

any1?

#
client.on("message", message => {
        if(message.author.bot) return;
        if(!message.content.startsWith(prefix)) return;
        if(message.content === ("-serverinfo")) {
var voiceChannelCount = message.guild.channels.cache.filter(c => c.type === 'voice').size;
          var TextChannelCount = message.guild.channels.cache.filter(m => m.type === 'text').size;
          let embed = new Discord.MessageEmbed()
          .setColor("#0012f5")
          .setThumbnail(message.guild.iconURL())
          .setAuthor(message.guild.name, client.user.avatarURL())
          .addField("Overview:",
              `Server Region: \`\`${[message.guild.region]}\`\` \n Owner:  \`\`${message.guild.owner.user.username}#${message.guild.owner.user.discriminator}\`\`\n Boosts: \`\`${message.guild.premiumSubscriptionCount}/30 (Tier ${tiers.message.guild.premiumTier || 0})\`\``,                                  
                true)
         .setFooter(`ID: ${message.guild.id}`)
message.channel.send(embed)
        }
});
```Cannot read property 'guild' of undefined
weak rain
#

will my bot become unsupportable of i dont update?

lusty quest
#

@viral iris what line?

#

@weak rain yes in october

weak rain
#

okay

viral iris
#
 `Server Region: \`\`${[message.guild.region]}\
lusty quest
#

comment out the field and make a console.log(message)

#

@earnest phoenix mentions.users.first()

#

@minor kelp this is concerning

#

someone is attacking your machine.

earnest phoenix
#

please

lusty quest
#

change your SSH port and install fail2ban

karmic compass
#

How do I check if a bot can dm a user discord.js

viral iris
#

comment out the field and make a console.log(message)
@lusty quest i did message.guild
message is not defined

lusty quest
#

@minor kelp have fun when your Bot ends in a Botnet

#

also if you use Linux

#

run sudo apt install fail2ban

#

fail2ban will lock out IPs that fail 3 times to login

#

but can be configured

#

you get a initial config that is already better than nothing

#

you can keep the config and just keep it running

#

your server sees the IP

#

rhost in your logs

#

its every time a different IP

#

@viral iris you got a wired ass error there

weak rain
#

which is the stable version for V12?

lusty quest
#

latest

viral iris
#

@viral iris you got a wired ass error there
@lusty quest ik lol

lusty quest
#

just remove discord.js and install it with npm i discord.js --save

viral iris
#

it was working

lusty quest
#

@minor kelp i know that i could get a fine here if i just ignore it

viral iris
#

but i added a line on it

weak rain
#

can u tell me name

lusty quest
#

@viral iris did you do some stuff with caching?

viral iris
#
 (Tier ${tiers.message.guild.premiumTier || 0}
lusty quest
#

yea

viral iris
#

added this line

lusty quest
#

what is tiers?

viral iris
#
var tiers = {
  0: "0",
  1: "1",
  2: "2",
  3: "3"
};
lusty quest
#

bcs you have to protect your Hardware as user of it. If you Fail you have to deal with the Consequences if it ends in a Botnet

#

@viral iris this is a invalid query

#

well you are probably booted

viral iris
#

@viral iris this is a invalid query
@lusty quest can u tell me wat's the right ?

lusty quest
#

ask the support if they can do something

#

@viral iris remove tiers

viral iris
#

the var ?

lusty quest
#

well hope they didnt made a Grab n Run thing

viral iris
#

or in the line ?

lusty quest
#

@viral iris yes bcs the script tryes to access inside your tiers var message.guild.premiumTier

#

504 is gateway timeout

earnest phoenix
#

hello

#

how you make bot private

#

from someone inviting it?

#

where i go

#

for that

#

so turn this off right

#

thanks

lusty quest
#

its one step

#

but would also change the SSH port just to give them a new attempt with finding the right port

#

did you run a firewall?

earnest phoenix
#

anyone can use mentions.users.first() ?? in discord.js

lusty quest
#

yes

#

are you sure its this exact line?

#

not the strange code below it?

robust moth
torn ravine
#

version

robust moth
#

Latest

#

12.2.0

torn ravine
#

this looks like a sharding issue

#

I’m not too familiar with sharding

lusty quest
#

sharding manager or Internal Sharding?

robust moth
#

I don't have ShardingManager

#

It's internal sharding issue

lusty quest
#

hmm did you made some external settings? for some reason no websocket spawns

robust moth
#

No

lusty quest
#

how did you configured internal sharding? manual shard or auto?

robust moth
#

Auto

lusty quest
#

strange

#

maybe ask on the Discord Devs discord.

robust moth
#

Ok

mild flower
#

How do i customize values for specific guilds?

For example : No. of warnings to automatically mute a member

lusty quest
#

store the warnings per guild and add the userid of the member as a key for identifying

#

then check on warn how many Warns the user already got. if the set number is reached mute the user

mild flower
#

yea how do i do that
i wanna know how to store constants per guild
that was just an example

restive lily
#

operand, not int

lusty quest
#

@mild flower use a database

pure lion
#

🇦

stiff stream
mild flower
#

Sorry for the persistent questions but this is my last one i swear.

When making a warn command i wanted to send a dm to the user saying they had been warned.
The warned users constant : const warn = message.users.mentions.first();
I tried doing message.send.warn(xyz) (dont judge)

lusty quest
#

message.mentions.users.first() @mild flower

#

then just warn.send()

#

or

#

message.mentions.users.first().send()

#

its nothing bad to ask. we just wont give you entire code for stuff only pointers

restive furnace
#

operand, not int
@restive lily str(thing) to get string operand.

restive lily
#

idk what operand is or means

restive furnace
#

learn basic python then.

rocky dust
tight plinth
#

hello. do you know what you're doing

restive furnace
#

^

stiff stream
#

^

viral iris
#
  if (!message.member.id === "349095859859881984") return;
```is it wrong ?
tight plinth
#

it would be better to do if (x !== y) return;

earnest phoenix
#

I got ghost pinged...

lime pumice
#

can i host 2 different server.js for the same bot?

#

in different git repos

restive furnace
#

what question is that lol?

#

but yes.

#

and the git repos can be same.

lime pumice
#

lmao

#

oki

#

xD

lusty spade
lusty quest
#

you know this command is API Abuse

golden condor
#
import express from "express";
import fs from "fs";
import Handler from "./API/handler";
const app: express.Application = express();
const Routes = Handler();
for (const file of Routes) {
    const route = require(`${__dirname}/Routes/${file}`);
    app[route.method](route.endpoint, route.run)
}
``` I am trying to make an express server in typescript but this keeps giving me an error:
`Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'Application'.`
and I'm confused as to why this happens, can I have any help?
#
import { readdirSync } from "fs";
import { join } from "path";
export = () => {
    return readdirSync(join(__dirname, `Routes`));
}```This is API/handler.ts
#
import { Request, Response } from "express"
export = {
    endpoint: "/",
    method: "get",
    run: async (req: Request, res: Response) => {

    }
}```This is API/main.ts
lusty spade
#

you know this command is API Abuse
i know i already chaneged it

viral iris
#

why not remove done ?

  await message.channel.bulkDelete(mes_count).catch(WoW => {});
    message.channel.send("**done**")
.then(message => {
    message.delete(10000
ashen shard
#

guys i need help with writing an okcupid bot
i plan to code it in javascript and the main thing will be that if the match percentage is below 85, the bot will automatically swipe left

ionic dawn
#

Swipe left?

ashen shard
#

oops i used the wrong term

#

if it's lower than 85, it will pass th person

#

and if it is >=85 then it will stop untill i decide for myself and restart the bot

ionic dawn
#

I don't really understand your idea

ashen shard
#

do you know okcupid?

#

i can explain further

void vale
#

hi

ionic dawn
#

No idea what okcupid is

void vale
#

@viral iris 🙂

wide sundial
#

who haves log bot

pure lion
#

Logs for?

void vale
wide sundial
#

Logs for?
@pure lion log bot codes

pure lion
#

What

wide sundial
#

https://top.gg/bot/dyno
@void vale not like this codes

pure lion
#

Pay me and I'll write logging stuff

wide sundial
#

commands to make a log bot

#

Pay me and I'll write logging stuff
@pure lion how much

pure lion
#

$5 but I'll negotiate

wide sundial
#

hey bro

pure lion
#

Depends how much you want

wide sundial
#

ı am living in turkey

#

dolar is 7 turkish liras

#

ı am not a rich

pure lion
#

hm

void vale
#

free

ionic dawn
#

Asking for money?

pure lion
#

yEs

#

Jajajajajajajajajajajaja

ionic dawn
#

For what?

pure lion
#

Idk coding

ionic dawn
wide sundial
#

commands to make a log bot
,

pure lion
#

Ideas or actual code?

ionic dawn
#

You have MEE6 and Dyno that have audit logs, why would you pay

pure lion
#

^^^

wide sundial
#

You have MEE6 and Dyno that have audit logs, why would you pay
@ionic dawn ı dont like these bot

ionic dawn
wide sundial
#

ı need codes

#

log codes like

stiff stream
void vale
#

I can do it for free, but I'm a beginner

wide sundial
#

delete mesagges and se

#

I can do it for free, but I'm a beginner
@void vale no problem

ionic dawn
#

@pure lion charge 50$

#

But I dont get it

#

You joined here to buy a bot?

wide sundial
#

no

#

ı have a bot

ionic dawn
#

Why don't you hire a JS programmer or something

wide sundial
#

but ı cant do the log bot codes

stiff stream
ionic dawn
#

Catch event, take data, print data

pure lion
#

Gimme money

#

I mak bot

#

Islegict

#

💯 bot

#

Bes bot

earnest phoenix
#

is anyone able to tell me the code for messageembed to have a text as a url not as a title tho

sinful belfry
#

just don't put anything in the url field

earnest phoenix
#
.addField(` url: 'link' `)
#

that what i was told

sinful belfry
#

discord.js v12?

ionic dawn
earnest phoenix
#

@sinful belfry i use v12 and 11.5

sinful belfry
#

ahhh yeah sorry i misread what u wrote

earnest phoenix
#

@ionic dawn in what " " ' ' or ``

sinful belfry
#

doesn't matter

misty sigil
#

Either

ionic dawn
#

It dsnt matter, thats up to you

earnest phoenix
#

cheers ill test it now

viral iris
#

@viral iris 🙂
@void vale thx

ionic dawn
#

Anyhow remember that ` is used to add vars inside the string, well not just vars, all kind of stuff

viral iris
#

fs or photo-collage package is supported in heroku ??

sinful belfry
#

@earnest phoenix you can't put a url in the field title tho

ionic dawn
#

’Hello ${message.author}’ and such

#

fs is I think

earnest phoenix
#

@sinful belfry @ionic dawn still dont work

viral iris
#

fs is I think
@ionic dawn yes or no ?

sinful belfry
#

@earnest phoenix you can't put a url in the field title tho

#

oops

#

that pinged u lol

earnest phoenix
#

ye lol

ionic dawn
#

Brandon it does work

#

Its added in the field message

earnest phoenix
#

@ionic dawn i dont want it in the title

ionic dawn
#

Is not the title

#

Is in the embed desc or field

sinful belfry
#

you need to do .addField("FIELD TITLE HERE (urls are not supported here)", "field body [you can](embed links)");

ionic dawn
#

^

viral iris
#

@earnest phoenix ```js
.setImage(" ")

earnest phoenix
#

@viral iris not a image

viral iris
#

gif ?

ionic dawn
#

Bro, we are telling you

earnest phoenix
#

trying to embed links in text think ive found it now

viral iris
#

if it gif it works 2

ionic dawn
#

Jesus

#

Give me a second

viral iris
#

@ionic dawn is fs supported on heroku ?

#

fs*

earnest phoenix
#

ive done it now

#

cheers @sinful belfry

ionic dawn
#

Like that @earnest phoenix ?

sinful belfry
#

@viral iris pretty sure it should be supported

ionic dawn
#

That ref?

earnest phoenix
#

Vo1d ive done it now cheers tho

sinful belfry
#

it is a standard node module

viral iris
#

@sinful belfry what about photo-collage

sinful belfry
#

try it and see i guess

viral iris
#

it like canvas but make collage

#

heroku rip

ionic dawn
#

No idea on that ^

sinful belfry
#

im sure it'll work if it is just an npm package

whole knot
#

Hello, I don’t know if it belongs here but do you guys have also problems with playing music? My bot runs into an error and gives me “Unsupported JS expression” as an output

earnest phoenix
#

where are you hosting

whole knot
#

On my computer

#

All packages are up to date

restive notch
#

im trying to do const { Util } = require(Discord) and discord and discord.js it says ReferenceError: Discord is not defined i have discord.js installed in this dir why is it doing this

tight plinth
#

what are you using to play music

whole knot
#

youtube-dl you mean?

earnest phoenix
#

that's weird, i would've expected that error to come from web js or something Thonk

tight plinth
#

@restive notch you have to do require('discord.js')

#

basic js

restive notch
#

ah yes i am dumb

pure lion
whole knot
#

I tried to look it up but all they give me is “update it” / “yes, same error” etc.

tight plinth
#

lol

slender wagon
#

it's js not python

viral iris
#

`
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   NODE_VERBOSE=false

-----> Installing binaries
engines.node (package.json): 12.x
engines.npm (package.json): unspecified (use default)

   Resolving node version 12.x...
   Downloading and installing node 12.18.3
   Using default npm version: 6.14.6

-----> Restoring cache
- node_modules

-----> Installing dependencies
Installing node modules (package.json)
npm ERR! code ETARGET
npm ERR! notarget No matching version found for fs@^0.0.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'build_6529d9a1_'
npm ERR! notarget

   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.HPF9u/_logs/2020-07-28T10_14_05_096Z-debug.log

-----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys
   
   If you're stuck, please submit a ticket so we can help:
   https://help.heroku.com/
   
   Love,
   Heroku

! Push rejected, failed to compile Node.js app.
! Push failed
`

#

what is that mean ?

restive notch
#

@tight plinth i just added require('discord.js') and changed it to discord.js and it says the same thing

viral iris
#

heroku rip ?

tight plinth
#

do you know how to use js

restive notch
#

yes

#

node.js

fast zenith
#

"notarget No matching version found for fs@^0.0.1."

tight plinth
#

well no

fast zenith
#

the package version doesn't exist

restive notch
#

discord.js

slender thistle
#

npm install discord.py
in which universe does this make sense?

tight plinth
#

learn basic js please

earnest phoenix
#

I have created a discord bot with Hypixel API, for u is good? (sorry for my english)

restive notch
#

i know basic js

pure lion
#

it's js not python
:O really?

viral iris
#

"notarget No matching version found for fs@^0.0.1."
@fast zenith u know what's the current version ?

pure lion
#

learn basic and js you say? uWu oWu

restive notch
#

there should be no reason why its saying discord.js is not defined

tight plinth
#

show code

pure lion
#

Are you requiring it as discord.js

#

?

restive notch
viral iris
#

any1 know fs version ?

fast zenith
#

fs comes with node's core modules

pure lion
#

Dude bin it

tight plinth
#

ugh why

delicate shore
#
Preparing to connect to the gateway...
[WS => Manager] Manager was destroyed. Called by:
Error: MANAGER_DESTROYED
    at WebSocketManager.destroy (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\node_modules\discord.js\src\client\websocket\WebSocketManager.js:335:54)
    at Client.destroy (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\node_modules\discord.js\src\client\Client.js:235:13)
    at Client.login (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\node_modules\discord.js\src\client\Client.js:224:12)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:16348) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
    at WebSocketManager.connect (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\node_modules\discord.js\src\client\websocket\WebSocketManager.js:135:26)
    at Client.login (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\node_modules\discord.js\src\client\Client.js:221:21)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:16348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise 
rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
tight plinth
#

just send the part with the error

fast zenith
#

You don't need to install it separately

delicate shore
#

i get this error

restive notch
#

like the error in the console

fast zenith
tight plinth
#

and the line of code with the problem yeah

restive notch
#

ok

#

console message

#
const { Util } = require(discord.js)
                         ^

ReferenceError: discord is not defined
    at Object.<anonymous> (/home/juliefilm/Music_Bot/commands/play.js:2:26)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/juliefilm/Music_Bot/music_bot.js:26:21)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
tight plinth
#

erm

#

you have to do "discord.js"

#

a string

restive notch
#

and in my top part

#
const { Util } = require(discord.js)
const { YOUTUBE_API_KEY } = require("../config.json")
const ytdl = require("ytdl-core")
const YoutubeAPI = require("simple=youtube-api")
const youtube = new YoutubeAPI(YOUTUBE_API_KEY)
const { play } = require("../system/music")
tight plinth
#

erm

fast zenith
#

um

tight plinth
#

you have strings everywhere between your require

#

but you can't put one on this one

#

are you blind or smth

pure lion
#

H m

slender thistle
#

wrap discord.js in apostrophes

tight plinth
#

and you don't need the first line

sterile minnow
#

Has anyone a idea how go through a Mongo Database Collection and log that or sth?

Javascript

restive notch
#

wrap discord.js in apostrophes
@slender thistle now it says

#

oh nvm

pure lion
#

@sterile minnow schema.find

#

Or schema.foreach

#

I think that works

sterile minnow
#

For each is not a Function

restive notch
#

yes it was the apostrophes i am very stupid

sterile minnow
#

I tried foreach and it says its not a function

fast zenith
#

forEach?

sterile minnow
#

(node:8828) UnhandledPromiseRejectionWarning: TypeError: queue.forEach is not a function

pure lion
#

schema.forEach(s => console.log(s.<property>))

viral iris
#

is photo-collage not supported or what ?

fast zenith
#

If you use find to to fetch the records then you can use the callback to do forEach I believe

pure lion
#

@sterile minnow why are you using mongodb to hold your music queue?

sterile minnow
#

I dont?

pure lion
#

Oh

viral iris
#

If you use find to to fetch the records then you can use the callback to do forEach I believe
@fast zenith yes in error something like callback

pure lion
#

What's the queue?

sterile minnow
#

A Queue for Bots

pure lion
#

Oh

sterile minnow
#

I'm staff in a Bot list

pure lion
#

Then map by timestamp

#

Or something

#

You don't need a forEach

sterile minnow
#

idk how i do that lel

void vale
#

@restive notch

const { Util, Discord } = require('discord.js')
earnest phoenix
#

Hey, so I have a discord bot. I have transferred files to vps but I want it to run 24/7

#

Can I have some help please.

sterile minnow
#

download pm2

pure lion
#

@sterile minnow schema.map(s => s.timeStamp)

sterile minnow
#

Works the Best

void vale
#

npm i pm2

earnest phoenix
#

me?

void vale
#

pm2 start index.js

pure lion
#

What is pm2?

void vale
#

yes

slender thistle
#

a process manager

earnest phoenix
#

I am py..

pure lion
#

Oh sick

#

Not sick

earnest phoenix
#

😦

slender thistle
#

There's systemctl, pm2, tmux

#

You still install pm2 with node

void vale
#

pm2

earnest phoenix
#

in cmd?

void vale
#

putty

slender thistle
sterile minnow
#

queue.map is not a function

earnest phoenix
#

Yes I have putty

pure lion
#

@sterile minnow show the def of queue

sterile minnow
#

const queue = this.client.mongo.db("main").collection("queue")

pure lion
#

await it

#

Also bruh is that how you're accessing mongodb tf?

void vale
sterile minnow
#

I'm just developing lel

earnest phoenix
#

Acess Denied wtf

sterile minnow
#

i didnt do that

pure lion
#

Did you copy and paste code?

earnest phoenix
#

Ok I am in

pure lion
#

Does it actually write to your dB??

sterile minnow
#

queue.map is not a function

#

It works fine

pure lion
#

Show me your mongodb connection

void vale
#
const MongoClient = require('mongodb').MongoClient;
const client = new MongoClient('mongodb://ip:port', { useUnifiedTopology: true });

client.connect(async function(err) {
const db = client.db('mydb');
const _mycoll = db.collection('mycoll');
})
earnest phoenix
void vale
#

npm i pm2

sterile minnow
#

Yee thats how it works

pure lion
#

Eyy I'm in the ss

sterile minnow
#

Like hiteke said thats how i access it

pure lion
#

Also why not use mongoose it's so much easier (idk mongodb sorry)

sterile minnow
#

I'm just a dev i didnt do that shit

void vale
#
//MongoDB
var data = await _mycoll.find({'id': msg.author.id}).toArray(); data = data[0];
earnest phoenix
pure lion
#

Isn't mongodb not async?

sterile minnow
#

and how do i like do without find like list everything

void vale
#

Promise

pure lion
#

Map it from the schema

earnest phoenix
#

Why is it saying not found when I have done apt install npm like 100 times

viral iris
#

what's wrong ?

pure lion
#

You tell me

#

Heroku

#

Is what's wrong

viral iris
#

not supported photo-collage ?

pure lion
#

Please don't use heroku

viral iris
#

I know any free host?

pure lion
#

Dm me

void vale
#
  • Run the code on your computer
  • Add packages
viral iris
#

Can't

void vale
#

@viral iris I can host your bot if you want

viral iris
#

Cuz I have problem with package.json it tells me that it should be JSON file no js and it's already json

pure lion
#

Check dm

viral iris
#

@viral iris I can host your bot if you want
@void vale where?

fast zenith
#

if the bot is small you can just use AWS with their free tier

pure lion
#

@viral iris check your dms

void vale
#

@viral iris Linux, Russia, Tolyatti

#

150-180ms ping

slender thistle
#

Sounds like something we don't encourage

void vale
#

👀

viral iris
#

No

earnest phoenix
#

imagine

#

guys you have any clue about how to fetch message by id? in js

restive furnace
#

you need to fetch the channel first

#

then messages

earnest phoenix
#

i did that

#

oh wait i got it

void vale
#

channel.messages.fetch('id');

#

@earnest phoenix ping)

earnest phoenix
#

i got it already

#

well i need to fetch channel first

sterile minnow
#
this.client.mongo.db("main").collection("queue").find({}).toArray(function(err, docs) {
                assert.equal(err, null);
            try{
                docs.forEach(bot =>{
                    try{
                    num++

                    let testing = bot.tester
                            ? `**Currently Tested By:** <@${bot.tester}>`
                           : `**Currently not being tested. [Click Here]() to start testing.**`;
                    embed.addField(`${num}. (${bot.name})[${bot.id}}]`,`Owned by: <@${bot.owner}>\n${testing}`)
                                    }catch(err){
                        console.log(err)
                    }
                })
            }catch(err){
                console.log(err)
            }
            });

Has anyone a idea why it doesnt add a Field?

#

(if i log it it works tho)

earnest phoenix
#

@sterile minnow wdym

#

and pls highlight ur code

#

use ````js`

sterile minnow
#

I did

lusty quest
#

he did

earnest phoenix
#

to make it JS format

lusty quest
#

it is already

sterile minnow
#

On phone its not visible

fast zenith
#

Don't see how it's supposed to work when you haven't even tried sending the message and the embed isn't defined? or is that elsewhere?

earnest phoenix
#

yes

lusty quest
#

there is no Embed Constructor

sterile minnow
#

Don't see how it's supposed to work when you haven't even tried sending the message and the embed isn't defined? or is that elsewhere?
@fast zenith The embed is Defined and it sends it

earnest phoenix
#

i cant read dude

#

fuck my phone

#

need my pc

fast zenith
#

you don't happen to get any errors when it doesn't send?

sterile minnow
#

It sends

#

it just doesnt add fields

#

and i get no error

lusty quest
#

i would laught if he makes a bot for a other Botlist website

earnest phoenix
#

im getting so stressed

#

who is python here?

fast zenith
#

What's the problem?

earnest phoenix
#

Im trying to make sure my bot runs 24/7

#

I have transffered files

#

and got putty open

misty sigil
#

install python on the vps

fast zenith
#

sudo apt install nodejs (assuming you were trying to install pm2 from before)
npm install pm2
you can use that or use a service etc

sterile minnow
#

So it sends the embed it just doesnt add Fields and doesnt give me a error but if i try to Log it it works completely fine

earnest phoenix
#

npm not found

misty sigil
#

install nodejs

sterile minnow
#

pm2 doesnt work with py i think

misty sigil
#

no it doesnt

fast zenith
#

It does

misty sigil
#

where are you getting the vps @earnest phoenix

earnest phoenix
#

galaxy gate

quartz kindle
#

pm2 requires node to install

#

but it can manage python scripts

earnest phoenix
#

how would I download it to the vps?

fast zenith
#

and if you are trying to use different language scripts you will need to use the --interpreter python3 param e.g for python

void vale
#

@quartz kindle he uses pythonpandasad

restive furnace
#

how would I download it to the vps?
@earnest phoenix npm install -g pm2

quartz kindle
#

best way is to install nvm, then install node

#

then you can install pm2

#

and then you can run your python script with pm2

misty sigil
#

yes ofc

quartz kindle
#

you can install nvm using wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

#

then run nvm install node

#

then run npm install -g pm2

fast zenith
#

after you install nvm you need to either run source ~/.nvm/nvm.sh or restart the ssh session otherwise it will say nvm doesn't exist 🙂

quartz kindle
#

depends on the system

#

for me it worked straight away

void vale
#
sudo apt-get install npm
npm install pm2@latest -g
pm2 start app.py --watch
quartz kindle
#

yes but apt repos are usually outdated for node and npm

#

for example ubuntu 18 is still on node 8

restive furnace
#

i install usually straight from node.js site (on my ubuntu)

void vale
#

I have installed without problems

fast zenith
#

depends on the distro & os version as each have there own repos, Ubuntu 18 which is still widely used installed 8.0 and as of right now and 14.6 is the most recent stable version.

quartz kindle
#

ubuntu 18 installs node 8 and npm 3

#

are you on ubuntu 20?

#

or another distro

void vale
fast zenith
#

are you using the official repository for apt?

quartz kindle
void vale
#
deb http://archive.ubuntu.com/ubuntu bionic main
deb http://archive.ubuntu.com/ubuntu bionic-security main
deb http://archive.ubuntu.com/ubuntu bionic-updates main
deb http://us.archive.ubuntu.com/ubuntu saucy main universe
deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse
fast zenith
void vale
#

guys you have any clue about how to fetch message by id? in js
@earnest phoenix

var x = await msg.channel.messages.fetch('id');
console.log(x);
earnest phoenix
#

i got it already

#

i said

#

xD

void vale
#

ok

earnest phoenix
#

nvm ty

tight plinth
#

what can i use to play spotify songs with shoukaku

earnest phoenix
#

nothing

#

you aren't allowed to stream from Spotify

tight plinth
#

oof

void vale
#

Who needs help with discord.js?

lusty quest
#

did someone know what permission is needed for deleting messages?

void vale
#

manage_messages

lusty quest
#

thx

void vale
earnest phoenix
#

Anyone know deno here?

honest perch
#

yes

void vale
#

?

#

what is it?

honest perch
#

i know what deno is

#

like node

#

but not node

#

made by the same guy though

void vale
#

thx

earnest phoenix
#

anyone know the code to make the bot edit a voice channel name ?

honest perch
#

check docs

earnest phoenix
#

docs ?

winter basalt
#

yep

#

docs

earnest phoenix
#

....

winter basalt
#

we dont spoonfeed here

earnest phoenix
#

lol you say docs like i know what your talking about

void vale
#

get a channel and change the name

winter basalt
#

what lib are you using

void vale
#

js or py?

misty sigil
#

d.js or eris

#

d.js or d.js light

earnest phoenix
#

ok I think I finally did it

#

But

misty sigil
#

we can redirect you to the right docs

golden bear
#

;-;

misty sigil
#

ok I think I finally did it
@earnest phoenix you need to install discord

earnest phoenix
#

i did

misty sigil
#

what lib do you use @golden bear

void vale
golden bear
#

You mean

winter basalt
#

what library did you use

#

to create your bot

honest perch
#

what library did you program your bot in

#

discord.js

void vale
#

he uses itself as a bot

#

xD

golden bear
#

Js

honest perch
#

but what lib

void vale
#

discord.js

winter basalt
#

assuming discord.js

honest perch
#

btw you should learn js before making bots

#

guessing by your confusion you havent used it before

void vale
#

They first do, and then teach, and then do

earnest phoenix
#

but still not working

honest perch
#

btw @golden bear how old are you?

pale vessel
#

yes

earnest phoenix
#

never knew it to be so hard to make a bot update a channel name every time to bot joins a server it displays how many servers its in

golden bear
#

@honest perch 13

void vale
#

@earnest phoenix easy

earnest phoenix
#

but I did

#

dont seem like it i can do text channels but i want it to be voice

#

does anyone know how i can install a linter for deno

fallow mirage
#

Also make sure its installed on the python version that you're using, not another

void vale
#

no module namded 'discord'

restive furnace
#

do python --version

fallow mirage
#

in my bot I use, and it works

import discord
sterile minnow
#

Heya.

Its my first time using mongo db! so dont judge

But does anyone know how i set sth in the db?
i'm using this npm package https://www.npmjs.com/package/mongodb

But i dont really understand the docs lel

void vale
#

sth?

#

What is it?

sterile minnow
#

f.e.

Name from "John" to "John wick"

sterile minnow
#

Like i said i dont really understand the Guide. I want to know how i f.e. set user.name from "John" to "Tom"

digital ibex
#

just

#

use

#

.updateOne

void vale
#

ok

sterile minnow
#

The thing is idk how to use .updateOne

void vale
#
collection.updateOne({ 'user.name' : "John" }, { $set: { 'user.name' : "Tom" }})
sterile minnow
#

thx

#

Can i like if i have a User to user.updateOne ?

sterile minnow
#

f.e. i have found one user and i want to update him is user.updateOne still aviable to use?

void vale
#

I don't understand English very well

sterile minnow
#

What language do you speak?

#

I can try to translate it

#

now it says thst
@earnest phoenix Async is not a valid syntax

#

u set it wrong i think

digital ibex
#

u can use Schema.updateOne too

sterile minnow
#

Okay ty

digital ibex
#
const model = whatever
const something = await model.findOne({ key: 'value' });
something.updateOne({ key: 'value2' });
#

@sterile minnow ^

sterile minnow
#

ty i will try it

void vale
#

@digital ibex thx

#
const model = db.collection('whatever'); //xD
sterile minnow
#

.updateOne is not a function

digital ibex
#

show ur code

void vale
#

code

sterile minnow
#

<model>.updateOne({"certification" : "true"})

#

Yee model is a thing

digital ibex
#

you cant do that

#

you're meant to filter the model to an index u want

sterile minnow
#

Okay

digital ibex
sterile minnow
#

Thats defined i just send it to you with <model>

void vale
#
const MongoClient = require('mongodb').MongoClient;
const client = new MongoClient('mongodb://', { useUnifiedTopology: true });

client.connect(async function(err) {
const db = client.db('db_name');
const model = db.collection('collection_name');
const something = await model.findOne({ key: 'value' });
something.updateOne({key : 'value2'})
})
sterile minnow
#

Still not a function

void vale
#

full code

slow fable
#

if I code js, should I use single or double quote

sterile minnow
#

let user = await this.client.mongo.db("main").collection("users").findOne({id: userID})
                user.updateOne({certification:"false"}, {certification : "true"})
#

i tried it with quotes too

void vale
#

Show all the code
Send it to me in DM

sterile minnow
#

Thats all

void vale
#

You didn't connect the database

sterile minnow
#

It is connected

sterile minnow
#

It is connected

earnest phoenix
#

my god friend sorted it for me

sterile minnow
#

it gets info etc it just doesnt set it

void vale
#

@sterile minnow Are you using the discord.js in the code?

sterile minnow
#

yes

void vale
#
const client = new Discord.Client();

??

slow fable
#

why use db when you have json

sterile minnow
#

ew JSON is slow af

#
const client = new Discord.Client();

??
@void vale I'm coding the commands etc in different files

#

I just wanna know why the Bot says that

opal plank
#

JSON isnt a database

sudden geyser
#

technically is, but just not a good one*

opal plank
#

it can only do one operation at a time, it corrupts easily and its slow

#

so is a txt. file

sudden geyser
#

best database

#

heck I'm a database

sterile minnow
#

JSON is just a thing to like store token or sth but not thousands of Users

opal plank
#

its not even the thousands of users

#

if you issue 2 operations simultaneously, good luck recovering your corrupted shit

sterile minnow
#

Its unsecure

#

Slow

#

and eew

void vale
#
(node:5920) UnhandledPromiseRejectionWarning: TypeError: client.guilds.get is no
t a function
pale vessel
#

pepega read docs

void vale
#

I understand why it doesn't work, I have the v12

#

😆

#

I checked the code for v11, and I have v12

#

for v12

client.guilds.cache.get('id')
proper mica
#

How can you detect when someone upvotes your bot?

#

I wanna give ppl reward of some komd

#

Kind

void vale
#

@proper mica

proper mica
#

Thx

#

Thats all i need

slender thistle
#

"official" not really

proper mica
#

Actually where do i get top.gg rokem from?

misty sigil
slender thistle
misty sigil
#

the official one is dblabi.js

pale vessel
#

no

slender thistle
#

what

void vale
#

hmm

#

thx

sterile minnow
#

I still need help with mongodb it doesnt work somehow

#

I can update stuff

void vale
#

I don't know why it doesn't work for you. You're doing something wrong

wide sundial
#
require("./util/eventLoader")(client);

client.login(ayarlar.token);

client.commands = new Discord.Collection();
client.aliases = new Discord.Collection();
fs.readdir("./komutlar/", (err, files) => {
  if (err) console.error(err);
  log(`${files.length} komut yüklenecek.`);
  files.forEach(f => {
    let props = require(`./komutlar/${f}`);
    log(`Yüklenen komut: ${props.help.name}`);
    client.commands.set(props.help.name, props);
    props.conf.aliases.forEach(alias => {
      client.aliases.set(alias, props.help.name);
    });
  });
});
opal plank
#

what the fuck

wide sundial
#

I have a bug on these codes

#

who can help me

opal plank
#

what

#

where is your discord?

#

where you requiring discord?

#

where is your new client instance?

void vale
#

wtf

opal plank
misty sigil
#

where’s your error

sterile minnow
#

I don't know why it doesn't work for you. You're doing something wrong
@void vale i just copied ur code and changed it for me and the error comes still something.updateOne is not a function

wide sundial
#
require("./util/eventLoader")(client);

client.login(ayarlar.token);

client.commands = new Discord.Collection();
client.aliases = new Discord.Collection();
fs.readdir("./komutlar/", (err, files) => {
  if (err) console.error(err);
  log(`${files.length} komut yüklenecek.`);
  files.forEach(f => {
    let props = require(`./komutlar/${f}`);
    log(`Yüklenen komut: ${props.help.name}`);
    client.commands.set(props.help.name, props);
    props.conf.aliases.forEach(alias => {
      client.aliases.set(alias, props.help.name);
    });
  });
});

@wide sundial in these lines

misty sigil
#

you’ve provided us with butter

#

but not the bread

#

sure we can work with it

opal plank
#

nor the plate or the table

sterile minnow
#

who do you mean jeremy lel

opal plank
#

wheres the rest of the code?

misty sigil
#

but we can’t help you without the bread (the error) and the table/plate (the full code)

opal plank
#

you are calling Discord but you arent importing it

#

that code is incomplete or if its all you got, you are missing quite a few bits

finite bough
#
UnhandledPromiseRejectionWarning: AbortError: The user aborted a request.
#

any idea what can cause this?

quartz kindle
#

bad internet

opal plank
#

or you added breakpoints/stopped code execution

#

yo tim

#

you know VSC well?

lusty quest
#

@sterile minnow mongoose or mongodb?

sterile minnow
#

MongoDB

lusty quest
#

then idk

#

is probably like mongoose

#

what is your query?

quartz kindle
#

no, i use sublime

opal plank
#

fuuuuk

#

been trying to figure out why my debugger console is funky

lusty quest
#

define funky?

opal plank
sterile minnow
#

what is your query?
@lusty quest i search for a User with a id (i got that user and it can display the information) and i want to set "developer" from false to true but it errors

#

(node:4116) UnhandledPromiseRejectionWarning: TypeError: something.updateOne is not a function
with this

lusty quest
#

with query i mean your code

void vale
#
const MongoClient = require('mongodb').MongoClient;
const client = new MongoClient('mongodb://', { useUnifiedTopology: true });

client.connect(async function(err) {
const db = client.db('db_name');
const collection = db.collection('collection_name');
collection.updateOne({ 'a' : 2 }, { $set: { 'b' : 1 } })
})
#

It works

sterile minnow
#

with query i mean your code
@lusty quest js const db = this.client.mongo.db('main'); const model = db.collection('users'); const something = await model.findOne({ id: userID }); something.updateOne({dev : 'false'}, {$set: {dev : "true"}})

#
const MongoClient = require('mongodb').MongoClient;
const client = new MongoClient('mongodb://', { useUnifiedTopology: true });

client.connect(async function(err) {
const db = client.db('db_name');
const collection = db.collection('collection_name');
collection.updateOne({ 'a' : 2 }, { $set: { 'b' : 1 } })
})

@void vale it doesnt i tried that too

#

i tried everything

delicate shore
#

yo

#

i got an wrror

void vale
#
something.updateOne({'dev' : 'false'}, {$set: {'dev' : "true"}})

This is update 1 record, not all

#

You forgot ' '

sterile minnow
#

I will try

delicate shore
#

pls

#

help me guys

#

no error

#

my code

summer torrent
#

no

#

this is wrong

void vale
#

and what doesn't work?

sterile minnow
#

Its the same thing

delicate shore
#

What is wrong

summer torrent
#

something is document. You can't update it with updateOne

delicate shore
#

it gives no responde

summer torrent
#

just use updateOne

rustic pewter
#

hi i'm trying to develop my bot at discord.py library and I want to embed mutiple images in discord.Embed function but embed.set_image() allows to insert only 1 image. how can i do this?

delicate shore
#

help me guys

#

discord.js

#

google command won't work

#

no response

#

no error

sterile minnow
#

Error?

#

Then idk

delicate shore
#

no error
in console

sterile minnow
#

@summer torrent (node:2296) UnhandledPromiseRejectionWarning: TypeError: something.findOneAndUpdate is not a function

sterile minnow
#

i literally tried that 10 times

summer torrent
#

@rustic pewter you can't. Multiple images are not supported

sterile minnow
#

It says its not a function

summer torrent
#

@sterile minnow js const something = await model.findOne({ id: userID }); something.updateOne({dev : 'false'}, {$set: {dev : "true"}})
this is wrong. findOneAndUpdate allows you to find document and update it.

void vale
#

'something' must be a collection

rustic pewter
#

@summer torrent right, appreciate your help

void vale
#
const something = db.collection('collection_name');
collection.updateOne({ 'id' : userID }, { $set: { 'dev' : true } })
delicate shore
#

help me

void vale
#

{dev : "true"} incorrect

#

{'dev' : true}

summer torrent
#

@delicate shore show error

sterile minnow
#

will try

void vale
#

no error

carmine trench
#

i wanna say that

delicate shore
#

@delicate shore show error
@summer torrent NO ERROR

carmine trench
#

i had named my bot

delicate shore
carmine trench
#

poketwo

delicate shore
#

it just does not responds

carmine trench
#

pls help me

void vale
#

@carmine trench ?

sterile minnow
#

Now it works

void vale
inland aurora
#

anyone know how those web dashboards are made for mee6/yagpdb?

finite bough
#

html css

solemn latch
#

How those two work specifically I dont know.
How oauth and backend generally work, sure

stiff stream
#

like that ^

earnest phoenix
#

I finally figured out hosting and dont use a stupid free one now 🙂

finite bough
#

@stiff stream emojies

#

custom emojies to be precise

stiff stream
#

ok

#

ty

earnest phoenix
#

I finally figured out hosting and dont use a stupid free one now 🙂
@earnest phoenix repl.it: shut up i am the best free one

#

Seriously

#

50+ languages

inland aurora
#

aws

earnest phoenix
#

Fast AF

finite bough
#

aws

earnest phoenix
#

@earnest phoenix repl.it: shut up i am the best free one
@earnest phoenix lol

finite bough
#

if ur code is bumpy

#

repl will automatically shut down even with a uptime robot

#

afterall uptime robot only pings it for 1 sec

golden condor
#

Hi, I am making a website, and I want to make it so when I send an endpoint like this (with express) https://cxllm.me/memes/fucking, it shows up with the image/video. Is there any way to do this?
This is my current code:

#
import { Request, Response } from "express"
import { resolve } from "path";
export = {
    endpoint: "/memes/fucking",
    method: "get",
    run: async (req: Request, res: Response) => {
        res.sendFile(resolve(`Images/welcome-to-fucking.mp4`))
    }
}```
sinful belfry
#

is the correct content type being sent in the response?

golden condor
#

Yes, it sends the video (if u open the link u will see)

sinful belfry
#

in the headers tho

amber fractal
#

it is

#

discord probably looks for the content type in the url as well though

golden condor
#

O

pale vessel
amber fractal
#

He wants an embed

pale vessel
#

o

golden condor
#

Not necessarily, I just wanted it to show up on discord like an is-inside.me

amber fractal
#

if your internet is fast enough

golden condor
#

Should I put .mp4 at the end?

misty sigil
#

welcome to fucking

golden condor
#

Yea

amber fractal
#

idk how it would work with that, I upload mine directly to a folder and my webserver just serves anything in the folder

misty sigil
#

why is this in development

amber fractal
#

Because it's a development issue

#

it's server-side development

misty sigil
#

ah yes

golden condor
#

Fuck

amber fractal
#

your backend borked ¯_(ツ)_/¯

golden condor
#

I am using express

#

It works yay

weak rain
#

can someone tell me what to do if i want my bot that it replies on mention

solemn latch
#

Regex it, or check if its in message.mentions

void vale
#
var member = msg.mentions.members.first();
if (member.user.id != client.user.id) return;
//or
if (!msg.content.includes(client.user.id)) return;
pale vessel
#

uNcAuGhT TyPeErRoR: cAnNoT ReAd pRoPeRtY 'iD' oF UnDeFiNeD

void vale
#

?

pale vessel
#

if (!member || member.user.id != client.user.id) return;

void vale
#

where do you get 'member' ?

pale vessel
void vale
#

I remembered

#

It doesn't work when you mention a bot

#

use it

if (!msg.content.includes(client.user.id)) return;
pale vessel
#

just check if there's no mention before getting the first mentioned member id

solemn latch
#

The problem is member may not exist

viral iris
#

how to change node version ?

#

in heroku ?

solemn latch
#

Heroku likly tells you how

pale vessel
#

engines.node in package.json

#

you can put something like 12.x

heavy marsh
#

How would I capitalise the first letter of a word of a user input when making an embed using discord.py? The normal method of putting .capitalize() isn't working. https://prnt.sc/tpyrm1

Lightshot

Captured with Lightshot

#

I want the choice part to be capitalised.

sonic lodge
#

how are you using .capitalize()

heavy marsh
#

doing this breaks the formatting

sonic lodge
#

apparently that is incorrect f-string syntax

slender thistle
#

yup

#

what the fuck is that actually

#
'You chose: ', {choice}.capitalize()```?
sonic lodge
#

it should be {choice.capitalize()}?

heavy marsh
#

I'll try

slender thistle
#

that and put it in actual f-string

#

INSIDE the string

heavy marsh
#

its worked

#

thanks

dusty onyx
#

heya, what sort of library/thing do you use to be able to 'search' things from other sites? like how mee6 has the urban dictionary search

slender thistle
#

It uses the official API

dusty onyx
#

ah, so are there official apis for most sites like that?

pale vessel
#

yes

dusty onyx
#

okay, cool!

pale vessel
#

they may or may not be publicly documented, so you have to do your research

earnest phoenix
#

hi

#

someone can help me?

#

Im getting some error

marble juniper
#

then

#

show it

earnest phoenix
misty sigil
#

ok

#

so, glitch?

earnest phoenix
#

yeah

misty sigil
#

and what’s code

earnest phoenix
#

not code

misty sigil
#

we can’t help

earnest phoenix
#

Im only getting this error

misty sigil
#

then

marble juniper
#

so it runs with magic

misty sigil
#

magic bot

earnest phoenix
#

uhhh.

misty sigil
#

how do you get an error from nothing

marble juniper
#

idk

earnest phoenix
#

glitch system is erroring

misty sigil
#

it could just be glitch being shite but

marble juniper
#

probably just glitch

#

you can always put fault on glitch

earnest phoenix
#

I how to restart my bot?

marble juniper
#

idk add a comment to ur code

#

cuz glitch restarts on changes

earnest phoenix
#

ok

misty sigil
#

do you pay for glitch?

marble juniper
#

pls say no

void vale
earnest phoenix
misty sigil
#

No it’s not

#

Glitch isn’t free

#

glitch has premium

earnest phoenix
#

Im not buy glitch premium

sudden geyser
#

It's freemium

earnest phoenix
#

lol

misty sigil
#

What code is erroring

earnest phoenix
#

not code error

#

its a module error

void vale
#

install sqlite3

muted vortex
#

So apparently this bot https://top.gg/bot/666792286348247040 has been taken offline.
The creator of the bot was gracious enough to share the github code with me though. So I have 2 options, fine a free shell (this bot also requires SQL) to host the bot or find another bot on top.gg that has a similar function.
"It also creates #network-userchat, where users can send messages to users on other servers on the same network(No commands are necessary to send messages just type freely in this channel) - essentially just a broadcast but on a userlevel"
Here's the github: https://github.com/Meschdog18/disnet
Any suggestions?

lusty quest
#

so you want to relay stuff between discord servers?

leaden shard
#

How to get invite link from another server with eval command?

faint prism
#

Interesting concept

muted vortex
#

@lusty quest yes, the telephone mechanic doesn't really do the job because you have to manually initiate the connection, and the application of it seems a little...weird.

lusty quest
#

well its a opt in thing

muted vortex
#

@earnest phoenix webpanel?

faint prism
#

If I'm reading the TOS right, do I need to have a user optin before I can do anything regarding data around them?

lusty quest
#

depends on what data. userIDs should be fine in a limited space but for more they need to opt in

faint prism
#

I have a bot that for every message sent, it uses ML it predict if that msg was nice or rude, and updates a running count (int) associated with that user

#

But doesn't save the msg

lusty quest
#

should be fine

faint prism
#

Really?

lusty quest
#

messages are you allowed to save for at max 30 days

#

you dont store the massage you process it

faint prism
#

What data would you need an opt in for?

lusty quest
#

if you permanently store stuff like usernames, Email Adresses

faint prism
#

I make a user's niceness queriable via @mention or username#discriminator

misty sigil
#

is saving guild id allowed

lusty quest
#

with a mention you still get the id

faint prism
#

Right

#

So Id's I can save (for referencing user specific data), but I need an opt in for their Username?

lusty quest
#

ids are usually fine. wrote in my Apply for Certification that i store useriD and look at my profile

#

i would make a Opt in for this

#

like a command that adds the missing data to the user profile

faint prism
#

I did, otherwise it would be passively keeping niceness levels for everyone

#

and update every message sent in the guild

#

lol

lusty quest
#

would still make it a 2 step thing. like you run the command and the Bot asks you if you want that the bot stores following stuff about you: stuff you want to store

#

then the user needs to answer with yes or no

#

this is just for going 200% sure its save

#

or use a Embed and reactions

faint prism
#

Well it would say no user record stored. and the optin cmd would generate a profile. For every new message it checks first if you have an existing profile (only created via optin)

limpid summit
#

Is there a bump feature/command for the 'Discord Server List' bot ?

faint prism
#

My original question was:
Do I need an Opt in for this data to be stored:

This is exactly what is stored for a user?
//Identifiers ulong Author.Id // Discord user's ID string Author.Username // Discord user's username; ex: Auger#8261 string Author.Mention // <@!DiscordID> // Bot-generated data double Niceness // RunningTotal divided by TotalCount int TotalCount // Amount of messages a user has sent since opting-in int RunningTotal // The Machine Learning's prediction for a message (+1 nice, -1 rude)

lusty quest
#

it just relays the Server infos to the DBL page

#

if you want to get more users look into auctions on DBL

#

userid should be fine without Opt In

#

otherwise you could not make Warning Commands etc

earnest phoenix
#

Does anyone know of a bot that:

I can select a role,

Then select roles that that role can:
!add @earnest phoenix generalchat
or something?

lusty quest
#

iirc tatsumaki, Mee6 and Dyno can do this

restive furnace
#

and ALOT of other bots can too ^

lusty quest
#

@faint prism also make some TOS they are now needed

#

i have on my Larger Bots a command for this. it sends the user a DM with the TOS and what data is stored for the user

faint prism
#

My bot's help includes this currently:

Description and Data Collected
When a user opts in, the bot will begin passively consuming/deriving data from (NOT KEEPING) any new messages posted by this user. Messages are interpreted by a Machine Learning model that determines if the message is nice or rude. It will then (if it has not already) generate a user record with the following data:
Message Author's Id, Username, Discriminator, Mention, a Running Total (1 for nice message, -1 rude message), A Total Count of messages from that user, and finally a Niceness percentage (updated each new message from user)

lusty quest
#

this is my Privacy Policy

faint prism
#

That's good

earnest phoenix
#

include contact information

#

if the user requests data deletion

faint prism
#

I have an opt out, that deletes the record (and w/o it, no new info will be added until opt in)

lusty quest
#

sounds good

faint prism
#

It's funny, the most used command is its command to test a message directly against the ML model to see how nice or rude it is.
Which doesn't save anything at all or require opting in

lusty quest
#

you dont store anything so its save

faint prism
#

Mhmm

lusty quest
#

want to get into ML. have a Idea for a bot but this will probably kill me in the process to teach / program

solemn latch
#

I need to build an opt in system.
I've just been distracted with other parts of the bot

faint prism
#

This is what I used

lusty quest
#

nice learning a new language and ML at the same time. So much fun

faint prism
#

C# is like java

#

But better

#

And nothing like JS

lusty quest
#

i dont even know java

faint prism
#

😛

lusty quest
#

but some Lua, Js, GO, and py

earnest phoenix
#

@lusty quest @restive furnace they can't allow

for e.g.

Allow:
Flame Guild Leader
To:
!role add @earnest phoenix Flame Guild

that's what im trying to find,

I don't want mods on my server but bots have admin perms so if the user can use the command they can bypass being able to do things they shouldn't be able to

#

sorry for ping

#

responding to you both