#discord-bots
1 messages · Page 975 of 1
why not just use buttons?
Then you need to store that!
just wanted to try it with select menus
ah
yeah, with total
i need to pass that into my callback
^
Isn't it a closure?
wdym
you use a view to add the menu and then you send the view no?
yeah
well then just make the class accept the argument total
what
The view is built during runtime 🙂
@bot.command()
async def poll(ctx: commands.Context, *, options: str):
dict = {}
total = 0
list_ch = options.split("/")
question = list_ch[0]
list_ch.remove(question)
question = question.replace("-", " ")
choices = list_ch[0].split(",")
embed = disnake.Embed(title=question, color=ORANGE)
for ch in choices:
embed.add_field(name=f"{ch}: ", value=f"{0}%", inline=False)
dict.update({ch: 0})
option_list = []
select = Select(
placeholder="Choose An Option",
options=option_list,
)
for op in choices:
option_list.append(SelectOption(label=op, value=op))
async def callback(interaction: disnake.Interaction, total):
total += 1
dict[select.values[0]] += 1
dict_profile = dict[select.values[0]]
embed = disnake.Embed(title=question, color=ORANGE)
for ch in choices:
embed.add_field(name=f"{ch}: ", value=f"{(dict_profile * 100) // len(choices)}%", inline=False)
await msg.edit(embed=embed)
select.callback = callback
view = View()
view.add_item(select)
msg = await ctx.channel.send(embed=embed, view=view)
yes
this command is just for me to learn how select menus work ;)
What you should do, is not add an argument to the callback, because you can't tell disnake to keep calling it with the same variable, rather you should define total inside of poll() then change it inside of callback().
im not even sure how this would be done. since i havent even used dropdowns
Ah, nice, yeah you need to add nonlocal total
whats that
It tells Python that when you modify total it isn't a new variable, rather it is the same as the total you define in poll()
Can someone help me with this error?
I am trying to make if the amount is greater of your balance you cannot deposit it.
Can someone help me please? I want to code a discord bot where you can make bets for footballgames or something like that… and if its possible also with an oen custom money system
youre trying to do str > int
Yes
make amount an int
can anyone explain why I get this error Ignoring exception in command help: Traceback (most recent call last): File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\ext\commands\core.py", line 169, in wrapped ret = await coro(*args, **kwargs) File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\ext\commands\help.py", line 848, in command_callback return await self.send_error_message(string) File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\ext\commands\help.py", line 637, in send_error_message await destination.send(error) File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\abc.py", line 1504, in send data = await state.http.send_message( File "C:\Users\tenuk\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\http.py", line 420, in request raise HTTPException(response, data) disnake.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
from ```py
class MyHelp(commands.HelpCommand):
async def send_bot_help(self, mapping):
await self.context.send("This is main help")
!help <command>
async def send_command_help(self, command):
await self.context.send("This is help command")
!help <group>
async def send_group_help(self, group):
await self.context.send("This is help group")
!help <cog>
async def send_cog_help(self, cog):
await self.context.send("This is help cog")
async def command_not_found(self, command):
await self.context.send(f'Unable to find command named {command}')
Hmm Okay
It's the command_not_found that seems to be raising the error
It's possible
Can you send me an example or sometjing like that?
Or can you explain me this
@slate swan Where would I convert to an int?
Not really. You just need to learn to code in python and learn discords API...
!e ```py
x = "5"
print(int(x))
@spring flax :white_check_mark: Your eval job has completed with return code 0.
5
Any tutorials on yt ?
Or whats the keyword for this?
I am not printing anything...
Plenty, just search for discord bot tutorial python
so...?
i just showed you that I made x an int when it was a string
it's saying bal[0] is a string.
@slate swan :white_check_mark: Your eval job has completed with return code 0.
<class 'float'>
😳
i'm sorry not sure where thsi came from lol
i just did it because its quite interesting
I converted the str to an int, do I need to put that in another if statement
Nvm I fixed it
Just indented 1 line too far 😶
How do i get a code thats with letters AND numbers? Ive got this so far:
numbergen = ''.join(random.choice([chr(i) for i in range(ord('a'),ord('z'))]) for _ in range```
wdym may i get an example?
well, when i run the code ive sent a get a randomly generated code, like wjsvf and i want to get a code with letter aswell as numbers
this is for my disord bot
so random letters and numbers?
yes
do you think my carpenter can fix my toaster
yes.
ok then
!e
print((lambda l:__import__('secrets').token_urlsafe(l))(9))
@slate swan :white_check_mark: Your eval job has completed with return code 0.
46_XDCobs4SJ
Hi
I need help, with slash commands. How do i make it so that only the author can view the bot response?
send an ephemeral message
Its not exactly related to dpy but ig you all use ec2 windows t2micro for hosting
Thank you.
yw
i edit 1 to change the length of the string?
Do i just do ephemeral=True?
yes token_urlsafe takes a parameter which is the strings length
ye
in the .send coroutine yes
alright, thanks
yw
Ubuntu is better
!d secrets.token_urlsafe @slate swan
Idk at what terms but yes
secrets.token_urlsafe([nbytes=None])```
Return a random URL-safe text string, containing *nbytes* random bytes. The text is Base64 encoded, so on average each byte results in approximately 1.3 characters. If *nbytes* is `None` or not supplied, a reasonable default is used.
```py
>>> token_urlsafe(16)
'Drmhze6EPcv0fN_81Bj-nA'
?
great, ty
You can't send an ephemeral message through non interaction
where is InteractionContext from?
but we can remotely access that desktop and run the bot file or something right?
Ok gl with it
Setup guide if ya want https://gist.github.com/Exenifix/a8aa68a4976389757ff3121e6daadcf6
and also is commands.is_owner() giving you all some error?
exception discord.ext.commands.NotOwner(message=None, *args)```
Exception raised when the message author is not the owner of the bot.
This inherits from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure")
I checked through, i dont see it anywhere
yes it would raise the error given above
i am using dpy
doesnt matter
still samething
just annotations are different
ahh ty
Should've been typehinted using ParamSpec since this is a decorator
is there a way to send a timestamp that each user sees as there time on their discord account?
yw
whats ParamSpec?
like the class what is it used for
Python Enhancement Proposals (PEPs)
How do i fix?
TypeError: InteractionContext.send() got an unexpected keyword argument 'ephemeral'
Code?
await ctx.send("I have sent your confession", ephemeral=True)
When i add the epheremeral=True, that's the only time it bugs
What library?
What? I have discord-slash for my modules?
import discord
from discord import guild
import datetime
from googletrans import Translator
from discord_slash import SlashCommand
@cloud dawn
send a code of whole command block
sql
it better?
json is not a database.
ik im debating with my friend
100x
he said just use json
💀
json is meant to be a fixed set of data not meant to write to.
Well he obviously has never coded a Discord bot 😂
I think they are called hidden and not ephemeral.
Not sure tough, if that won't work idk since this lib is undocumented.
both of them arent dbs
Let me try
I mean you can use pure SQL to store data.
🤓
@cloud dawn it works, thanks
one is for formatting data and the other is a query language
You can store entire python onelines inside a db and execute the script lmao
what
I once coded a website inside sql
what does this have to do with this conversation?
That anything is possible.
ok?
Anyhow, how should i go about remaking cogs but for Client hmm
How do I make slash commands with a discord.py 2.0.0a bot?
Cogs are just attachable classes that implement teardown & setup methods. You can just imagine, load_extensions to import the class, then when calling setup globally it will iterate through all the methods using a metaclass, then attaching the commands & events to the client specified. You can do this pretty easily if that helps explaining it at all
@exotic maple I don't want to be annoying but you seem to have figured out slash commands, would you mind guiding me to some resources about how to set that up?
Specifically, that is the reason why you have to use different decorators for registering events & commands, E.g @commands.commands() and @commands.Cog.listener all the decorator simply does is mark the function as either an event or a command, which then the metaclass iteration will look for
just check out the repos examples
so you dont need to use that awful lib
I could recommend you a video which helped me while i was a beginner
Sure :)
I did, but I didn't see any for slash commands.
just read the gist danny sent
!e ```py
class FooMeta(type):
def __new__(cls: type["FooMeta"], name: str, bases: tuple[type["Any"], ...], attrs: dict["Any", "Any"]) -> "FooMeta":
for name, value in attrs.items():
print(name, value)
return super().__new__(cls, name, bases, attrs)
class Foo(metaclass=FooMeta):
async def my_command(self) -> None: ...
@pliant gulch :white_check_mark: Your eval job has completed with return code 0.
001 | __module__ __main__
002 | __qualname__ Foo
003 | my_command <function Foo.my_command at 0x7f0e04228ca0>
Here you can see how the metaclass would work
All you need to do now is make a decorator which wraps the method into a "marker" for your metaclass to check for
Then inject that data to your client which is simply as hell
thats pretty cool
It's a somewhat niche thing overal in python though
You'd rarely need something like this
How do i make it,
If a specific word is spotted in a users argument of a slash command
ty ^-^
👍
@slate swan do you know?
Because "is in" isnt an operator
just use an if statement?
so im following the discord.py walkthrough that's the first pinned, and when i use the test bot script that is shown in the link i'll attach, i get a
"line 6, in <module> intents.message_content = True
attributeError: 'Intents' object has no attribute 'message_content'" error
the import is fine but that is causing an error, any idea why?
https://discordpy.readthedocs.io/en/latest/quickstart.html#a*minimal*bot
if argument in ...:?
Yea i have if confession == libary:, but it only detects it if i only have one word in the argument which is that word in libary
are you using dpy 2.0?
use the in statement?
!d in
6.10.2. Membership test operations
The operators in and not in test for membership. x in s evaluates to True if x is a member of s, and False otherwise. x not in s returns the negation of x in s. All built-in sequences and set types support this as well as dictionary, for which in tests whether the dictionary has a given key. For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).
For the string and bytes types, x in y is True if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Empty strings are always considered to be a substring of any other string, so "" in "abc" will return True.
probably not, i used the install line
py -3 -m pip install -U discord.py
no, thats 1.7.3 you would need to install the master branch
pip install git+https://github.com/Rapptz/discord.py
is there a more updated tutorial than this one then? or can i follow that tutorial with the install link u just sent
just use the command given, you need git btw
ill have to install git, do i just install all of git or is there something specific i need
thanks a ton
TypeError: 'in <string>' requires string as left operand, not tuple Thats my issue
Idk how to fix
And if i do == instead of in im back at square one
!e
if (1, 2) in "lol":
print(3)
is what youre doing
@slate swan :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | TypeError: 'in <string>' requires string as left operand, not tuple
bro the error says it all
youre saying if tuple in a string
it must be if string in tuple
But i want it to detect if theres one of the multiple words in the string
!e
if 1 in (1, 2):
print(3)
is what im saying?
@slate swan :white_check_mark: Your eval job has completed with return code 0.
3
Yea..
But
With the "if 1"
I have a this.
`libary = ("word_1", "word_2")
async def confess(ctx, *,confession=None):
if libary in confession:`
Thats just some chunks of the code btw
bro
Minor optimisation but if it's constant and non repeating, making it a set would be way way faster
its an example bro
You are saying "if 1"
I dont want just ONE value
I have a list of values
8.1. The if statement
The if statement is used for conditional execution:
if_stmt ::= "if" assignment_expression ":" suite
("elif" assignment_expression ":" suite)*
["else" ":" suite]
``` It selects exactly one of the suites by evaluating the expressions one by one until one is found to be true (see section [Boolean operations](https://docs.python.org/3/reference/expressions.html#booleans) for the definition of true and false); then that suite is executed (and no other part of the [`if`](https://docs.python.org/3/reference/compound_stmts.html#if) statement is executed or evaluated). If all expressions are false, the suite of the [`else`](https://docs.python.org/3/reference/compound_stmts.html#else) clause, if present, is executed.
!d in
6.10.2. Membership test operations
The operators in and not in test for membership. x in s evaluates to True if x is a member of s, and False otherwise. x not in s returns the negation of x in s. All built-in sequences and set types support this as well as dictionary, for which in tests whether the dictionary has a given key. For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).
For the string and bytes types, x in y is True if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Empty strings are always considered to be a substring of any other string, so "" in "abc" will return True.
Yea, but in case you didn't know that
Let me timeit as well to show
thanks anyways👍
In [4]: a = tuple(range(1000))
In [5]: b = set(range(1000))
In [6]: def foo() -> None:
...: if 999 in a:
...: ...
...:
In [7]: def bar() -> None:
...: if 999 in b:
...: ...
...:
In [8]: %timeit foo()
3.8 µs ± 334 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
In [9]: %timeit bar()
65.5 ns ± 2.96 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
hmmm nice
youre not answering my question tho
bro
should i leave all of the settings default since i dont really know what im doing
`libary = ("word_one", "word_two", "word_three")
@slash.slash()
async def confess(ctx, *,confession=None):
if ctx.author.name in blacklist:
await ctx.reply("You are blacklisted from using commands due to inappropriate usage", hidden=True)
await ctx.author.send("You are blacklisted from using commands due to inappropriate usage")
return
if libary in confession:
await ctx.reply("Don't use this bot for inappropriate use. Next time you do this, it will be logged", hidden=True)
await ctx.author.send("You are at risk of being blacklisted from confession commands, warning one")`
IF ONE OF THE WORDS IN THE__LIBARY__ VARIABLE is in the argument CONFESSION, it replys that message and returns @slate swan
bro i already answered you.
bro u didnt
Still i need to make it for Client rn
If a user enters one of the words in the libary variable, it will do what i programmed
read my messages in the top because i will not repeat myself or my points. you already have been answered.
No.. dude you never answered me in a way that it can help
@cloud dawn 
Read my above explainations as well for more insight
how is it faster? is it related to native C?
set.__contains__ is O(1)
hash lookup 
i gaved examples docs and explanations how?
Yes and i read all of them fine, i go back to try and use it for my problem but i still cant find out how
I sent you my code and im asking you if theres something wrong with it?
how do i detect if a user has been banned
Idk if this would be the best solution, since i need to make it custom anyways. Any thoughts on iterating trough my ext folder then looks for any class that has Group subclassed using inspect and importlib
That's my idea thinking about it now.
That's basically what I said to do
Something like a custom iterator ```py
def walk_extensions() -> Iterator[str]:
...
And that's literally what discord.py does with load_extension
if you think my solutions are wrong or not suiting for you ask someone else like nullptr which he will probably give you the same answer or a more better/complicated way
Except inspect would overall make this uglier code
Metaclass is by far the easiest here
Oh okay :)
Wished that Client also had cogs... lol
I will look into it what would be most clean and understandable to do.
@pliant gulch Hey can you help me fix this?
My issue is, if I do /confess "hey there word_one" it wont detect, it onlt detects if i do /confess "word_one"
Thanks for taking the time.
All good, I'd def recommend the metaclass
As it gives you the name, and the bound method itself
So you'd just need to do, E.g self.add_command(callback)
Where self is your bot, of course switch this for slash commands*
btw andy why do meta classes need to be a subclass of type and not object?
https://github.com/Pandabweer/dpy-dispy This is my repo if you'd like you can see what I'm doing.
Object is is too low. Since type subclasses object. So makes more sense to import type.
Anyone?
It's a bit hard to explain through words but, imagine type -> object hierarchy kinda
mhm alr
so i'm still following the tutorial from earlier, i put the starter discord bot into my program, got git working with the right files to fix my earlier isses, and now i've got a large traceback list with the error:
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal.
however, I have the bot enabled as an administrator, with bot and applications.commands checked
Assuming confession is a string... ```py
if any(x for x in library if x in confession):
Oh alright,
Thanks man
Also, i appreciate you trying to help @slate swan sorry i wasnt much use in acting on it
Is there really a need for any?
not really lol
The issue was they had the tokens swapped around
hes just checking if a string is in a tuple
Btw in this case it's even easier since you can just pass the whole Group to the tree.
library in confession -> confession in library
^
@commands.command()
@commands.has_permissions(administrator=True)
async def unban(self, ctx, *, member):
banned_users = await ctx.guild.bans()
member_name, member_discriminator = member.split('#')
for ban_entry in banned_users:
user = ban_entry.user
if (user.name, user.discriminator) == (member_name, member_discriminator):
await ctx.guild.unban(user)
embed = discord.Embed(...)
embed1 = discord.Embed(...)
channel = self.client.get_channel(944591583796400138)
await ctx.send(embed=embed)
await channel.send(embed=embed1)```
How can I make the bot unban the user with their ID
Not sure how slash commands work with discord.py, never touched them so I wouldn't know
The key point you should take away is making a decorator that marks your method as a command
is this a code from a tutorial because ive seen it many times and its horrible
Otherwise you'd need to do some hacky stuff
yes 😅

self.tree.add_command(Core(), guild=discord.Object(id=config.debug.guild))
``` this is how to add a Group of commands this is hard coded rn for debugging but rn coding the recursive function to not do it manually.
just use an id to fetch the member
in the commmand
client.run('token')
the token of my bot must be in the quotes right?
uhm how
yes it must be a string.
gotcha
!d discord.ext.commands.Bot.fetch_user
await fetch_user(user_id, /)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Retrieves a [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") based on their ID. You do not have to share any guilds with the user to get this information, however many operations do require that you do.
Note
This method is an API call. If you have [`discord.Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") and member cache enabled, consider [`get_user()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.get_user "discord.ext.commands.Bot.get_user") instead.
Changed in version 2.0: `user_id` parameter is now positional-only.
!d discord.Guild.unban
await unban(user, *, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Unbans a user from the guild.
The user must meet the [`abc.Snowflake`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Snowflake "discord.abc.Snowflake") abc.
You must have the [`ban_members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to do this.
await guild_instance.unban((await bot.fetch_user(id)), reason = "no reason")
is one way of doing it
async def unban(self, ctx, *, member):
banned_users = await ctx.guild.bans()
member_name, member_discriminator = member.split('#')
for ban_entry in banned_users:
user = await ctx.fetch_user(ban_entry.user)
if (user.name, user.discriminator) == (member_name, member_discriminator):
await ctx.guild.unban(user)```
!e ```py
from future import annotations
from typing import Callable, Coroutine, Any
class FooMeta(type):
def __new__(cls: type["FooMeta"], name: str, bases: tuple[type[Any], ...], attrs: dict[Any, Any]) -> FooMeta:
callbacks: list[Coroutine] = []
for name, value in attrs.items():
if hasattr(value, "marked"):
callbacks.append(value)
attrs["__callbacks__"] = callbacks
return super().__new__(cls, name, bases, attrs)
@staticmethod
def marker(name: str) -> Callable[..., Coroutine]:
def inner(func: Coroutine) -> Coroutine:
setattr(func, "marked", True)
return func
return inner
class Foo(metaclass=FooMeta):
callbacks: list[Callable[..., Coroutine]]
@marker("Something")
async def my_command(self) -> None:
...
Why are you looping so much to unban one member
not quite you would need to fetch the user with the corouine given which then returns the object which then you would pass it in the kwarg of the unban coroutine thats bound to an instance of a Guild object
looping?
😔
😭
It’s the Lucas way
im confused
@slate swan if u have a sec, i got git installed, started a new program and installed discord.py with the command you gave me, tried to run the basic program in
https://discordpy.readthedocs.io/en/latest/quickstart.html#a*minimal*bot
but it still has that line 6 error:
"intents.message_content = True
AttributeError: 'Intents' object has no attribute 'message_content'"
@cloud dawn Mostly what I meant as in the marker
do print(discord.__version__)
Now you just need to attach them inside of your __init__ to the client
2.0.0a
that's the message i get when i run "py -3 main.py"
uninstall 1.7.3 so do pip uninstall discord.py
!d discord.Intents.message_content
Whether message content, attachments, embeds and components will be available in messages which do not meet the following criteria:
• The message was sent by the client
• The message was sent in direct messages
• The message mentions the client
This applies to the following events...
This is cool could really do something hacky with this. Really need to get more into metaclasses.
I use metaclasses more than I should
and attrs
Most of the stuff could be done without it, but I like how clean it is
But it's also kind of like black magic if you don't understand metaclasses
Double sided sword ig
Lol prob, Yeah what you are saying I don't want to code something really difficult and longer just for the looks of it.
alright i did that, now it stays that "import discord" doesnt exist
restart your editor
will do
because it should still import
Yep, but in this case it's pretty good, as it's procedural, other ways would require you to hardcode or etc, once you finish this metaclass all your other classes will work fine with it
It's not very hard either
I think I do got somewhere I could implement this right now I don't really have any commands since I want to have a stable base at first.
apparently i needed to reinstall the git files you sent lol
👍
pip install git+https://github.com/Rapptz/discord.py this
you mean the repo?
yeah im new to git and stuff so i wasnt sure what the terms are
I never hard code that's against my will. I will just call it "custom for my need", I'm not going to make it so dynamic just so someone can copy paste it into his own code as butter.
wack its still throwing the same error
Sometimes but I don't like it with Discord bots since I like unique :3
Imagine using the one metaclass and writing 50 cogs for it then doing it again without it with also 50 cogs
😔
here it says ctx has no attribute guild, what should i replace ctx with?
Lol on my previous bot I also used inspect and importlib to look for a setup func.
Show more code we got no clue where this is standing.
Sure, importlib makes sense, but why inspect?
import mymodule
if setup := getattr(mymodule, "setup"):
setup(bot)
if module.ispkg:
imported = importlib.import_module(module.name)
if not inspect.isfunction(getattr(imported, "setup", None)):
# If it lacks a setup function, it's not an extension.
continue
for module in pkgutil.walk_packages(exts.__path__, f"{exts.__name__}.", onerror=on_error)
Ah your checking if it's a functio with inspect

@pliant gulch Are you new in the server? Never seen you around here before, and I'm quite active :3
thats andy
👁️
😳
Looks like on_message
He changed his name? lol
ye
I was like where did this meta dude come from 😂
Well my actual username has never been "andy" exactly
That was just my sever nickname
i liked andy better
Discord advanced discussions textchannel when
Working it out in org channels
can i be there 🥺
Haha, Mina said she'd give an update in a few days.
can anyone help me
Most likely.
Adanced discord discussion lmao, what would that even entail
🙏
Not sure if I'm supposed to talk about it
I'm assuming how to make your own wrappers, etc
Gateway directly and hidden stuff like hidden ratelimits
I could only see a handful of people being there, I think we all know whom.
mostly about src etc idk
Maybe I'll bring back rin 😳 and do code vlog in advanced-discord
maybe a thread and not a channel
Custom cogs for people who dislike using the Bot class for slash commands.
would be better
Even better, custom wrapper for people who dislike discord.py
it will be cool to learn about your codebase
I'm starting to dislike discord.py more every day. Since a while ago you are forced to pass Intents even if it's just an empty class.
So this is my intents kwarg now intents=Intents()
Just read
What have you read so far
Better not, but still "a few days" is unspecific and I'm curious 
These things take time
But when a decision is made all the regulars including you guys will know about it
a bit of the ratelimiter a bit of the gateway folder a bit of the bots loop a bit of your modals and a bit of everything
please don't look at the modals
too bad
Matter of fact I should delete main branch and only keep the "rewrite" one
Yes :3
Mina will most likely post it in #community-meta I hope it will then reduce all the nasty stuff.
"Nasty stuff"?
hey robin i think it will be easier to make it a thread and not a TextChannel as it would be dumb to have 2 channels of the same topic!
The discussion we had about #discord-bots.
Yes thank you for the feedback :)
But it really should go in #community-meta not to me
Anytime now go get them tiger
vouch for us!
Honestly I don't know what to expect we had a pretty big discussion in #community-meta. But every solutions had it's ups and downs.
Will do, still best to put it in community meta however
Ah, I haven't checked that channel in a bit. I'm OOTL
i will!
You participated, I pinged you :)
is the pycharm terminal command to run a file
"py -3 'python file name'"
I have seen a lot less hate towards starters ever since the discussion started @sick birch
Also more mods have come by.
To run your current program?
I just need 1 more text box but the max is only 5 is there any work around ? like 2 pages ?
yes
is there a default configuration? i have to make a new one for each file everytime i make a program
also running a the program with the basic tutorial bot script that way causes a whole slew of errors compared to the single error im getting for using "py -3 main.py"
Wdym each file?
#community-meta message vouches would be helpful and advice!
so like when i start up pycharm, make a program, and then create a .py file i want to run, i have to click on the configurations setting and set the path to that file and such
async def cooldown_check(interaction):
try:
if player_cooldown[interaction.author.id][1] % 30 == 0:
player_cooldown[interaction.author.id] = [0, time_stamp]
elif player_cooldown[interaction.author.id][0] > 40:
return True
elif player_cooldown[interaction.author.id][0] == 40:
message = f"You're mashing the buttons too fast {interaction.author.name}!\nPlease wait 10 seconds for your cooldown to expire."
await interaction.send(message, delete_after=10)
prints(guild_id, message)
player_cooldown[interaction.author.id][0] += 1
except:
player_cooldown[interaction.author.id] = [0, time_stamp]
return False
How is this for a cooldown function, checks if there have been more than 40 interactions in less than 30 seconds for a user and if await cooldown_check(interaction): return when they try to interact
deletes their id on player_cooldown if their cache auto deletes
it is showing as if i didn't install utils. does anyone know how to help
does that for me, restart your IDE
thing is, i had utils installed since yesterday
and i just restarted it now and it is still doing it
you did pip install python-utils
right?
no, i did pip3 install utils (im on mac)
try python-utils
also, i think its not Util with a uppercase U
try from util import ..
it still doesn't work
try from util import util
How do I define bot in an event in cogs?
also, wait you probally have python3 and python2 installed try pip install utils
not pip3
i was using pip3
wouldn't it be self.bot.get_channel() from within a class
Okay remove the import util part, and import sys and print(sys.version) and send me a SS
Oh yeah
or just go on your terminal and simply type python -V
Okay thats why.
yes
You're using python2, but you're installing the packages to python3.
do pip install utils
you forgot to call listener
It's commands.cog.listener()
😐
So just add () to every one?
what?
When you decorate a function without (), it calls the decorator and gives the function object to it, which is why the error happens:
def my_decorator(func): # func is a function object
# do something
return something
When it's like that, you don't have to () the decorator
If it's like this, you do have to () the decorator:
def my_decorator(*args, **kwargs):
def wrapper(func):
# do something
return wrapper
it depends if the decorator takes other arguments that arent the function that is being decorated.
Yeah, you need to refer to the documentation for that
Usually though, if a decorator doesn't take any arguments, you can leave out the () as python calls the decorator for you
My minds gone blank, what would I put here?
https://caught-lackin-in-8k-by-cyberghost.cf/z9Ssd0Qv
@pliant gulch That could happen but if there are people that work with slash commands daily they most likely will be up to date.
@slate swan Way too late for that
😔 awe
Ima add it and see if that works
ctx.member is not a thing. Did you mean ctx.author?
yeh that lol
Also commit the db
Wait a second you started it in #community-meta 😂
I couldn't know that xD
Sure, but the point stil exists. Old messages can be searched for, etc
Name restriction is also documented with a REGEX so
It might not be the easiest to understand
Regarding anything that is.
I'm just thinking that there is really no need for an extra thread towards interactions & components
That would fall under the API aspect discussed earlier wouldn't it?
A specific topical thread for a still immature feature is kind of stretching it
Why did my bot go out on process exit 0
True but what would be under frontend?
Perhaps. If you're doing interactions & components w/o a wrapper
Library abstraction I'd assume
There is nothing to make it go out on Exit 0
Your everday regular users will be using these anyways, as the interfaces are easier to use
They don't need to DIRECTLY use the API
Thats seperating frontend vs the API
No, definetely not. JSON payloads for components are messy
That's basically what I meant when I said frontend & bot in #community-meta
I don't think many people have direct calls to the api that much.
Yup. But I believe those shouldn't be the only ones. One thread as a catch-all for API-related topics will suffice, but we should have more sub-sub-topics for front-end "bot" aspect of it
Also things that don't really fall into either category, we were going to do one on VPS hosting since that one comes up a lot
Agreed especially since a lot of people are beginners.
Either way, if you look at the current channel topic it references python libraries, so specifically this channel is meant to be topical for library abstraction
Definetely, yeah
can you put min_length on a modal?
yes
Min and max, yes

I think you can do it on both the short and long types
yes
gonna use modals to create a captcha system
You can do it on the paragraph types, that's for sure. Don't know about short ones though
!d discord.ui.TextInput.min_length
property min_length```
The minimum length of the text input.
yes but it shouldnt all be related to the api but a bit on python librarys and how the interact with they api so the thread wouldnt get disconnected from the fact that this is a python server.
Hm. I'd wait on that until modals are more flexible, like showing media on them
Sure
just gonna use a button to make the modal pop up
that's what this channel is for
Why is my bot turn off after I start it 😐
Maybe I'll write a tutorial on how to make a discord API wrapper or something kek
not what in talking about.
I've made like 3 now so I'd be expirenced enough too
Use either discord.py or nextcord not both.
That would be amazing
make a youtube series like Corey!
It still runs when I do not have that 😐
All of them unfinished because I hate making models though!
10 second cooldown where no buttons or anything will interact > button appears and captcha as image file > button opens modal to enter captcha
what are you talking about then?
Models are my bane
I meant uninstalling one.
check #community-meta
No
why attrs? or parsing payloads or?
How exactly are models done? Do you just loop through the incoming payload and use like __setattr__ to dynamically set the attributes for all fields in the payload?
I did that. same thing
that would probably be a pain as your type checker would go crazy saying its unknown
Have you tried restarting your IDE
No, I will in an hour
Let my PC cool down
So, what, you go and do it manually? That doesn't sound all that ideal
That is correct, but there would still be a bit of better handling for each attr and it would be easier for beginners to tell that its an actual attr.
Awesome
"actual attr"?
Well you need to since the information can be really inconsistent with discord
Setting default values as well and returning partial.
Well, sure you could but I don't, because of types mostly
That's unfortunate
Just imgine classes as a wrapper class for a JSON object
That's why I hate doing them so much
What should I do if it does not work.
Reinstall nextcord
Yea I will thank you
Ah, that helps
I think that's basically what JS classes are
What about 1 for python?
Also maybe why they're called "objects"
Since they're excellent for data abstraction
You can represent almost anything using them, and they can also include functions
const animal = {
name: "name",
type: "dog",
age: 2,
bark: () => {
console.log("Woof!");
},
}
I wonder if you can do
x = {
"someFunction": def y: print("Hello, world")
}
not possible
lambda?
That's unfortunate. I bet you could pass it in as a first-class function though
!e
def sayHello():
print("Hello, world!")
x = {
"hello": sayHello
}
x["hello"]()
@sick birch :white_check_mark: Your eval job has completed with return code 0.
Hello, world!
or just a simple lambda
Yeah, but say it was a long function
whats the difference between that and this? ```js
const human = {
"name": "devon"
}
The key can include invalid characters like - or spaces
But if they do, you have to access them like you would in python:
console.log(human['name']);
as opposed to
console.log(human.name);
I mean, python classes are also pretty much decked out dictionaries
Yeah that's to be expected when you have a very expressive data structure like dicts
Like here, in the metaclass basically showing what I mean
So i try to grab some informations from a websites API and i have two different sites.. one is with a public profile and the other one has a closed profile with less informations.. i can easily open them in my browser, both of them and see all the datas i need.. i can even get all datas from the public profile.
I just checked and it just gives me a 404 error on the closed profile, not so with the public one..
So.. im a bloody beginner. im using the requests.get function.
Why is it possible to view both sites in my browser without any problems, but inside my code it wont work?
What do you mean by "get all datas from the public profile"?
Right. First, I'm assuming you're working in an asynchronous environment, as you're asking in #discord-bots. If so, requests.get is blocking and you should use aiohttp. The real problem is with authentication. When you use your browser, the site uses your cookies to figure out if you can access a certain protected page or not. With regular requests, however, you can't do that since there's no way for the site to tell if you're supposed to be getting that information. Usually, the website's API will give you some sort of token or key and documentation on how to use it as authorization so you can access that closed profile
Take the discord API for example. To view certain information, like a user's guilds, you need to pass in this header:
{
"Authorization": "Bearer <TOKEN>"
}
When you use your browser to visit that website, it automatically fills in that header for you. When you send a request, however, you have to manually include that in the headers:
requests.get("https://discord.com/api/v8/protected-endpoint", headers = {
"Authorization": "Bearer " + token
})
You would specifically get that token by making a user accept a Oauth2 request
Provided with the specific scopes, E,g guild.join or whatever it was
Right. Discord saves that as a cookie most likely, however, so you don't have to log in every single time you want to visit discord
With requests there's no way to save that information (server side of course) so you have to pass it in every request
url = "https://www.habbo.de/api/public/users?name={habbo}" # the url from the website
hdr = {'User-Agent': 'Mozilla/5.0'}
get_infos = requests.get(url, headers=hdr)
with get_infos:
print(get_infos.status_code) # gives a 404 when its a closed profile
online = get_infos.json()['online']
habboname = get_infos.json()['name']
motto = get_infos.json()['motto']
profileVisible = get_infos.json()['profileVisible']
lidsince = get_infos.json()['memberSince']
lastLogin = get_infos.json()['lastAccessTime']
id = get_infos.json()['uniqueId']
Hope i did it right so far - thats my solution currently. I will look into your answers now. 😄
So basically compare both of this sites as example
https://www.habbo.de/api/public/users?name=marius-k (public profile)
https://www.habbo.de/api/public/users?name=electro-freak93 (closed profile)
I can easily access both sites with Google Chrome - i checked the status code with print(get_infos.status_code) and it gives me a 404 in the second link, and a 200 in the first one.
Does that site have API documentation?
Not sure, didnt found one yet.
Ah that's a problem
First make sure if they have an API or not, if not, make sure if they allow scraping. If they do (or don't mention NOT scraping) look into a library like BS4 to parse the information
if hasApi:
use_api()
else:
if allowsScraping:
scrape()
else:
sad()
I just found out that they store these datas with this link and saw they had all the datas i would like to use. Seems like there isnt an official documentation.
Hey, I want to implent 'game' status in my discord bot. What should I add? I have this right no
If there's isn't an official documentation, most likely means they don't want users automating access to their sites so you should proceed with caution and respect any ratelimits or other restrictions
@client.event
async def on_ready():
print("[Connected]")
activity = discord.Game(name="protecting gako's server", type=3)
await client.change_presence(status=discord.Status.online, activity=activity)
@client.event
async def on_ready():
print(f'{client.user} has connected to Discord!')
verificationChannel = client.get_channel(verificationChannelID)
messages = await verificationChannel.history(limit=200).flatten()
for message in messages:
print(message.author)
if str(message.author) == botName:
await message.delete()```
is this good?
Its just a few times a day for like 30 users, that sometimes want to see these profile data on our server. Its not for spamming purposes. But thanks. 😄
maybe a lambda ```py
x = {
"someFunction": lambda x: print(x)
}
or with args
why two on_ready
just make one with code of both
@client.event()
async def on_modal_submit(interaction):```
`TypeError: event() missing 1 required positional argument: 'coro'`

you don't call an event
not sure what you mean, following code works fine for dropdowns and buttons
@client.event
async def on_dropdown(interaction):```
yes you would use a lambda and then you index it and then you call it
Compare the 2 code
What is different?
@boreal ravine I got it to work after I reinstalled nextcord, but then when I needed to rerun it it just stopped at exit code 0
What should I go over in my discord API wrapper tutorial? Specifics please, such as what exactly intents are for
Did you run the bot?
Bytecode
Well I just coded a log system for role message edited, deleted, and then this file popped up 👀
It makes ur python code faster
Well the bot will not turn on.
Well that's not the reason why it isn't turning on. You got any error msgs?
Do you have bot.run() in logs.py?
Uhh
You gotta run ur main bot file m8 not the cog
- websockets(including hbs)
- parsing payloads
- handling ratelimits with buckets(i wanna see that)
- entities
- having a good code base
- exts
Much interested in #3
same
parsing payloads is kinda normal python
I could make a wrapper? :OOOO
no entities
yeah ik
I don't even like writing models in my own wrappers
what makes you think I would make a tutorial on them
that's library abstraction that I will be avoiding
smh
buckets will be explained, so will ratelimits
theyre quite easy to make you just need to know about oop and the api with its docs
codebase eh, I will be using poetry
Good
What does exts even mean here?
like cogs in a sense
No
but better!
It's not a video it's a markdown file
A gist would be better for me, and I've gotten some of it written already
Yes I know there is a typo
pretty cool
models 🙃
no
😢
Do I make a tutorial repo for this
Yea that would be great
so people can commit to it
and so they can make suggestions!
Annddd another repo in my github related to discord API
lol same here
atleast finish it
That's asking for a lot
You started the idea/project so finish it
I wouldn't be andy if I don't procrastinate
then dont be andy and be Andy
guys
captchas are so pointless
there's literally an extention for chrome that solves the hardest ones 
How do I loop over all servers my bot is in?
Like for server in bot.servers: or something
disnake.errors.InteractionResponded: This interaction has already been responded to before why am i getting this when i'm returning
async def on_button_click(interaction):
data = await interaction_common(interaction)
if not data:
return```
it's like it keeps retrying
Oops nvm I was close: for guilds in bot.guilds:
Hello, good, I'm trying to recreate the say command so that if you reply to someone's message, the bot replicates what you replicate to the other user and thus ensure that the one that really replicates is the bot to another user
Anyone know where is the issue or can help me a little bit?
@bot.command()
async def say(ctx, *, message=None): # COMANDO SAY
if message is None:
await ctx.reply(":deny: Stuff")
else:
if ctx.message.reference:
original = await ctx.fetch_message(id=ctx.message.reference.message_id)
await ctx.message.delete()
await ctx.reply(original)
else:
message = message
await ctx.message.delete()
await ctx.send(message)
can you show the error?
In the terminal don't send any error, just dont work correctly
is that the only command that doesn't work?
yes, for example i want to replace the ksay Hi for the bot reply my message saying the text i put after k!say , you understand?
Okay i have it
@bot.command()
async def say(ctx, *, message=None): # COMANDO SAY
if message is None:
await ctx.reply(":deny: Inserte la frase que desee que el bot diga")
else:
if ctx.message.reference:
original = await ctx.fetch_message(id=ctx.message.reference.message_id)
message = message
await ctx.message.delete()
await original.reply(message)
else:
message = message
await ctx.message.delete()
await ctx.send(message)
change ctx.reply(original) for replying the original message and sending the message
Hi, so I want to make something like donate bot for my bot, where a member can buy subscription or something
the payment will be done via paypal but i am struggling to find where should i start or what should i do, any tips or guides will be appreciated, Thanks in advance
Are you asking about the paypal api or the discord api
these are two fundamentally different systems
well, i am not sure of that either
simply put it's like the donate bot, you pay then you get a role
Like premium bot stuff?
yeah
sry idk
you need to interact with basically 2 services
- discord
- paypal
start with discord, then try to add paypal
it's fine
so make a simple discord bot that can reply to commands and such
then ask about paypal
okay so your bot is finished and everything?
pretty much yea
do you have a paypal developer account?
nope
Ig making a website and then login with ur discord and they pay on ur website then it gets permium account like dyno mee6 and all
ooh
well you still need to connect both apis
Hm
async def on_member_update(before, after):
if before.status != after.status:
return
if str(before.status) == "online":
if str(after.status == "offline"):
return
if str(before.status) == "offline":
if str(after.status == "online"):
return
if before.activity != after.activity:
req_act = "vanity url here"
my_server = bot.get_guild(channel id)
role_id = role id here
role = my_server.get_role(role_id)
if act := [activ.name for activ in after.activities if activ.type == ActivityType.custom and req_act in activ.name]:
channel = bot.get_channel(channel id here)
emb = discord.Embed(color=0xffffff)
emb.description = f"""
thanks for the vanity wowow
"""
emb.set_footer(text="vanity")
if role in after.roles:
return
else:
await channel.send(f"<@{after.id}>", embed=emb)
await after.add_roles(role)
else:
await after.remove_roles(role) ```
pretty sure i got this wrong as i dont have the bot token in a config
but i wanna set it to where the vanity status role giver will work in multiple servers and not just one server so basically i want my bot to give users the designated role when they put a servers vanity in their status
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
async def on_member_update(before, after):
if before.status != after.status:
return
if str(before.status) == "online":
if str(after.status == "offline"):
return
if str(before.status) == "offline":
if str(after.status == "online"):
return
if before.activity != after.activity:
req_act = "vanity url here"
my_server = bot.get_guild(channel id)
role_id = role id here
role = my_server.get_role(role_id)
if act := [activ.name for activ in after.activities if activ.type == ActivityType.custom and req_act in activ.name]:
channel = bot.get_channel(channel id here)
emb = discord.Embed(color=0xffffff)
emb.description = f"""
thanks for the vanity wowow
"""
emb.set_footer(text="vanity")
if role in after.roles:
return
else:
await channel.send(f"<@{after.id}>", embed=emb)
await after.add_roles(role)
else:
await after.remove_roles(role)
^^
btw you can use isinstance
!d isinstance
isinstance(object, classinfo)```
Return `True` if the *object* argument is an instance of the *classinfo* argument, or of a (direct, indirect, or [virtual](https://docs.python.org/3/glossary.html#term-abstract-base-class)) subclass thereof. If *object* is not an object of the given type, the function always returns `False`. If *classinfo* is a tuple of type objects (or recursively, other such tuples) or a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union) of multiple types, return `True` if *object* is an instance of any of the types. If *classinfo* is not a type or tuple of types and such tuples, a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") exception is raised.
Changed in version 3.10: *classinfo* can be a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union).
ok
iirc object would be your member status object
classinfo would be the object you're comparing it to
!e
my_var = "aaaa"
if isinstance(my_var, str):
print(f"{my_var=}")
@final iron :white_check_mark: Your eval job has completed with return code 0.
my_var='aaaa'
!e
if isinstance((a:=1), int):
print(a)
That's annoying
@slate swan :white_check_mark: Your eval job has completed with return code 0.
1

You can only do your_var= in f-strings
i wonder why discord doesnt highlight isinstance

its not highlighted on my mobile client
Discord's weird
discord highlights syntax differently depending on your client
Yes
You don't need to make a website
your discord bot can just directly send the paypal link
Nuke bot 
😡
- someone uses a
!donatecommand - your bot reaches out to the paypal api and generates a donation link for them
- your bot DMs them the link
- they click the link and give the money
- PayPal reaches out to your api (a webhook)
- you save their premium status in a database
- your bot gives them the special role
Discord doesn't highlight anything on my iphone
Oh yeah true, thanks again
Same
.
It just looks like a basic block
How many??
no
😔
so thats why you havent added me yet😔
Cause i was at limit
O my 15k
probably
it's hard to tell when i get a friend req
😔
feel privileged
just check your pings😔
I do
aye 31
yay! (probably not gonna accept but still)
love bluenix hes such a cool guy💜
agreed
lmao
yes
anyway i'll brb have to log out and in just changed my default shell :D
True menace
yo nothing for checking if a member exists is working
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
How to create slash command group (nextcord)?
you don't
@bot.slash_command()
async def slash(interaction):
...
``` `slash` is already a sort of a group already so you can just do the below to make a subcommandd```py
@slash.subcommand()
async def subcommand(interaction)
oh okay thanks
👍
hi how do i add this
await bot.add_roles(member, role)```
to this
``` @commands.Cog.listener()
async def on_member_join(self, member):
with open('guilds.json', 'r', encoding='utf-8') as f:
guilds_dict = json.load(f)
channel_id = guilds_dict[str(member.guild.id)]
embed=discord.Embed(title="Welcome!",description=f"{member.mention} a intrat pe server!", color=discord.Colour.random())
embed=embed.set_thumbnail(url="https://media.discordapp.net/attachments/612746705406001213/612990390907305990/avatar.png")
await self.bot.get_channel(int(channel_id)).send(embed=embed)
@commands.Cog.listener()
async def on_member_remove(self, member):
with open('guilds.json', 'r', encoding='utf-8') as f:
guilds_dict = json.load(f)
channel_id = guilds_dict[str(member.guild.id)]
embed=discord.Embed(title="Bye!",description=f"{member.mention} a parasit serverul!", color=discord.Colour.random())
embed=embed.set_thumbnail(url="https://media.discordapp.net/attachments/612746705406001213/612990390907305990/avatar.png")
await self.bot.get_channel(int(channel_id)).send(embed=embed)```
I want a command .setwelcomerole @ornate flax
if you got anything please ping me
how I check if member exist in a discord server
bc what I was given before
isn't working
A member or user?
Uhhh what would be the difference
anyone able to help with discord js?
https://discord.gg/djs ask here
tysm
A member is a user in a guild a user is someone outside of a guild
Just a simplified version of it
Yeah so I need member
A member is associated with a guild, while a user is not
So someone can be both a member and a user
Yeah I need member
You probably want to check if a user is in a server
Because if you're checking if a member exists in a server you already know that they do
Yeah that would work
For what I need
If you have their ID you can use get_member() with their ID
should be faster than looping because hash maps are O(1)
How do I implement slash commands in discord.py?
Discord doesn't provide an API for that
so it isn't possible without breaking their tos

bruh
travling with speed of light
I wasn't talking to you, other guy deleted their message
haha I saw, dw 😅
Sparky likes deleting messages
it would be pretty dope if you could stream video as a bot, you could actually make an animated game
choose your own adventure story would be cool too
nope - people would just stream youtube videos and movies illegally
sucks
..
i imagine its mostly due to the fact that it would take up so much bandwidth for discord though
their api is literally limited to 50 per second for bots
wait lol
they really wouldn't be able to handle a bot on every server streaming video
per guild, to prevent spam
He was talking to you and you deleted the messages
ye ik
Genius
doesn't have anything to deal with bandwidth
you really think discord servers could handle that
the apis global limit is 50 request per second that is correct.
Hello okimi
discord does not have youtubes infastructure
yes they do
its easy to expand, too
discord is already one of the most visited sites in the world
expensive*
they have plenty of infrastructure
no, its extremely cheap
employees are expensive
web infrastructure isnt
i seriously doubt you're correct, i wish i could get some stats on it
seems like you haven't read docs?
because that is wrong. https://discord.com/developers/docs/topics/rate-limits#global-rate-limit
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
It's because users aren't meant to be botted. Bots are meant to be botted, so the resources required would be much much higher for bots to stream
i've personally experienced that that's a very malleable number
exactly look right now on any server you're on and most of them will have no streaming video currently
that might be per shard
so youre saying the creators of the api are wrong?
if you had streaming bots you'd have an average of 1 on every server
seems like a good point of your argument
some would have 3 with various things going
I don't think you understand how many servers there are
and thinking discord is set up to handle that is dumb, they mainly handle text and voice which is barely any work in comparison
I also don't think you understand what it means to be a top 100 visited website
..
just because you're at the top doesn't mean you're set up for that
they would have to massively expand
??
expensive af
like I said, its extremely cheap relative to their employment cost
pardon?
Cheap does not equal no cost
No cost is better than cheap
Therefore no cost path should be followed
what is this convo even about im so confused on the point here
Bots being able to stream videos
oh
they're saying it would be nothing for discord to have millions more streams of video constantly going
isnt that too much bandwith? especially for bots running multiple videos at a time?
it's not just bandwidth
i mean it would cuz the user bandwith but its discords job to show the other users the same video at low latency
discords video sucks to be honest
time to dissolve the company then??
I don't think i've come across a good platform with good video as of yet
what kind of point is that
Your talking about the same company that nitro gates image compressing
yep
and animated images
Not really. Companies will always go for the cheapest option, or not spend at all if it can be avoided. In this case it can be, and has been avoided for 7 years since discord came out
Do you know how much money they would save by not GATING image compression?
It's not going to hurt them to continue avoiding it
they lock stream quality to 720 for no nitro users same with files guilds etc
they just doing all that for fun though 
its discord after all!
What is even going on
Well they're making money which is more than I've ever done so I have to respect that
someone said it would be ez for discord to let bots stream video @final iron
nitro or no
Oh that's dumb
millions of servers constantly streaming video from bots 
That would be so resource intensive
discord can but they wont🗿
They can but it takes up a lot of resources
hence the reason why they wont
Yeah because they don't want to pay for more servers
Right so we shouldn't make it seem like they're baddies for not doing it
the only way that happens is if they decide to start putting ads before entering every server
baddies? down bad robin
or on every video stream

Imagine the out rage
olie you gave discord an idea bro
Or after every 20 messages
you know what I mean
imagine having to watch a 2 min pre roll ad before you video chat with a friend
Read a discord data mine like a while ago and it seemed like they were gonna add some premium subscription guild role or something
We love money
Money!
Course we do
Imagine targeted ads in text chat… shudder
“Wait 5 seconds and watch this short ad to continue sending messages”
What, feeding text messages into some neural network to pump out targed ads based on our messages?
imagine needing to watch an ad to send a file😭

