#discord-bots

1 messages · Page 879 of 1

cloud dawn
#

!tags

thick sigil
#

Why are you using that much wait_for

cloud dawn
#

This

cosmic agate
#

i was making a help command but i need it to forever loop

thick sigil
#

Plus you can call back the function depending on the button you press

cloud dawn
cosmic agate
pliant gulch
#

This is actually a pretty dangerous SQL statement, or at least an entry point. I would do a case statement but that's just me

cloud dawn
cosmic agate
#

wdym?

cloud dawn
# cosmic agate i just want a loop for my help command
@bot.command(aliases=["HELP","Help"])
async def help(ctx):
  while True:
      await ctx.send("De Help Command.",embed = hembed, components=[Button(label="Page 2", custom_id="button1", style = ButtonStyle.blue)])
      interaction = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button1")
      await interaction.respond(type=7,content="De Help Command.",embed=hembed2, components=[Button(label="Page 3",
      custom_id="button2", style = ButtonStyle.blue)])
      interaction2 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button2")
      await interaction2.respond(type=7,content="De Help Command.",embed=hembed3, components=[Button(label="Page 4",
      custom_id="button3", style = ButtonStyle.blue)])
      interaction3 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button3")
      await interaction3.respond(type=7, content="De Help Command.", embed=hembed4, components=[])
#

Define your context of "loop"

cosmic agate
#

I want to make a button that will loop to the first line of code

jade tartan
#

omg this is so annoying

small igloo
#

yes it set the custom column but why when try to add item it set to "1" instead add item :V

jade tartan
#

can someone help

maiden fable
cloud dawn
cloud dawn
jade tartan
#
async def start(ctx):
    embed=discord.Embed(title="Profile", description="", color=0x00ff00)
    embed.add_field(name= f"User: {ctx.author.mention}", value="✅Verified 18+✅", inline=False)
    embed.add_field(name='Name', value=str(ctx.author.name), inline=True)
    embed.set_author(name=str(ctx.author.name), icon=embed.Empty, icon_url=ctx.author.avatar_url)
    await ctx.send("What Is Your Name?")
    msg = await client.wait_for('message')
    await ctx.send("What Is Your Name?")
    msg = await client.wait_for('message')
    await ctx.send(embed=embed)
    print(f"The embed has been send")
    ``` When a user runs this cmd and it sends the embed i want it to add his profile icon picture and the authors name
cloud dawn
cosmic agate
cloud dawn
small igloo
# lament mesa can you elaborate?

so, when i try to add apple to my inventory, it set the amount to 1 instead of adding 1 apple, btw code:

def add_item(name, amount, item):
    item = item.upper().replace(" ", "_") if " " in item else item.upper()
    cur.execute(f"UPDATE item_list set {item} = ? + ? WHERE NAME = ?", (item, amount, name))
    conn.commit()```
cosmic agate
lament mesa
jade tartan
#

Hello

cloud dawn
small igloo
lament mesa
small igloo
cosmic agate
cloud dawn
cosmic agate
#

??

lament mesa
final iron
small igloo
cosmic agate
#

wdym?

cloud dawn
final iron
cosmic agate
cosmic agate
lament mesa
small igloo
cloud dawn
small igloo
cosmic agate
#

@cloud dawn @final iron this is a button

lament mesa
# small igloo 1

the old value was 0 and now it is updated to 1,
what did you expect to happen?

cloud dawn
#

When did those got added??

cosmic agate
#

ages ago

small igloo
final iron
cosmic agate
small igloo
cosmic agate
final iron
cosmic agate
final iron
#

No

lament mesa
final iron
#

You're wrong

#

Try it out yourself

cosmic agate
#

no

#

youre wrong

final iron
#

I don't think you know what a button is

cosmic agate
#

@cloud dawn was the link you sent about reactions?

final iron
#

No it wasn't

small igloo
cloud dawn
small igloo
cloud dawn
cosmic agate
jolly basalt
#

Even thought I have intents enabled in my code(discord.Intents.all) and in the dev portal, this doesnt work for some wierd reason. There are two online ppl with this role

small igloo
cosmic agate
cloud dawn
cloud dawn
final iron
small igloo
cosmic agate
final iron
#

Just change the name if you don't like it...?

cosmic agate
cloud dawn
small igloo
cosmic agate
small igloo
#

btw ty @lament mesa , thats work

final iron
cosmic agate
#

Help

@bot.command(aliases=["HELP","Help"])
async def help(ctx):
  await ctx.send("De Help Command.",embed = hembed, components=[Button(label="Page 2", custom_id="button1", style = ButtonStyle.blue)])
  interaction = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button1")
  await interaction.respond(type=7,content="De Help Command.",embed=hembed2, components=[Button(label="Page 3",
  custom_id="button2", style = ButtonStyle.blue)])
  interaction2 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button2")
  await interaction2.respond(type=7,content="De Help Command.",embed=hembed3, components=[Button(label="Page 4",
  custom_id="button3", style = ButtonStyle.blue)])
  interaction3 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button3")
  await interaction3.respond(type=7, content="De Help Command.", embed=hembed4, components=[])```
I want to make a loop
like
```py
await ctx.send("De Help Command.",embed = hembed, components=[Button(label="Page 2", custom_id="button1", style = ButtonStyle.blue)])
  interaction = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button1")```
this is the first line  of code
```py
interaction3 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button3")
   await interaction3.respond(type=7, content="De Help Command.", embed=hembed4, components=[])```
this is the last line of code
so I want to make a button that will loop back to the first line of code
but discord.ext.tasks.loop doesnt work
jolly basalt
lament mesa
cloud dawn
cosmic agate
#

??

cloud dawn
#

I sended purrfect example :3

final iron
#

^

cosmic agate
#

??????????????

final iron
#

I easily made a paginator with the example

cloud dawn
cosmic agate
#

button

cloud dawn
#

!pypi button

unkempt canyonBOT
cloud dawn
#

uhm you got a more specific name?

cosmic agate
#

its discord_buttons_plugin ig?

cloud dawn
#

!pypi discord_buttons_plugin

unkempt canyonBOT
final iron
#

Why even use a 3rd party module for making buttons

#

Dpy has them

cosmic agate
cloud dawn
cosmic agate
#

???????????????????????????

jade tartan
#

embed.set_author(name="{member.mention}", icon_url= "ctx.author.avatar") Can someone tell me if this is right?

final iron
cloud dawn
opaque tiger
#

how can we get a subcommand in disnake? for example, we can get a command by doing bot.get_command

cosmic agate
#

check it properly

#

or test it

sage otter
cloud dawn
unkempt canyonBOT
#

@disnake.ext.commands.group(name=..., cls=..., **attrs)```
A decorator that transforms a function into a [`Group`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Group "disnake.ext.commands.Group").

This is similar to the [`command()`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.command "disnake.ext.commands.command") decorator but the `cls` parameter is set to [`Group`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Group "disnake.ext.commands.Group") by default.

Changed in version 1.1: The `cls` parameter can now be passed.
cosmic agate
#

?????????????????????????????

fading harness
cloud dawn
fading harness
#

we dont want the snippet

cosmic agate
jade tartan
#

And you need to either typecast ctx.author.avatar to a string Wdym by that?

fading harness
final iron
#

!pypi button

unkempt canyonBOT
opaque tiger
cloud dawn
#

I'm 80% certain it's discord.py but no way i'm risking this lol

sage otter
small igloo
#

@lament mesa can i do

def check_item(user, item):
    user = str(user)
    cur.execute(f"SELECT {item} from item_list where NAME = ?", (user,))``` instead of doing https://paste.pythondiscord.com/ihariluweq
cosmic agate
jade tartan
cosmic agate
#

ig

fading harness
#

dpy 2.0 support button but not that way

final iron
#

!pypi Button

unkempt canyonBOT
cosmic agate
#

hmmm

final iron
#

Again, not the module

cosmic agate
#

idk button

sage otter
fading harness
#

can you show us your import

cosmic agate
#

version

final iron
#

Just see what you're importing

small igloo
cloud dawn
unkempt canyonBOT
#

get_command(name)```
Get a [`Command`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Command "disnake.ext.commands.Command") from the internal list of commands.

This could also be used as a way to get aliases.

The name could be fully qualified (e.g. `'foo bar'`) will get the subcommand `bar` of the group command `foo`. If a subcommand is not found then `None` is returned just as usual.
cosmic agate
final iron
cosmic agate
#

its *

fading harness
small igloo
#

🗿 ok

fading harness
#

show the full import line pls???

lament mesa
cosmic agate
cosmic agate
#

from discord_buttons_plugin import *

jade tartan
#
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\ext\commands\core.py", line 168, in wrapped
    ret = await coro(*args, **kwargs)
  File "d:\discord server bot\Bot2.py", line 303, in start
    await ctx.send(embed=embed)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord_components\dpy_overrides.py", line 350, in send_override
    return await send(channel, *args, **kwargs)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord_components\dpy_overrides.py", line 325, in send
    data = await state.http.send_message(
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\http.py", line 337, in request
    raise HTTPException(response, data)
nextcord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.author.icon_url: Scheme "ctx.author.avatar.url" is not supported. Scheme must be one of ('http', 'https').

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\ext\commands\bot.py", line 1055, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\ext\commands\core.py", line 933, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\ext\commands\core.py", line 177, in wrapped
    raise CommandInvokeError(exc) from exc
nextcord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.author.icon_url: Scheme "ctx.author.avatar.url" is not supported. Scheme must be one of ('http', 'https').
fading harness
#

@cosmic agate show the full import line pls??????

cloud dawn
opaque tiger
fading harness
cosmic agate
#
from re import search
from discord_buttons_plugin import  *
import discord
from discord.ext import commands
import os
from telegram import Bot, Voice, bot_api_version
import wavelink
import random
import asyncio
fading harness
#

!pypi discord_buttons_plugin

unkempt canyonBOT
cloud dawn
cosmic agate
#

XD

final iron
#

What's the point of using a 3rd party module to create button?

#

Dpy has support for them

cloud dawn
cosmic agate
sage otter
#

Oh I see

cosmic agate
#

sed

sage otter
#

@jade tartan remove the quotes
icon_url=ctx.author.avatar.url

cloud dawn
#
  • means all methods, vars, classes etc.
fading harness
cosmic agate
#

all import my friend

cloud dawn
cosmic agate
#

XDDD

fading harness
#

so what does from x import * do?

jade tartan
#

Why is it always when i nextcord uninstalled it shows this File "d:\discord server bot\Bot2.py", line 6, in <module> from discord.ext import commands ImportError: cannot import name 'commands' from 'discord.ext' (unknown location)

cosmic agate
fading harness
sage otter
#

It’s a wild card import. It imports everything from whatever x is

cosmic agate
cloud dawn
sage otter
#

Including variables, classes, functions, and other datatypes etc

fading harness
cloud dawn
fading harness
#

else it will import everything in the __all__ var

cosmic agate
#

no discord.py, its out of support but im having a hard time changing softwares

sage otter
#

Yeah __all__ specifies what will be imported when you wildcard import the file

cloud dawn
#

That said * is to be avoided as much as possible, only place were i want to see a * for import is inside an __init__ file

sage otter
#

^

fading harness
#

^

cosmic agate
#

???????????????????????????????????????????

#

goodness

#

me

cloud dawn
#

POV he is prob dutch.

cosmic agate
#

idk , *?

small igloo
#

awww, so cutee

cosmic agate
jade tartan
#

How do i work discord.py without nextcord module installed? cuz its showing this Traceback (most recent call last): File "d:\discord server bot\Bot2.py", line 6, in <module> from discord.ext import commands ImportError: cannot import name 'commands' from 'discord.ext' (unknown location)

cosmic agate
#

sus

#

Help

@bot.command(aliases=["HELP","Help"])
async def help(ctx):
  await ctx.send("De Help Command.",embed = hembed, components=[Button(label="Page 2", custom_id="button1", style = ButtonStyle.blue)])
  interaction = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button1")
  await interaction.respond(type=7,content="De Help Command.",embed=hembed2, components=[Button(label="Page 3",
  custom_id="button2", style = ButtonStyle.blue)])
  interaction2 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button2")
  await interaction2.respond(type=7,content="De Help Command.",embed=hembed3, components=[Button(label="Page 4",
  custom_id="button3", style = ButtonStyle.blue)])
  interaction3 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button3")
  await interaction3.respond(type=7, content="De Help Command.", embed=hembed4, components=[])```
I want to make a loop
like
```py
await ctx.send("De Help Command.",embed = hembed, components=[Button(label="Page 2", custom_id="button1", style = ButtonStyle.blue)])
  interaction = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button1")```
this is the first line  of code
```py
interaction3 = await bot.wait_for("button_click", check=lambda inter: inter.custom_id == "button3")
   await interaction3.respond(type=7, content="De Help Command.", embed=hembed4, components=[])```
this is the last line of code
so I want to make a button that will loop back to the first line of code
but discord.ext.tasks.loop doesnt work
fading harness
#

pip install --force-reinstall discord

small igloo
cosmic agate
#

i just want a button that loops back to the first line of code

cloud dawn
fading harness
cosmic agate
small igloo
cosmic agate
cosmic agate
small igloo
jade tartan
cosmic agate
small igloo
fading harness
cosmic agate
small igloo
cloud dawn
jade tartan
small igloo
fading harness
cloud dawn
jade tartan
cosmic agate
#

I SHOWED

cloud dawn
cosmic agate
#
from re import search
from discord_buttons_plugin import  *
import discord
from discord.ext import commands
import os
from telegram import Bot, Voice, bot_api_version
import wavelink
import random
import asyncio
jade tartan
#
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "d:\discord server bot\cogs\levels.py", line 33, in on_message
    with open("levels.json", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'levels.json'
Ignoring exception in command start:
Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "d:\discord server bot\Bot2.py", line 298, in start
    embed.set_author(name=f"{ctx.author.mention}", icon_url=ctx.author.avatar.url)
AttributeError: 'str' object has no attribute 'url'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'url'```
cloud dawn
jade tartan
cosmic agate
#

ikr XD

jade tartan
#

what

fading harness
sage otter
#

When he reinstalled he probably got the latest version that was on pypi

cosmic agate
# cloud dawn lmao telegram
import discord
import os
from discord.ext import commands
from discord.ext.commands import Bot
from discord.ext.commands import Bot, guild_only
import random
import giphy_client
from giphy_client.rest import ApiException
import asyncio
import discord_slash
from discord_slash import SlashCommand, SlashContext
from discord_buttons_plugin import  *
from discord_components import *
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from io import BytesIO
import datetime
import praw
import reddit
import pandas
from discord.utils import find
``` my friend's imports
jade tartan
#

yes when i forced reinstalled dpy

fading harness
jade tartan
#

because it was bugging with nextcord

cloud dawn
sage otter
small igloo
#
def check_item(user, item):
    user = str(user)
    if item != "brewing stand" or item != "sword" or item != "armor":
        item = item.upper().replace(" ", "_") if " " in item else item.upper()
        cur.execute(f"SELECT {item} from item_list where NAME = ?", (user,))
        it = cur.fetchone()
        item = it[0]
    elif item == "brewing stand":
        cur.execute("SELECT * from users_data where NAME = ?", (user,))
        conn.commit()
        it = cur.fetchone()
        item = it[10]
    elif item == "sword":
        cur.execute("SELECT * from users_data where NAME = ?", (user,))
        conn.commit()
        it = cur.fetchone()
        item = it[11]
    elif item == "armor":
        cur.execute("SELECT * from users_data where NAME = ?", (user,))
        conn.commit()
        it = cur.fetchone()
        item = it[12]
    return item```
jade tartan
#

So?

cloud dawn
fading harness
#

@jade tartan however please print discord.__version__

fading harness
#

and afaik discord_slash is also an outdated repo as well

cloud dawn
fading harness
#

they switched to a new name, a standalone lib

fading harness
sage otter
fading harness
cloud dawn
fading harness
cloud dawn
fading harness
cosmic agate
#

Comeon guyys

#

?afk

fading harness
#

and run that file, i am wanting to know the version @jade tartan

jade tartan
#

ohh ok

cold sonnet
#
from discord.ext.commands import Bot
from discord.ext.commands import Bot
```I hate this
cosmic agate
#

umm no dyno 🤦🏼

cloud dawn
cold sonnet
#
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
```I don't like this either
fading harness
slate swan
fading harness
#
from discord.ext import commands
from discord.ext.commands import Bot
from discord.ext.commands import Bot, guild_only  # why importing again Bot?
cold sonnet
#

yeah dunno why the first part is so bad

slate swan
#

why importing bot actually when you already imported commands

#

🤡

cold sonnet
#

hmm

jade tartan
#

@fading harness

cold sonnet
#

right

fading harness
cloud dawn
# cosmic agate ```py import discord import os from discord.ext import commands from discord.ext...
import discord
import os
from discord.ext import commands
from discord.ext.commands import Bot
from discord.ext.commands import Bot, guild_only
import random
import giphy_client
from giphy_client.rest import ApiException
import asyncio
import discord_slash
from discord_slash import SlashCommand, SlashContext
from discord_buttons_plugin import  *
from discord_components import *
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from io import BytesIO
import datetime
import praw
import reddit
import pandas
from discord.utils import find
``` is the same as ```py
import os
import asyncio
import pandas
import datetime
import random

import discord
import discord_slash
import praw
import reddit
import giphy_client

from io import BytesIO

from discord.ext import commands
from discord.ext.commands import Bot, guild_only
from discord.utils import find
from discord_slash import SlashCommand, SlashContext
from discord_buttons_plugin import  *
from discord_components import *

from giphy_client.rest import ApiException
from PIL import Image, ImageFont, ImageDraw
cold sonnet
#

you just pasted it in vsc and clicked sort imports?

fading harness
cloud dawn
cold sonnet
#

nice

slate swan
#

Cause io is an inbuilt library?

sage otter
#

Ye.

cold sonnet
#

and why not just import disnake?

sage otter
cold sonnet
slate swan
#

why not just pip install hikari-lightbulb and use it

sage otter
#

Uninstall the version you have now and reinstall via using the repository link to get 2.0

#

Because Sarthak everyone has their preferred library

jade tartan
fading harness
#

@jade tartan
choose one of two.

  1. install dpy 2.0. see #guild-news of discord.gg/dpy to know how.
  2. change ctx.author.avatar.url to ctx.author.avatar_url.
slate swan
sage otter
sage otter
#

I have my own stuff that I use that I don’t constantly shill in this chat

fading harness
#

i am nextcord trash contributor where all my merged prs always got reverted 💀

quick gust
#

plot twist: he uses pycord

slate swan
sage otter
#

Two seperate commands

fading harness
sage otter
slate swan
fading harness
slate swan
#

yeah

cold sonnet
sage otter
fading harness
#

i think id go reviewing issues in sir lancebot bye

slate swan
jade tartan
# sage otter `pip uninstall discord.py` `pip install git+https://github.com/Rapptz/discord.py...
  Cloning https://github.com/Rapptz/discord.py to c:\users\thoma\appdata\local\temp\pip-req-build-35p8w0ip
  Running command git clone -q https://github.com/Rapptz/discord.py 'C:\Users\thoma\AppData\Local\Temp\pip-req-build-35p8w0ip'
  ERROR: Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/Rapptz/discord.py 'C:\Users\thoma\AppData\Local\Temp\pip-req-build-35p8w0ip'
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
WARNING: You are using pip version 21.2.4; however, version 22.0.3 is available.
You should consider upgrading via the 'C:\Users\thoma\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command. ```
cloud dawn
#

merging is faster than debugging let's be real here

slate swan
#

pycord moment

sage otter
#

How do you not have git. Didn’t you have dpy 2.0 before

jade tartan
#

i dont have any modules or anything that would have to do with git

#

and no i have 1.7

sage otter
#

So you’ve been using 1.7 then

jade tartan
#

.3 i think

sage otter
#

In that case just swap avatar_url

jade tartan
#

yes thats the latest version on the python.com website

sage otter
#

And upgrade when you feel comfortable

slate swan
jade tartan
sage otter
#

He means pypi

slate swan
#

Hm

jade tartan
#

omg am lost what

sage otter
jade tartan
#

But it works any way

slate swan
#

the bot will run but the commands/methods using that attribute will break

#

So your code and discord version both is based on 1.7.3

sage otter
jade tartan
#

ok

sage otter
# jade tartan

You can’t format mentions into names, and titles btw

slate swan
maiden fable
#

Btw @slate swan did it work?

#

The deta thing

slate swan
#

still wanna use detabase

maiden fable
#

Lmaoo

slate swan
jade tartan
#

i need help on another thing

#

Would you mind?

maiden fable
#

As I said, I made that account like 1.5 years ago, I don't remember the procedure. My account was made in like 5 min

maiden fable
jade tartan
#

Hi i have a question for a profiling system embed. if the user is verified. How do you make the bot know that that user is verified? if that make sense. for example store info like this one

maiden fable
#

U still working on the bot for the dating server? lemon_pensive @jade tartan

slate swan
#

dating bot sadcat

#

use tinder 2124_MikeSullyFaceSwap

maiden fable
#

No thanks

jade tartan
#

ok

honest shoal
jade tartan
unkempt canyonBOT
jade tartan
small igloo
jade tartan
#

!ot @small igloo

#

!ot

unkempt canyonBOT
small igloo
jade tartan
#

haha

maiden fable
#

The question would be well suited in #databases tbh

jade tartan
jade tartan
honest shoal
jade tartan
#

Am talking about discord's age verification to be stored on to the profiling system.

#

and it would say the users age on the embed

#

but i mean it says the users age in a different server on their profiling system

honest shoal
#

idk what are you saying about that different age, discord's age verification is only about conforming whether the person is above 18 and that data is private

final iron
#

The API does not disclose peoples age

small igloo
final iron
#

Wait more

small igloo
cloud dawn
cosmic agate
#

so did it solve my original problem?

slate swan
#
from discord_slash import SlashCommand, SlashContext
from discord_buttons_plugin import  *
from discord_components import *```
so you basically use 2 libraries for buttons only?
#

that would mess it up because they might have same classes, like Button etc and you import all of them thru the * import

cloud dawn
royal jasper
#

how can i run a command in on_ready event? like:

@client.event
async def on_ready():
  await command_to_run(ctx)
slate swan
slate swan
dull terrace
#

what, you shouldn't call functions from on_ready?

cold sonnet
#

why is it a command if you only run it on_ready

#

how do you get ctx on_ready

slim ibex
#

^

slate swan
#

you can, but should not

#

fetching a message, and getting the context

cold sonnet
#

ofc you won't make a dict for a non-existing command

dull terrace
#

works fine for me

cold sonnet
slate swan
#

....

#

this is not a command

dull terrace
#

someone pls define command for me

cold sonnet
slate swan
#

!d discord.ext.commands.command

unkempt canyonBOT
#

@discord.ext.commands.command(name=..., cls=..., **attrs)```
A decorator that transforms a function into a [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command") or if called with [`group()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.group "discord.ext.commands.group"), [`Group`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Group "discord.ext.commands.Group").

By default the `help` attribute is received automatically from the docstring of the function and is cleaned up with the use of `inspect.cleandoc`. If the docstring is `bytes`, then it is decoded into [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") using utf-8 encoding.

All checks added using the [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") & co. decorators are added into the function. There is no way to supply your own checks through this decorator.
dull terrace
#

im self taught and honestly half of the language people use goes above my head

slate swan
dull terrace
#

oh okay

cold sonnet
#
@bot.command()
async def test(ctx): #test command
    await ctx.send("testing") #what happens in the command
dull terrace
#

in my first bot i just had on_message and then a bunch of if else statements on message content lol

cold sonnet
#

in my first bot, I didn't have an on_message and it worked perfectly
in my second bot, I made an on_message, then my commands stopped working so I did the exact same thing that u did

slim ibex
dull terrace
slim ibex
#

the 3rd line mostly

slate swan
cold sonnet
#

Don't change_presence (or make API calls) in on_ready within your Bot or Client.
Discord has a high chance to completely disconnect you during the READY or GUILD_CREATE events (1006 close code) and there is nothing you can do to prevent it.

Instead set the activity and status kwargs in the constructor of these Classes.

bot = commands.Bot(command_prefix="!", activity=..., status=...)

As noted in the docs, on_ready is also triggered multiple times, not just once.

Basically: don't 👏 do 👏 shit 👏 in 👏 on_ready.

placid skiff
dull terrace
# slim ibex the 3rd line mostly

oh, time/date is used all the time in the code. If i wanted i could get a new datetime object every time someone called it, but the datettime only needs to be up to minutes in resolution

cold sonnet
#

@bot.listen() yert

dull terrace
#

so i just have a loop that updates it once a minute

cold sonnet
#

can y'all stop using client for a commands.Bot

cloud dawn
slim ibex
#

and items[cat]["emo'][ind]. what kind of list do you have

slate swan
#

🏃‍♂️ i call it MyBot

placid skiff
#

lol i wrote client because everyone uses it D_D

dull terrace
thick sigil
placid skiff
#

i din't call my bot, i subclassed it xD

dull terrace
#

for various items in a game

slate swan
slim ibex
#

imma go back to typescript 🏃‍♂️

cold sonnet
#

the one time I pep8 someone

dull terrace
cold sonnet
#

all of your id's start with 9378925

#

this is pure satisfaction

maiden fable
#

Hmm

#

493451846543998977 my ID :D

dull terrace
maiden fable
#

satisfying till the first 3 nums

cold sonnet
#

4th one fucked

maiden fable
#

Ikrrrrr, 4th one messed the 4th ID

dull terrace
#

shows which ones i uploaded right next to each other

#

i must have had to go back and change that one

maiden fable
#

Lol

dull terrace
#

hmm does that mean the first eight digits represent time

mellow barn
#

Hello, I've written guild-exclusive prefix system, now how can I make bot respond to mentions? Because

bot = commands.Bot(
  command_prefix=(lambda client, message:
    commands.when_mentioned_or((QGuilds
      .select()
      .where(QGuilds.id == message.guild.id)[0]).prefix)
  ),
  ...
)

gives me a

#
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nextcord/client.py", line 415, in _run_event
    await coro(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1095, in on_message
    await self.process_commands(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1091, in process_commands
    ctx = await self.get_context(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1001, in get_context
    prefix = await self.get_prefix(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 957, in get_prefix
    raise TypeError("command_prefix must be plain string, iterable of strings, or callable "
TypeError: command_prefix must be plain string, iterable of strings, or callable returning either of these, not function
Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 950, in get_prefix
    ret = list(ret)
TypeError: 'function' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nextcord/client.py", line 415, in _run_event
    await coro(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1095, in on_message
    await self.process_commands(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1091, in process_commands
    ctx = await self.get_context(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 1001, in get_context
    prefix = await self.get_prefix(message)
  File "/usr/lib/python3.10/site-packages/nextcord/ext/commands/bot.py", line 957, in get_prefix
    raise TypeError("command_prefix must be plain string, iterable of strings, or callable "
#
TypeError: command_prefix must be plain string, iterable of strings, or callable returning either of these, not function```
unkempt canyonBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

mellow barn
haughty quartz
#

anyone knows where i can host a large bot?

#

somewhere cheap (at best)

#

that bot is on servers with 5k+ members

cloud dawn
#

netcup

#

4.80 a month

brisk helm
#

How to reset channel pernissions to []

dull terrace
#

anyone here use atom?

cloud dawn
cloud dawn
dull terrace
#

i'm trying to uninstall a package and it keeps reinstalling itself whenever i restart, pissing me off

kindred oracle
#

Hi

#

I'm currently making a discord bot to give me embedds about git repo changes. Now I want the bot to be able to send message but I stuck at it. currently I'm trying with this piece of code:

async def send_embedd(msg):
    channel = client.get_channel(941712195102851105)
    await channel.send("anyádseszeret! @OrlaaniHUN#1715")
#

anyone could help me figure out why nothing happens?

summer thunder
#

you can make a discord bot in one line

[os:=__import__('os'), discord:=__import__('discord'), asy:=__import__('asyncio', globals(), locals(), ['coroutine']).coroutine, cmd:=__import__('discord.ext', globals(), locals(), ['commands']).commands, bot:=cmd.Bot(command_prefix = ';'), bot.__setattr__('on_ready', asy((lambda: print("Ready!")))), bot.command(name="ping")(asy(lambda ctx: ctx.send("pong!"))), bot.run(os.environ['Token'])]

your welcome one liner people

kindred oracle
summer thunder
slate swan
summer thunder
slate swan
summer thunder
slate swan
unkempt canyonBOT
#
Nah.

No documentation found for the requested symbol.

wary zenith
summer thunder
cold sonnet
wary zenith
summer thunder
wary zenith
dull terrace
summer thunder
dull terrace
#

I'ma start naming it BotClient

wary zenith
#

its not going to affect your code, i could name it pampers_wipes and the code would still work

summer thunder
#

ive had it as "bad" so when i make a new command its gonna be @bad.command()

#

@bad.event

wary zenith
#

fr

dull terrace
cold sonnet
dull terrace
#

sometimes making new variables names is hard

dull terrace
slate swan
cold sonnet
#

don't name something something that is not it

kindred oracle
#

my main problem is that I want to send the message whenever I get the POST request, so I might need to call it as a function but I don't know if that's possible

boreal ravine
mellow barn
torn sail
#

Use an on message event

#

Check if the bot is mentioned there

spring flax
#

@mellow barn what is the error

#

Give the code and error

spring flax
# mellow barn .
async def get_prefix(bot, message):
    extras = await prefixes_for(message.guild) # returns a list
    return commands.when_mentioned_or(*extras)(bot, message)

Use this as an reference.

honest vessel
#

how is this even supposed to work?

#
bot = commands.Bot(
  command_prefix=(lambda client, message:
    commands.when_mentioned_or((QGuilds
      .select()
      .where(QGuilds.id == message.guild.id)[0]).prefix)
  ),
  ...
)
``` i mean where is message.guild.id even from in a construction of bot
slate swan
#

its a lambda func

honest vessel
#

well the error also sais it cant be a function...

#

TypeError: command_prefix must be plain string, iterable of strings, or callable returning either of these, not function

spring flax
#

He probably made it more complicated than it has to be

slate swan
#

making a normal function wouldn't hurt

torn sail
#

commands.when_mentioned_or(…) returns a function

slate swan
#

which returns a list/str

torn sail
#

Yep

honest vessel
#

oh ok i still think its looks ugly af 😄

mellow barn
slate swan
#
def get_prefix(client, message):
  return commands.when_mentioned_or("prefix")(client, message)

bot = commands.Bot(command_prefix=get_prefix)
mellow barn
#

tested it again and it works for now

slate swan
#

you needed the (client, message) to be present there ( in the return)

mellow barn
quick gust
#

no it still isn't

slate swan
boreal ravine
slate swan
#

samsung

maiden fable
slate swan
#

(QGuilds .select() .where(QGuilds.id == message.guild.id)[0]).prefix

maiden fable
#

Ah okay

left crater
#

how can i make my commands not case sensitive?

maiden fable
#

case_insensitive=True in the bot constructor

left crater
#

ok

boreal ravine
#

insensitive*

maiden fable
#

Mb mb

honest vessel
#

async def commandname.lower()(self, ctx):
:trollolol:

maiden fable
#

Not gonna work

honest vessel
#

i know 😛

#

is there even a way ?

#

without use that kwarg in bot construction

maiden fable
#

Yea

honest vessel
#

custom decoration?

maiden fable
#

Oh wait nvm

#

Yea, no way. U'll have to reconstruct the Message class

honest vessel
#

ah

slate swan
#

is the bot able to write messages that only the author can see

#

when yes, how

maiden fable
# honest vessel ah
@client.event
async def on_message(msg):
    # construct a message instance with the content being msg.content.lower() 
    new_instance = Message(...) 
    await bot.process_commands(new_instance) 

Only works if all yr command names have lower case chars

cold sonnet
#

can you write messages that only one person can see? @slate swan

maiden fable
#

He means ephemeral messages

honest vessel
#

it would be to use slashcommands and have that i always forgot name xD it makes it only viewable for the one used command

#

yeah ephemeral

slate swan
maiden fable
#

Wierd name, took me a month to remember it properly

honest vessel
cold sonnet
olive mulch
#

For designing bots, which is a better pattern, multiple bots each with dedicated designs, music bots plays music. Chat bots chats, or a pattern for a single bots to handle multiple jobs?

honest vessel
#

prob diffrent ones

maiden fable
#

Buttons, select menus and stuff

left crater
#

how can i wait for a ping?

slate swan
honest vessel
#

wait_for() ?

slate swan
#

like this @cold sonnet

left crater
maiden fable
unkempt canyonBOT
#

wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
maiden fable
#

!d discord.InteractionResponse.send_message

unkempt canyonBOT
#

await send_message(content=None, *, embed=..., embeds=..., view=..., tts=False, ephemeral=False)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Responds to this interaction by sending a message.
maiden fable
#

It has an ephemeral kwarg

cold sonnet
#

does send/reply too?

honest vessel
#

i dont think so meh

cold sonnet
#

wouldn't make sense for send, cuz you have to specify a member

#

!d discord.ext.commands.Context.reply

unkempt canyonBOT
#

await reply(content=None, **kwargs)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

A shortcut method to [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send") to reply to the [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message").

New in version 1.6.
honest vessel
#

i would like that tho then it would be nice make games n stuff

#

like sink ships etc or something

slate swan
#

how can i create this :]

faint mason
#

pleas help

sick birch
#

you can't await outside of an asynchronous function

cold sonnet
sick birch
slate swan
#

ty

maiden fable
#

Do I see Robin here 👀

faint mason
sick birch
#

Move it inside an asynchronous function

cold sonnet
#

fix

slate swan
#

hi guys

#

im trying to make a bot that when u verify in my discord you give it permissions to make you join discords

#

does anyone have the code to upload nfts on opensea

#

so if i get raided. or the server gets deleted i can make everyone join back

sick birch
#

How would you make everyone join back?

#

By dming everyone that was in the server?

slate swan
#

bots have functions in applications called "join server for you"

slate swan
#

ye

sick birch
slate swan
#

like that bot

#

but i want my own cuz i dont trust other bots like that

sick birch
#

Yeah, except you would need to log in as the user

slate swan
#

yep

sick birch
#

Then you need to follow the oauth2 flow to gain access to a user's access token

#

Which require setting up a web server of sorts

slate swan
#

like this

mint grail
#

i want my bot to send a message everytime a price change, how can i make this possible?

slate swan
honest vessel
sick birch
# slate swan

Exactly, but it has to redirect you to your own website

slate swan
sick birch
#

You can spin up an express.js or flask server pretty fast

slate swan
honest vessel
#

to loop n check price if changed alert to a channel

sick birch
slate swan
maiden fable
honest vessel
sick birch
#

But yeah @slate swan once you have the access token, you should be able to send an API request with the user's access token in the auth header and join servers for them

slate swan
sick birch
#

Which part?

slate swan
#

the whole api part + getting the users 0auth

maiden fable
#

I once helped a person add user authentication to his app 😔

I came to know that Discord API is not beginner friendly

sick birch
honest vessel
#

why would u need access token?

#

when u have a clienttoken

slate swan
#

^^^

honest vessel
#

bottoken*

maiden fable
#

Uhhh it isn't as easy as it seems lol

slate swan
maiden fable
oblique adder
#

Any easy way to disable all button and dropdown after a certain task is complete? Other than creating two ui class and switching

maiden fable
honest vessel
maiden fable
#

This is easy

sick birch
#

Flask not so much I can still try though

maiden fable
#

Just add the guilds.join scope ot yr OAuth2 url

sick birch
slate swan
maiden fable
sick birch
#

Which is questionable practices

slate swan
slate swan
maiden fable
#

Idk much about it, never played around much with it

sick birch
#

no, that's the worst way to do it

#

You're handling sensitive information, it should be treated with the utmost security

slate swan
#

maybe a mysql db

sick birch
#

not some shoddy .json file

slate swan
#

yeah

#

could do md5 encryption

#

or table key encryption

sick birch
#

Encrypt it if you have to but make sure only you have the decryption key

slate swan
#

ye

maiden fable
#

Just use the public, private key method but keep the private key safe and the same

sick birch
#

This is all backend stuff so you can do it pretty easily with express.js and TypeORM or prisma orm to make it easier to store the data

tiny ibex
#
 async with aiohttp.request("GET", url=url) as response:
      data = BytesIO(await response.read())
    processing = await download.edit(content = "Processing your song! Converting into mp3 from bytes......")
    with open(f"./audio/LOL.mp3", "wb") as f:
      f.write(data.getbuffer())

      await ctx.reply("Here is your favorite song!",file=disnake.File(f'./audio/LOL.mp3'))```
#

Whyyyyyyyyyyyyy

maiden fable
#

Lol lemme see

slate swan
sick birch
tiny ibex
slate swan
sick birch
tiny ibex
#

Nothing cool enough

maiden fable
#

now what is found? (I am guessing its a message)

tiny ibex
#
found = await ctx.reply("Found the query! Searching for it........")```
mint grail
sick birch
honest vessel
#

file=disnake.File(f'./audio/LOL.mp3')

tiny ibex
maiden fable
#

@tiny ibex tell me smth

cold sonnet
#

no f-string

maiden fable
#

When u save the file, is the file correct? Like the contents and does it play properly

tiny ibex
honest vessel
#

then there is ur issue

maiden fable
#

I have always hated BytesIO istg😔

tiny ibex
#

But the API gives proper response

honest vessel
#

try download file first and get it to work locally

tiny ibex
honest vessel
#

check filesize it prob is 0 bytes

tiny ibex
#

The API gives proper response BTW....

maiden fable
tiny ibex
maiden fable
#

fp should be equal to buffer lol

tiny ibex
#

And........ I don't do drugs

maiden fable
#

Bruh it is just an example

tiny ibex
maiden fable
#

file path

tiny ibex
slate swan
maiden fable
#

its an arg, not a kwarg anyways

honest vessel
#

also, with open(f"./audio/LOL.mp3", "wb") as f:
f.write(data.getbuffer())

  await ctx.reply("Here is your favorite song!",file=disnake.File(f'./audio/LOL.mp3'))

isnt await ctx.replay inwith open space

maiden fable
#

wym

maiden fable
#

open space?

honest vessel
#

with open()

tiny ibex
#

huh?

#

You talking bout the indents?

maiden fable
#

Yea

tiny ibex
#

They are messed due to discord

honest vessel
#
with open(f"./audio/LOL.mp3", "wb") as f:
      f.write(data.getbuffer())

await ctx.reply("Here is your favorite song!",file=disnake.File(f'./audio/LOL.mp3'))
``` like this  better?
tiny ibex
#

Discord messed up with indents

honest vessel
#

oh

#

ye its hard to know if discord or ur side for us 😛

tiny ibex
#

loll

#

NVM

maiden fable
#

?

tiny ibex
#

IG it was API side issue

maiden fable
#

Fixed?

tiny ibex
#

I used mp4 instead of mp3

maiden fable
#

Bruh

tiny ibex
#

😛

honest vessel
#

jesus

tiny ibex
#

me dumb

maiden fable
#

Lmao bruh

tiny ibex
#

BTW......... downloading NCS music ain't against ToS right?

maiden fable
#

No iirc

honest vessel
#

no

cosmic agate
#

I need help with this guys

honest vessel
#

simple error

cosmic agate
#

it always comes

#

what do i do

honest vessel
#

but show ur code

cosmic agate
#

ok

honest vessel
#

u can have try:
except IndexError if u want

tiny ibex
cosmic agate
#
@bot.command()
async def count(ctx, number:int):
    try:
        numberint = int(number)
        if numberint < 0:
           await ctx.reply(embed=discord.Embed(title="Timer", description="number can't be a negative",colour=discord.Colour.random()))
           return
        if numberint > 300:
           await ctx.reply(embed=discord.Embed(title="Timer", description="number must be under 300", colour=discord.Colour.random()))
        else:
            embed=discord.Embed(
              title="Timer 2.0",
              description=f"{numberint}",
              colour=discord.Colour.random())
            embed.set_footer(text=":good stuff smh", icon_url="https://cdn.discordapp.com/avatars/839171088079519776/12cdb639fe5c26dccf39bf2e5678b8fc.webp?size=1024")

            new_susi =   message = await ctx.reply(embed=embed)
            await message.add_reaction("⏰")

            users = await new_susi.reactions[0].users().flatten()
            hmmm = (users)
  

            while number != 0:
                number -= 1
                embed=discord.Embed(
              title="Timer 2.0",
              description=f"{number}",
              colour=discord.Colour.random())
                embed.set_footer(text=":good stuff smh", icon_url="https://cdn.discordapp.com/avatars/839171088079519776/12cdb639fe5c26dccf39bf2e5678b8fc.webp?size=1024")
                await message.edit(embed=embed)
                await asyncio.sleep(1)
            await message.edit(content='Ended!')
            await ctx.send(f"{ctx.author.mention}and {ctx.hmmm.mention}! The Timer has ended!")
            

    except ValueError:
        await ctx.send('time was not a number')
#

pretty big ik

#

should of used !paste

maiden fable
tiny ibex
cosmic agate
#

XD

maiden fable
#

ToS

tiny ibex
#

And it's NCS

maiden fable
#

Still... they have a website iirc

cosmic agate
#

NCS allows copyrights xd

tiny ibex
#

No Copyright Sounds

tiny ibex
cosmic agate
#

i think i made a typo there

maiden fable
tiny ibex
maiden fable
#

Use this, don't use YouTube

tiny ibex
cosmic agate
#

i wanted to say its possible to copy it

tiny ibex
cosmic agate
#

use wavelink

sick birch
#

For youtube?

maiden fable
#

!ytdl

unkempt canyonBOT
#

Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.

For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:

The following restrictions apply to your use of the Service. You are not allowed to:

1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service;  (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;

3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
tiny ibex
cosmic agate
#

best of both worlds

sick birch
#

Downloading music from youtube is against their terms of service, and in accordance with rule 5 we can't assist you with that

tiny ibex
cosmic agate
#

!pate

#

!paste

sick birch
#

NCS is fine, not sure if they have an API though you might want to check

cosmic agate
cosmic agate
sick birch
#

That's unfortunate

cold sonnet
#

new_susi = message = await ctx.reply(embed=embed)
??

cosmic agate
tiny ibex
sick birch
#

Web scrape for music?

cosmic agate
tiny ibex
#

IG

sick birch
#

Don't know about that, though I think ncs does let you download their music w/o an API, through their website

left crater
#

how can i detect mentions in a message?

sick birch
#

You might be able to leverage that to get music

cold sonnet
#

the error is here:
users = await new_susi.reactions[0].users().flatten() right? @cosmic agate

sick birch
honest vessel
tiny ibex
#

And no docs

cold sonnet
tiny ibex
#

BRUH

honest vessel
tiny ibex
cosmic agate
#

sorry im new to python

cold sonnet
#

I think you have to refetch the message

cosmic agate
#

wdym

cold sonnet
#

in order to get reactions

#

lemme explain

normal bolt
#

Is there any cause for a bot to shut itself down inside a VPS?

cold sonnet
#
newsomethingfornoreason, message = ... #here, you get the message without reaction
message.add_reaction(...) #here, you add the reactions on the discord side
#newsomethingfornoreason.reactions is empty here because newsomethingfornoreason's a whole different object
#

I'm not sure if add_reaction updates the message object, not just discord side

#

maybe try getting message.reactions instead of the other one

oblique adder
#

Why does it takes so long for the bot to start ?? Mine takes nearly 7 minutes

slate swan
honest vessel
#

@tiny ibexonly what i found sorry

cold sonnet
#

users = await new_susi.reactions[0].users().flatten()
users = await message.reactions[0].users().flatten()

cold sonnet
cold sonnet
#

yes

tiny ibex
cold sonnet
#

stalker

honest vessel
#

@tiny ibexu can check soundcloud wrapper and donwload from there?

cold sonnet
#

it shouldn't take more than 10 seconds

maiden fable
oblique adder
tiny ibex
tiny ibex
#

ToS again

honest vessel
oblique adder
maiden fable
#

I also send messages like Hmm then and use the ot command repeatedly lemon_pensive

honest vessel
cold sonnet
honest vessel
#

doublemoral much? 😄

tiny ibex
oblique adder
cold sonnet
#

atleast not downloading from youtube/spotify, right?

oblique adder
#

lavalink.

cold sonnet
#

ew

tiny ibex
tiny ibex
honest vessel
#

you can if u have premium

oblique adder
cold sonnet
tiny ibex
oblique adder
cold sonnet
#

not music bot

honest vessel
#

vitamine D

tiny ibex
cold sonnet
tiny ibex
oblique adder
oblique adder
honest vessel
#

^ lol why search spotify api then go against ToS on yt makes no sense

tiny ibex
oblique adder
#

"and search on yt"

tiny ibex
#

And download from yt is against ToS

honest vessel
#

download torrents NCS packs 😄

oblique adder
tiny ibex
cold sonnet
#

streaming is literally downloading while playing

honest vessel
#

then you download all the time

#

but yes technically

cold sonnet
#

and youtube doesn't get money from it cuz no views -> youtube no like that -> against ToS

oblique adder
#

Does more servers make discord bot start slower ?

honest vessel
#

not what i know

cold sonnet
#

if you enable all intents for no reason, yes

oblique adder
cold sonnet
#

usually, if your bot is in more servers, you disable the intents you don't need

oblique adder
#

well can but didnt get all

oblique adder
final shard
#

How do I make a word a link

#

you know a hyperlink

#

turns the word blue then when we click redirects us to the website

quick gust
#

you can only do that in embeds and like this
[text](url)

unkempt canyonBOT
final shard
#

hm

tiny ibex
#

Idk how but you can......

#

Can someone tell me how it's done......?

honest vessel
#

i only know inside embeds text

#

maybe check the html for posible hints on how to?

maiden fable
tiny ibex
final shard
#

how to tho

honest vessel
#

i think he try say u can do that outside embeds if using webhooks

fluid spindle
manic wing
#

Making a link hidden behind text like this is not possible in a normal user message, you can only send the full link itself

boreal ravine
manic wing
#

thats a webhook

boreal ravine
#

yes

manic wing
#

not a normal user message

boreal ravine
#

still text AkaShrug

maiden fable
#

Well interactions are also webhooks

boreal ravine
#

fun fact: you can hyperlink applications inside of messages

maiden fable
#

Wym

boreal ravine
#

I'll show later

maiden fable
#

Okay

final shard
#

oo i see

summer thunder
#

can i use ctx.guild.created_at to get the creation date of a guild or is it different

manic wing
fluid spindle
maiden fable
#

Yea

slate swan
unkempt canyonBOT
maiden fable
#

Lol

fluid spindle
maiden fable
#

The only issue is that u gotta specify the whole path

fluid spindle
final shard
slate swan
# maiden fable The only issue is that u gotta specify the whole path

---- open web browser, search engine, type the query, wait for the search to finish, click on the link, wait for the page to get loaded, click on the search button, type the whatever, search through the list of links, copy paste the link, tab in to discord, paste it, send it, wait for the message to reach the server

and you complain about paths

maiden fable
#

its worse on a mobile since the website takes a good minute to load lemon_pensive

slate swan
slate swan
maiden fable
# manic wing ~~get good internet~~

The docs website reloads slow, not only for me, but for most people on mobile. Same was the case with disnake docs, but they fixed it somewhat

Also this happens only when I want to go to a specific class, like discord.Intents, soooo

slate swan
maiden fable
#

Well, disnake somewhat fixed the issue

manic wing
maiden fable
#

Lmao nah, jk

slate swan
manic wing
#

~~posts 950mb/s internet ~~

slate swan
#

caeden be flexing

maiden fable
slate swan
slate swan
unkempt canyonBOT
manic wing
slate swan
#

all docs take a bit of time to load in mobile

maiden fable
#

Yea

slate swan
maiden fable
slate swan