#development
1 messages ยท Page 313 of 1
it's simple to install tho
I see that the api is all just js, so no py?
huh
hi
C# is for the real bot devs ๐
wew
guys
ok
Groot
i am
no me
no panda
@fossil oxide how do you make discordie embeds?
It's in the API docs
@earnest phoenix sample codejs channel.sendMessage("", false, { color: 0xFF8700 //sidebar colour, title: "text here" });
isnt the most cleanest example
K
var emb = new EmbedBuilder().WithTitle("Title").WithColor(new Color(255,0,0));
@earnest phoenix did it work for you
@forest sparrow haven't tried it
can someone tell me how to get ping in ms cause i always get minus answers
js
lib?
DiscordJs
rip
i'm currently testing to get ping to not be minus lol
Hi currently testing to get ping to not be minus lol, i'm dad!
...
I make a new date
const ping = new Date();
e.message.channel.sendMessage("Pong!").then(msg => {
const pong = new Date() - ping;
msg.edit(`Pong! \`${pong}ms\``);
});```
$ping
Pong! 194ms
Elapsed time: 172ms.
`\`${Date.now() - message.createdTimestamp} ms\``
``` thats what gives me minus
`````message.createdTimestamp - ${Date.now() } ms```
Yea
Because that's how maths works
wait
it might work
don't quote me on that
try it
hmm idk, I make it have a new date when the user does ping, then const pong = new Date then take away the ping new date
okey :3
yt i
o i removed uptime
.uptime
idk basically forever
lol
s!ping
Pong!, This message took: 746ms
Is that good?
123 ms
Let us know! Join the support server! https://discord.gg/yp8WpMh
123 ms
Let us know! Join the support server! https://discord.gg/yp8WpMh
yt ping
192 ms
Let us know! Join the support server! https://discord.gg/yp8WpMh
192 ms
Let us know! Join the support server! https://discord.gg/yp8WpMh
s!ping
Pong!, This message took: 746ms
s!about
1.3.2.1
21
1140
287681651973292043
yt i
eh server count is borked
fixed
yt i
nah it isnt
i used to have like 1 shard per 1000 servers
but i got to ~6k and was like "ah screw it i'll set it to 10 so i dont have to scale it up anytime soon"
Why not make it dynamically assign them?
effort
ye pls ik im bad coder
How do I set my bot to updating process and maybe add new commands or modify old ones???
Without taking bot offline
or less than a minute
Depends on the amount of shards and things
how many do you have rn @opaque bison ?
My bot is private and under development, It'll go live in a week or so
I am adding as many stuff as I can by taking inputs from my followers aka supporterd
Supporters*
Not donators :(
why'd you say aka supporters ๐ค
Ohh but my bot is at a level of bots which are at around 1000 servers so I don't think it should take that long
It's coded really well with a lot of features
@opaque bison is the bot here too?
I'm also curious
hey so im working on my selfbot with the reload command, is there a way to reload all commands?
Why not have it automatically reload?
?
Mine can't reload!
How do I make a bot reload? Let me figure this out
/status
/stats guilds
Amount: 6
โโโโโโโ โ 50% Joined (3)
โโโโโโโ โ 50% Left (3)
Amount: 138
โโโโโโโโโ โ 65% Joined (91)
โโโโโ โ 34% Left (47)
Amount: 138
โโโโโโโโโ โ 65% Joined (91)
โโโโโ โ 34% Left (47)
1689
o
&
Hmmm..?
&help
= Command List =
[Use &help <commandname> for details]
&8ball :: Ask the magic 8 ball a question!
&about :: Get all the additional info which arent viewed in other commands.
&announcement :: BOT sends the latest annoucement in your DMs. [NEW ANNOUNCEMENT]
&ban :: Bans the mentioned user.
&botstats :: Views the Technical info and Statistics
&dj :: Its #PartyTime!
&help :: Displays all the available commands for your permission level.
&imdb :: Search IMDB for film information
&invite :: By this command, You can view the invite link for me.
&kick :: Kicks the mentioned user.
&kill :: Kill a player and send them to hell
&lockdown :: This will lock a channel down for the set duration, be it in hours, minutes or seconds.
&mute :: mutes or unmutes a mentioned user
&network ::
&ping :: Ping/Pong command. I wonder what this does? /sarcasm
&purge :: Purges X amount of messages from a given channel.
&reload :: Reloads the command file, if it's been updated or modified.
&restart :: Reload all the .json and the .js files (Bot admin approval required.)
&revive :: Revive a player and bring them back from hell
&roleinfo :: Views role info according to config.json
&russian :: Play Russian Roulette
&say :: Bot will repeat what you say
&slot :: Play slots in discod!
&stats :: Display user stats
&status :: Views info about bot
&support-server :: Views the support server
&talk :: Now talk with the BOT in DM! (There might be some API error.)
&unban :: Unbans the user.
&warn :: Issues a warning to the mentioned user.
@sterile trail Discord.JS-Commando
Successfully reloaded: dj
yeah ๐
here
:?
there
๐ฎ
Hmmm..?
What do you mean?
Convert it to your lib
Yeah it's ez don't worry
Ohhh, it's this easy? .reload lol
I gotta be attentive more while reading DOcs
lol
-botinfo
Please include a bot mention
-botinfo @thorn salmon
-botinfo @calm creek
-botinfo @marsh fulcrum
-botinfo @fair grail
-botinfo @velvet lake
-botinfo @proper drift
-botinfo @fair grail
hi how du i mek denk urben command i tried urben moodule but no hav exemple????
Hi greg lol
u put setblt on
and dat will gib denk urben defintoon
ys
setbelt ony
no
lul
ys
succ
succ
fucc
@lethal elk,
Your doing AMAZING !! Keep up the good work :)
Your presence is a great gift for our server !!!```
Type **;points** to see your points !!
Type **;level** to see your current level!!
@earnest phoenix please stop (cc @ocean edge cuz your bot)
Ugh we need Non-Testing Mute
xD
Yeah
This channel isn't actually made for bots to be used in
We need Mute
iirc
We have Mute
just annoying ones
Then use mute. On @earnest phoenix
Dont think so
tru
I vote no
Isn't this for help or shit?
Cuz there are testing channels
Okay I disabled all bots from speaking in here
yay
Ayy
thx
Pong!
!ping
IM SAFE FROM THE LMAOS
ayy
Invalid command null, do nullundefined for a list of valid commands.
do /loan in testing
nullundefined
when you forget to register subcommands
Haha
Invalid command Invalid command null, do nullundefined for a list of valid commands., do nullundefined for a list of valid commands.

hah only 32 friends
Thats a lot for me ok
xd
Hehe now to add eevrrybody
you can only have
5k friends
and you'll get banned from so many servers
for friend botting

lol
/./eval msg.reply(JSON.stringify(bot.users.filter(u => u.discriminator == bot.user.discriminator && u.username != bot.user.username).first()))
@weary shoal, {"id":"196369274577616916","username":"dsakura","discriminator":"7160","avatar":"5a7cde1d36303b54aa932ae47cc19438","bot":false,"lastMessageID":null}
There we go
It can now run without having to change the discriminator
hacker
how do you do ping embeds again?
This ping be potato
s@userz
/./eval bot.ping
They're working on it lad
Dont call be lad, son
Okay kiddo
Dont call be kiddo, lad
Okay pal
Dont call me pal, friend
Okay fucking user from dicksword DB
Okay buddy
Dont call me buddy, acquaintance
Okay amigo
Dont call me amigo, amiga
Okay....... friend
Ok
in discordie how do i get invites from a guild using the bot
why not ask in DAPI
IGuild.getInvites()
https://qeled.github.io/discordie/#/docs/IGuild?p=IGuild%23getInvites&_k=jra0qf
Roxy eval
var g = Context.Guild as SocketGuild;
return await g.CreateInviteAsync();
@scarlet star
Roxy cat
oh right
right... my eval isn't really working for async lel
woops
@bitter sundial bots can't talk here
intended I guess
still having issues from getting invites from discordie
https://discord.gg/discord-api <-- They have a discordie channel
does this look wrong? https://pvpcraft.ca/i/0wwfq.png
^say test
tfw you reference discordbotsorg as dbl in your code
i don't even make it function
anybody see whats wrong with this? Other than it being in python Kappa ```py
async def update_now_playing(self, entry=None, is_paused=False,):
game = None
if self.user.bot:
activeplayers = sum(1 for p in self.players.values() if p.is_playing)
if activeplayers > 1:
game = discord.Game(name="discord.me/ladonegro | live %s " % activeplayers)
entry = None
elif activeplayers == 1:
player = discord.utils.get(self.players.values(), is_playing=True)
entry = player.current_entry
if entry:
prefix = u'\u275A\u275A ' if is_paused else ''
name = u'{}{}'.format(prefix, entry.title)[:128]
game = discord.Game(name=name)
await self.change_status(game)
@weary shoal What uhhh error r u getting
Idk some random guy sent it to me and said it wasnt working. Idek him haha
lmao
Ask him.
name = u'{}{}'.format(prefix, entry.title)[:128]
why is there a u in front of it
Nah I just sent him to the discord-api server
and a [:128] at the end
are discord channel ids are unique across discord?
yes
kk
that should make things easier
now to handle logistics of 7500 discord servers
with json
if ignoring guilds IDs then it is fine to take all
kay dumb question
but can i set multiple values to one json thing
eg
'yt_channel_id' : pewds, tbjzl
}```
server_id_here: {
'yt_channel_id' : ['pewds', 'tbjzl']
}
danke tonkks
it's called an array
what about jsoff?
funny
okay then
lol
and i guess if i lookup that array
wait nvm
it'll return as an array
not as [value1,value 2]
right?
so i could do
if self.ids[server.id]['yt_channel'] is not None:
ytchannelid = [self.ids[server.id]['yt_channel'], ytchannelid]
if you parse the json then it'll be as an array
kk
I'm not quite sure you could use ytchannelid in that variable
list me harder
unless u define it first
doesn't mean it needs to be defined and then use it?
It's like trying mylife = mylife but mylife hasn't meant anything yet.
why kebab
thats deep
did you just auto correct to kebab
it is
wanna see something deep
i dont use autoincorrect
client.user.client.user.client.user.client.user.client.user.client.user.client.user.client.user == client.user
ReferenceError: client is not defined
c!eval this.client.user.client.user.client.user.client.user.client.user.client.user.client.user.client.user == this.client.user
f
f
where did go edit handler
this.client.user.client.user.client.user.client.user.client.user.client.user.client.user.client.user == this.client.user
true
complicated functions ftw
๐
@announce.command(name="add", pass_context=True, no_pm=True)
async def _add_channel(self, ctx, ytchannel):
"""Adds a new channel for video announcements. Run this command in the Discord channel you want announcements for."""
channel = ctx.message.channel
server = ctx.message.server
if server.id not in self.ids:
self.ids[server.id] = {
'mentionHere' : False,
'mentionEveryone' : False,
'message' : 'New video!',
'yt_channel' : '',
'latest_video' : '',
'channel' : channel.id
}
await self.bot.say('Looks like this server isn\'t in the database!\nAdding record now with default settings! You can change this with `yt settings`.')
logger.log('Creating new server data for announce. ID (Server, Channel): {} , {}'.format(ctx.message.server.id, channel.id))
if len(ctx.message.content.split(' ', 3)) == 3:
await self.bot.say("Arguments needed!\n\nExample: `yt announce add DramaAlert`")
else:
youtube = build("youtube", "v3", developerKey=youtube_key)
search_response = youtube.search().list(q=ctx.message.content.split(' ', 3)[3],part="id,snippet",maxResults=1,type="channel").execute()
ytchannelid = search_response.get('items')[0]['id']['channelId']
if self.ids[server.id]['yt_channel'] is not None:
yt_channel = [self.ids[server.id]['yt_channel'], ytchannelid]
else:
yt_channel = ytchannelid
self.ids[server.id]['yt_channel'] = ytchannel
self.ids[server.id]['channel'] = channel.id
dataIO.save_json(self.ids_path, self.ids)
await self.bot.say('Enabled announcements for channel id {} ({}) in this channel!'.format(ytchannelid, search_response['items'][0]['snippet']['title']))
lol
I'm not scrolling thru that
Too long for me
require('lebab')
Error: Cannot find module 'lebab'
this is #development

how can't you find global module
require('lebab')
Error: Cannot find module 'lebab'
fake
import die
i'll test when its ready
look fuck learning another lang when i can just copy paste 9 months old code i made when i knew python
ew jquery
or js
jquery is outdated nowadays
I JUST FINISHED THE COURSE
just plain css ๐๐ป
jquery more like bloatware and outdware
Don't get your bots in a twist.
require('lebab').transform
[Function]
require('lebab').transform()
TypeError: Cannot read property 'map' of undefined
same
just plain js ๐๐ป
require('lebab').transform('const gay = function() {}', ['arrow'])
{ code: 'const gay = () => {}', warnings: [] }

i have new command
modern-js
nano modernjs
I want to add my bot to get certify. due to the removal the first time, does those days count for 3 days!

the built in context module for d.py is telling me i cant assign a value of its to a var
or rather the thing im doing isnt possible
File "ytb.py", line 393, in settings
server = ctx.message.server
AttributeError: 'str' object has no attribute 'message'
brb gonna get python help
๐ค
messages b1nzy
Did you pass contex
yup
@bot.group(pass_context=True, no_pm=True)
async def settings(self, ctx):
"""Manages settings for video announcing"""
server = ctx.message.server
odd
very
bot.message.server maybe
hmm
AttributeError: '<class 'discord.ext.commands.bot.Bot'>' object has no attribute 'message'
wtf
commands.group is what I use
ye well
Or bot.command
commands.group?
i might ask danny
I'm using a class too. @tame rivet if you're in a class use commands.group
@bot.anything doesn't work in a class I think
commands.group wasn't working anywhere rip
@tame rivet did import commands
I've missed that a few times doing shit on mobile
So odd
ew moose
lol
\โ
I would like to strongly lobby for returning the site to the original list
A small amount of bots crowd the front pages
And non-certified and non-featured bots would logically seem to have a much lower conversion rate than otherwise
Certification could and should play a role in the algorithm used for the actual list, but it should primarily be based on upvotes and views
I know you can't please everyone, but I feel like the new format is... not conducive to the purpose of the list
I just improved the featured again so more bots are able to get featured
The featuring is the part I dislike
I also dislike having "top" be the default sorting for any reason
it's there
but not something we like to put out there every time you go to the list
label GitHub when
why do you want a github label tho
it's like HEY MY BOT IS OPEN SOURCE, COME AND STEAL MY CODE
lol
don't we have enough labels already
never enough love
anyone any good at regex?
im trying to turn a date such as 2017-05-09T17:58:59.000Z into 17:58 09-05-2017
@tame rivet smh why would anyone use regex for that
because easy
it is official Date object
wait ye why would i
use it like date
๐คฆ๐ผ
he uses python
lol
use python way then
who is fromPewDiePie
interesting... seeing as i have a function that should deal with that
index = random.randint(1,totalvids)
for x in range(0,totalvids - 1):
if index <= 50:
do thing
else:
do thing for if above 50
lol
EWWWWWWW
JS <3
except i dont know it ๐ฆ
JS is life
while(python):
print("Ewwww")
^
Lol
Bots no talky in here?
Oh eait
๐ค
For some reason I thought this was Discord Bots server
Hahahahaha
if js is so great how come my python bot has 3x as many servers as yours?
@earnest phoenix
/s
Lol
Because you made your bot far before I made mine
My bot is only like 6 days old
85 servers
Has this channel always been here?
ye lol
For some reason I never noticed it until now
I always read quickly and ignored it
also i'm talking about ardent
I'm dev in that server
I'm making their website
Well gtg
@tame rivet u better write those bots in js or banne
no u
no u
and my axe?
lol
someday i make posting my server count work
until then
I'll switch libraries, make 40 different bots, etc
lolkpolshelp
@earnest phoenix lang?
node
js
#moderators pins has my example that is super fast
aka js snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`) .set('Authorization', 'UR FOKING DBOTS.ORG KEY') .send({ server_count: client.guilds.size }) .then(console.log('Updated dbots.org status.'))
Yeah mine is broken, but whatevs
It's only showing for one shard
And I don't actually care tbh

you could gave it us
we could improve it
shard it
fix it
then you steal it

ยฏ_(ใ)_/ยฏ
pls
hand it off
we need dank memer
I don't even care that its a competitor to membot
plsplsplsppls
Lol no one here even uses it ๐คฃ
Make the page give people epileptic attacks 
copy dank memer's page
i will at somepoint
So, my bot stopped working after a restart. Anyone else having issues with the API right now? ๐ค
what API?
I'm using JDA
Seems like it is stuck on the connecting process
that's why I thought maybe the Discord API is having connection issues ๐ค
-bots Shinozaki Sophie
@harsh ginkgo
Oh, fixed it
Seems like the latest API build broke startups for some bots. Downgrading helped
they had an announcement about it lol
What's this bot all about ? I only use bot to play Pokemon. Can I be of any help ?
wut
yeah, JDA 194 has a disclaimer on their guild saying not to use it... it broke Now Live as well before I went there looking for answers... not sure why DV8 or Alpaca didn't just take that build down
-owners @red spade
for updating stats would it be better to do something like this (in js)?
// Init
const Discord = require('discord.js');
const bot = new Discord.Client();
function postStats() {
// Post Stats Code Here
}
// Events
bot.on('guildCreate', (guild) => {
if ( ((bot.guilds.size % 10) === 0) ) postStats()
});
bot.on('guildDelete', (guild) => {
if ( ((bot.guilds.size % 10) === 0) ) postStats()
});
i am aware that there are some issues with this, i.e. annoying owners making bot join and leave multiple times when bot reaches a milestone of lets say 100 or 1000
so you'd want to post every ten servers?
Pretty sure you can just make it update once every 5 mins and it is fine
I have it on join/leave so ehh
Same here
same leave join boot
I mean
I have it send whenever it joins/leaves a guild
If that's bad, sorry
But I only gain 50 a day usually
only
that's nothing compared to a ton a bots
Everyone just posts on join/leave tbh
Your welcome on the .json file way
lol
Just post on_socket_response ๐
@umbral pelican ```js
(function (exports, require, module, __filename, __dirname) { module.exports = client, message => {
^
ReferenceError: client is not defined``` ;/
Going to... sleep
@vital lark put client as what you defined it then. Probably bot or this.client
i need to know a way to mention the bot like when the author types @botname#0000 anything
in discordie
he means when the bot is mentioned
shh...
so like @cold cobalt hi
@forest sparrow Someone already has this nick
Isn't it os.loadavg() ๐ค
http://i.imgur.com/USojLpL.png dont think so
http://i.imgur.com/TcctlRt.png thats better
os = require('os')
message.channel.sendMessage('nuuuuu');
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['r'],
permLevel: 0
};
exports.help = {
name: 'nuuu',
description: 'yaas',
usage: '<>'
};```
one of my command
ok?
lol
lol
๐ค
...
wdum eww
Commando is trash too. Make your own bot from scratch
Make your own scratch from bots
Make your own discord library from scratch
ratelimit yourself
@bold shuttle#4511 are you back?
yes
Damn it
Lawl
LOL
@Simba#4511 if you update your bot you will be a bot developer again
@earnest phoenix he got banned
Why?
For being acting 10 years old
any one working with the dpy ver 1?
this is pissing me off ive been fucking with it for hours py async def send_help(ctx): channel = ctx.message.channel await channel.send('test1') if ctx.invoked_subcommand: await channel.send('test5') pages = ctx.bot.formatter.format_help_for(ctx,ctx.invoked_subcommand) for page in pages: em = discord.Embed(title="Missing args :x:", description=page color=discord.Color.red()) await channel.send(embed=em) await channel.send('test2') else: await channel.send('test6') pages = ctx.bot.formatter.format_help_for(ctx,ctx.command) await channel.send(ctx.command) for page in pages: await channel.send('test8') em = discord.Embed(title="Missing args :x:", description=page color=discord.Color.red()) await channel.send(embed=em) await channel.send('test3') :/
is passing both ctx and the command but like dosnt return the pages :/ ready to kms
In discord py, is there an event handler to see when the bot logs out
@sonic kindle why are you using version 1
1.0.0
and im dumb af
pages = ctx.bot.formatter.format_help_for(ctx,ctx.invoked_subcommand) < pages = await ctx.bot.formatter.format_help_for(ctx,ctx.invoked_subcommand)
format_help_for is a coroutine in 1.0.0
how to shard your bot with discord.py?
is your bot have 2.5k guilds?
1.0.0?
Or 0.16.7
Makes a big difference
Actually it doesn't matter if you're not on 1.0.0
Start rewriting your bot
And use
-bots NoahLiedFilm
@jaunty island
-botinfo @jaunty island
you shouldnt shard at 11 servers
What really makes it official?
bot = commands.AutoShardedBot(command_prefix="rw!", description='fucking rewritey')
^
and your sharded
just dont fuck with shards on 16.7
its a fucking nightmare
and you have to use a db for shard a to see shard b
use AutoShardedBot or AutoShardedClient
tho you will have rewrinte most of you bot for 1.0.0
same
I dont know @weary shoal
@NoahLiedFilm#2280 just start rewitting for ver 1.0.0
@RandomBotOfficial#2280 and will never have to worry about Shards
@earnest phoenix what can't I tag you
idk
Ahh there it is
hello
Hmm
im pretty sure its within
this portion
of the code
var mvc = msg.member.voiceChannel
// If the queue is empty, finish.
if (queue.length === 0) {
msg.channel.send(wrap('Playback finished.'));
if (mvc) {
mvc.leave()
}
}```
You need a Error block & a warn block saying I am gonna replace this.
Oh
@earnest phoenix when you don't know how to play Music
xD
I can't even do Music myself
It's too bs & hard :p
Do you have a Github repo?
no
lol
Wait
deprecated
@vital lark what do I do
@unborn onyx
wat
Download VS Code (or Atom (it's shit)) and download Node.js
Links: https://nodejs.org
Latest Features c:
or
get Atom
but Atom is shit.
I know
no
download it!
Visual Studio Code <3
Atom is best
pycharm
Pycharm is good but doesn't look good
gg
lol
pycharm is basicly VS15 + Python tools
tho i prefer Python tools as it allows for inbuilt git, intellisence and a ton of cool VS only things
lol
I prefer OBS Studio as that is the best for streaming. (xd off topic)
I stick to Pycharm because it's got everything I need rn sftp ssh run debug git all of it ๐คท๐ผ just with the config wasn't a pain in the ass
Has anyone else have problems with wakatime and sublime?
no
@floral stone it was messed up for me too took 2 days for the leaderboard to update for me
@sonic kindle thats not what I'm referring to but thanks
๐คท๐ผ
i need help
bluh
my JQ isnt working
and i dont know why
$(document).on("click", "#searchButton", function(){
$(this).addClass('loading')
$(this).addClass('disabled')
var value = $('#searchBox').val()
var newUrl = '?name=' + $('#searchBox').val()
alert(newUrl)
window.location = newUrl
})
this used to work
like
.val();
that used to get the value, now it doesnt
and im wondering what happened
$('#searchBox') gets the object
$("searchButton").on("click", function(){
$(this).addClass('loading')
$(this).addClass('disabled')
var value = $('#searchBox').val()
var newUrl = '?name=' + $('#searchBox').val()
alert(newUrl)
window.location = newUrl
})```
@noble hazel
but it returns None when getting .val
nono
the code runs
its not getting the value which is wrong
UHHH
wth?
so
my other search bar works perfectly
???????
wait hang on
i think it might be getting the wrong element
cus if i have two the same
then ofc its getting teh wrong one
gfdi
nope
that didnt change anything
๐ค
๐ค
its the same code wise
but it doesnt work
wew
finally
sorry bout that
im all new too the whole idea of JQUERY
and java in general
@noble hazel Why not just use <form> which handles all that nonsense for you?
It'd be easier to use <form> than custom JS



love dicksword