#discord-bots

1 messages ยท Page 889 of 1

slate swan
#

yes, mostly (though I want frontend too but not too attractive or anything)

drowsy thunder
#

Its not that simple
I want a / command embed and after 3 seconds it will react and edit the colour and the top 5 fastest to click gets shown in the screen along with how fast they did
I want it to have as a embed

maiden fable
maiden fable
drowsy thunder
maiden fable
#

I just gave the MOST basic code for your usecase bruv

dusky pine
#

don't wanna sound rude but you shouldn't just ask people for code

heavy folio
#

this server is to help you with your code not to help you by giving you free code

maiden fable
#

@drowsy thunder we are ready to help u but not by spoonfeeding, sorry

drowsy thunder
maiden fable
dusky pine
slate swan
maiden fable
maiden fable
slate swan
maiden fable
#

Anyways

dusky pine
#

yse i know i love svelte too :D
but i need to kno wha type of website they're making, maybe its a bit overkill

maiden fable
#

Ouh gotcha

vocal plover
#

Svelte is awesome you should all use svelte ok bye

maiden fable
#

Alec

drowsy thunder
#

Will you people fucking help or not.

vocal plover
#

No, not if you talk like that

maiden fable
#

Bro, as we said, we won't spoonfeed

plain perch
#

One message removed from a suspended account.

drowsy thunder
unkempt canyonBOT
#
NEGATORY.

No documentation found for the requested symbol.

drowsy thunder
#

Huh

quick gust
buoyant quail
#

but you want it to be command

drowsy thunder
plain perch
#

One message removed from a suspended account.

quick gust
drowsy thunder
buoyant quail
#

Back to the Future

dusky pine
drowsy thunder
dusky pine
#

in your source you have literally not written a single piece of code but the basic bot

buoyant quail
drowsy thunder
dusky pine
#

how is it urgent

austere whale
#

Just to be clear, no one here is obligated to provide you help nor write code for you. With that attitude, you're kind of just making it harder for yourself.

drowsy thunder
#

Cmon
Yall say its easy then do it
Cant ya?

dusky pine
drowsy thunder
dusky pine
#

Ie, if a professional developer finds it easy to develop an AI, you can't just ask him to develop an advanced AI for you for free

#

!rule 9

unkempt canyonBOT
#

9. Do not offer or ask for paid work of any kind.

heavy folio
#

!d discord.ext.commands.Bot takes an activity kwarg

unkempt canyonBOT
#

class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.

This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.

This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
plain perch
heavy folio
#

or make a startup task

plain perch
#

One message removed from a suspended account.

buoyant quail
heavy folio
plain perch
heavy folio
buoyant quail
heavy folio
#

command takes ctx as the first argument

plain perch
#

One message removed from a suspended account.

buoyant quail
#

why you use procces_commands inside command?

heavy folio
#

and pass_context is highly outdated

dusky pine
#

wjhat does pass context do anyway

heavy folio
#

pass_context has been removed since v1.0.0(rewrite).

#

idk i got that from a tag in dpy server

#

but nobody uses pass_context now so

dusky pine
#

oh

The biggest change is that pass_context=True no longer exists, Context is always passed. Ergo:

maiden fable
dusky pine
#

nice

maiden fable
#

Ryan u r just making it hard for yourself ๐Ÿ˜”

dusky pine
#

LOL you advertise everywhere that you code discord.py but you just copy paste code

#

Do you know what a loop is?

maiden fable
#

let's not start an argument here plz

drowsy thunder
dusky pine
drowsy thunder
maiden fable
drowsy thunder
#

I learn it from scratch

dusky pine
#

you know what i'm so kind i'll write the code for them

slate swan
#

๐Ÿด just teach/ignore them if you don't like it xD

maiden fable
#

I'mma just go from here ๐Ÿ˜”

slate swan
#

Stay, hunter ๐Ÿ˜‡

buoyant quail
maiden fable
#

I can sense an argument starting

drowsy thunder
#

Weirdos

dusky pine
#

arguments lol

drowsy thunder
dusky pine
#

love starting arguments but each time I do I always lose ๐Ÿ˜”

austere whale
#

Drop it

drowsy thunder
#

Sorry,I am out of here

#

Probably not get my code and get a freaking ban...

austere whale
#

Again, nobody's obliged to write code for you

dusky pine
#

just to clarify, pydis is not like amazon for code

plain perch
#

One message removed from a suspended account.

dusky pine
#

channel.connect()

lyric tusk
#

how can i get an id for en emoji

unkempt canyonBOT
drowsy thunder
#

Hi guys
Can yall help for 2 things if you will

placid skiff
#

Ask and we will see what we can do

humble gyro
#

how we can message member with id

humble gyro
iron sorrel
#

where?
also show code and learn python before making a bot

slate swan
unkempt canyonBOT
slate swan
#

and use .send()

honest vessel
#

i have manage server but cant invite bot

slate swan
#

that bot is not a public bot

#

only bot's owner can add the bot in other servers

honest vessel
#

ah i can make it public for a second then

ornate linden
#

writing some code for reaction handling but i'm worried about ratelimits

#

does this look good or does anyone know how i can make this use fewer api calls?

# When a reaction is added to a message
@bot.event
async def on_raw_reaction_add(payload):
    # If the event was triggered by the bot
    if payload.user_id == bot.user.id:
        return

    # Do nothing if it is not a unicode emoji
    if not payload.emoji.is_unicode_emoji():
        return

    # If it's an emoji we don't care about
    emojis = ["๐ŸŒŸ", "โŒ"]
    if payload.emoji.name not in emojis:
        return

    # If it's in DMs get the message from DMs
    if payload.member is None:
        user = await bot.fetch_user(payload.user_id)
        message = await user.fetch_message(payload.message_id)
    # Otherwise get it normally
    else:
        message = await bot.get_channel(payload.channel_id).fetch_message(payload.message_id)

    reaction = discord.utils.get(message.reactions)

    # If the reaction wasn't started by the bot
    if not reaction.me:
        return

    # Actually do reaction things here
tiny ibex
#
    loop = get_running_loop(loop)
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\helpers.py", line 291, in get_running_loop
    internal_logger.warning(
The object should be created within an async function
Stack (most recent call last):
  File "c:\Users\phoen\OneDrive\Desktop\some-random-shit-rewrite\main.py", line 59, in <module>
    bot = commands.Bot(command_prefix=commands.when_mentioned_or('Luv', 'Eru', 'eru', 'luv', 'love', 'Love', 'l!', 'e!', 'E!', 'L!'), strip_after_prefix = True, intents = intents, sync_commands_debug=True, case_insensitive=True, enable_debug_events=True, owner_ids = set(owners))
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 135, in __init__
    super().__init__(**options)
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1150, in __init__
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 244, in __init__
    self.http: HTTPClient = HTTPClient(
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 327, in __init__
    self.connector: aiohttp.BaseConnector = connector or aiohttp.TCPConnector(limit=0)
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 767, in __init__
    resolver = DefaultResolver(loop=self._loop)
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\resolver.py", line 26, in __init__
    self._loop = get_running_loop(loop)
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\helpers.py", line 291, in get_running_loop
    internal_logger.warning(```
#

Whyyyyyyyyyyyyyy'

ornate linden
final iron
#

Ah

plain perch
#

One message removed from a suspended account.

#

One message removed from a suspended account.

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)
honest vessel
honest vessel
plain perch
#

One message removed from a suspended account.

quick gust
#

you didn't define name?

#

should be videoname instead probably

plain perch
honest vessel
#

@plain perchyour still going against YTDL

#

!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)
tidal hawk
#

Is there some method, which returns the user messages count?

left crater
#

you can get the user then use user.history

slate swan
#
    perms = ctx.me.guild_permissions
AttributeError: 'str' object has no attribute 'me'
maiden fable
slate swan
unkempt canyonBOT
slate swan
#

links broken in my mobile client

maiden fable
twilit furnace
#

anyone got a good tutorial on how to use buttons with dpy 2.0

slate swan
#

mobile client bugs bro smh

maiden fable
twilit furnace
maiden fable
twilit furnace
maiden fable
#

checkout the examples folder

manic wing
slate swan
#

its not formatted as a hyperlink on my mobile client

#

not sure check in the dpy server

maiden fable
#

iirc nope

#

no application command is added to the cog until now

#

Totally your call tbh. Some people have lost faith in dpy, but then some people do think switching back is better

sage otter
#

Most people are gonna end up migrating back

slate swan
#

dpys release was a whole disaster

sage otter
#

I doubt people are gonna rely on forks anymore. Itโ€™s the same as relying on third party software.

uncut portal
#

Migration is a pain in the ass so we'll see how this goes

slate swan
#

im not quite sure if they even tested after release tbh

sage otter
#

Tbh Idrc what Danny's reasons are for coming back nor do I care if they were contradictory to the reasons that he left for. He came back because he saw the impending doom discord was gonna release on its bot environment with the api 6, and 7 decommissions, and the fact that the fork ecosystem was erratic and was all way too confusing for people. Showing he does care and thatโ€™s all you should expect from a sole maintainer.

sage otter
#

2.0 is still not done nor released. All the new additions are on master branch. If you use that you're inclining yourself to possible breakage.

#

Since itโ€™s not stable.

slate swan
sage otter
slate swan
#

bruh btw nice og pfp

sage otter
#

surprising you still remember that

slate swan
#

you used to bully mecatgun

honest vessel
#

!ot

unkempt canyonBOT
tidal hawk
honest vessel
#

no

tidal hawk
#

aww

honest vessel
#

u would need to track it urself

tidal hawk
#

That's sad

honest vessel
#

its kinda irrelevant for most users anyway

sage otter
#

You have to modify directly through code
discord.ClientUser.edit()

#

Regenerate it

#

WhatTheFlipFloppingFuc I literally just saw the same thing and after regenerating I saw it

sage otter
slate swan
#

ayyyo Rapptz is back

slate swan
#

If it does promise newer features and improvements, however, then I'll definitely be doing it

#

But I'll be waiting in the meanwhile for some good updated Docs and Examples

potent spear
#

yeah, I'm in no rush either

placid skiff
#

Why you should migrate back to d.py? lol

sage otter
#

Because it eliminates the need to rely on forks/third party software AMshrug

oblique laurel
sage otter
#

Thatโ€™s not in the sense of what Iโ€™m talking about

maiden fable
#

According to me ^^^

oblique laurel
#

Lol

quaint epoch
oblique laurel
#

Source: just trust me man

quaint epoch
#

alr it's official heroku is fucking w/ me

maiden fable
#

?

oblique laurel
slate swan
torn sail
slate swan
slate swan
torn sail
maiden fable
slate swan
#

high contrast > light mode

quaint epoch
maiden fable
slate swan
quaint epoch
quaint epoch
#

but im fucked either way

slate swan
#

you dont need to fuck so much, dude 2124_MikeSullyFaceSwap

maiden fable
#

Just delete rhe project on heroku and make another one lemon_pensive

slate swan
#

heroku PeepoShy

slate swan
quaint epoch
#

i'll try something soon

gray wren
#

Im trying to store a list of people who send pics in a certain channel.
After a certain amount of people the channel will be locked and the bot will give the people within the list a specific role.

Any ideas on how to do that?

maiden fable
#

Ping difference a bit too less

slate swan
maiden fable
#

Weird, for some reason I am enjoying the headache I'm getting from seeing the pic lol

slate swan
west juniper
#

Hmm

frozen patio
#

my help command has the ctx parameter tho, whats its problem?

west juniper
slate swan
#

its in a cog i suppose as youre using the deco so youre missing self as youre in a class

frozen patio
frozen patio
west juniper
slim ibex
#

subclass help command for the love of god

quaint epoch
#

LETS GOOO

slate swan
quaint epoch
#

turns out i made a typo in the imports

slate swan
#

lolll

frozen patio
#

now my buttons class isnt defined ๐Ÿค”

slate swan
slim ibex
#

!d nextcord.ext.commands.MinimalHelpCommand

unkempt canyonBOT
#

class nextcord.ext.commands.MinimalHelpCommand(*args, **kwargs)```
An implementation of a help command with minimal output.

This inherits from [`HelpCommand`](https://nextcord.readthedocs.io/en/latest/ext/commands/api.html#nextcord.ext.commands.HelpCommand "nextcord.ext.commands.HelpCommand").
slate swan
#

that name smh

slim ibex
#

dang i wish

vale wing
#

๐Ÿ”ฅ

sacred phoenix
#

did someone face this issue before ?

frozen patio
#

i can get my code real quick to show you

vale wing
#

I don't code on mac so dunno also this issue is not discord bots related

frozen patio
#

it wont send

sacred phoenix
#

sorry im new here

vale wing
frozen patio
vale wing
#

Wtf why

frozen patio
#

its saying its not defined

vale wing
#

Define classes separately

frozen patio
#

OH YEAH

#

THE BUTTONS ARE- OHHH

vale wing
#

Bring it out of there

frozen patio
#

yeah

slate swan
hybrid pond
#

someone experianced in here that could do a litlle job for me?

cold sonnet
slate swan
vale wing
#

Cause rule 9 exists

hybrid pond
#

whats rule 9 lol

cold sonnet
#

any job is against rule 9

quaint epoch
unkempt canyonBOT
#

The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.

vale wing
#

Paid job*

quaint epoch
#

i swear no one reads the rules before coming here

vale wing
#

!rule 9

unkempt canyonBOT
#

9. Do not offer or ask for paid work of any kind.

quaint epoch
cold sonnet
#

many times, moderators have banned members for not paying job

#

paid work of moneyn't

quaint epoch
hybrid pond
#

bruh

vale wing
#

Certified bruh moment

quaint epoch
cold sonnet
quaint epoch
#

anyone back on topic

hybrid pond
#

well gues i go to fiverr then lol

quaint epoch
cold sonnet
#

that's the place :thumbsup_tone5:

quaint epoch
#

now back on topic

#

discord_bots.on_topic = True

#

who needs help related to discord bots?

weary gull
#
@client.command()
async def d(ctx):
    from random import choice 
    await ctx.send(choice(ctx.guild.members).mention)```


I don't have a random, it only notes himself
quaint epoch
cold sonnet
slate swan
quaint epoch
#

show us where you defined client and move the imports to the top of the code

#

dude you there?

#

@weary gull

#

read my previous messages

cold sonnet
weary gull
#

A second please

quaint epoch
weary gull
#

Can you write in Russian?

quaint epoch
slate swan
manic wing
#

!rule 4

unkempt canyonBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

manic wing
#

im so reformed i even memorised the rules ๐Ÿ˜Ž

slate swan
quaint epoch
#

on your application page, did you enable members intents?

#

hmm, my bot goes offline after 30 mins on heroku

#

anyway

maiden fable
honest vessel
quaint epoch
honest vessel
#

who cares about RAM

slate swan
weary gull
#

I just recently started learning python so sorry

honest vessel
#

dosnt python use ram for import llibs n cache that?

quaint epoch
#

alr, @weary gull do this - client = discord.commands.ext.Bot(command_prefix='+', intents=discord.Intents.all())

slate swan
quaint epoch
#

and rename client to bot for godsakes

honest vessel
#

@slate swan test import alot of ranom libs n see if it drags more ram than without

cosmic agate
#

!paste

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.

slate swan
#

my 16gb of ram wouldnt show a difference prob

quaint epoch
honest vessel
#

Your modules are automatically compiled (.pyc files) which are then imported into memory,

slate swan
quaint epoch
maiden fable
#

those are all stored in the __pycache__ folder

honest vessel
#

@slate swan maybe he runs a pi with 512mb n import every time new command lol

slate swan
#

at least dont use the import statement

honest vessel
#

anyway best is import parts of lib u use n not from discord import * or import discord

spice basalt
#

is this right?

slate swan
#

!e

print(__import__("random").choice([1, 2]))

hmmcat

unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

1
quaint epoch
spice basalt
#

no

alpine furnace
#

Literally no difference though. Since Python is interpreted you can call anything from anything anyway

spice basalt
#

i've used client all the way through

honest vessel
#

botclient

slate swan
spice basalt
oak warren
#

hey i need help with the logic of this select menu ( disnake )

    async def interaction_check(self,interaction):
        colors=["Gold","Light Blue","Dark Blue","Dark Red","Indigo","Violet","Cyan","Turquoise","Light Green","Dark Green","Olive Green","Purple","Raspberry Purple","Pink"]
        rolenames = []
        for i in interaction.author.roles[1:][::-1]:
            rolenames.append(i.name.title())
        for i in rolenames:
            if interaction.values[0] == i:
                return True 
        
        if interaction.values[0].title() in rolenames :
            await interaction.response.send_message("You already have a color role",ephemeral=True)
            return False
        return True


``` it works to add the remove the role but i want to to make sure that if the user has one of the roles in color it cant get any unless he removes it ( by selecting the one he has )
honest vessel
#

wait

#

are rolenames in titles?

oak warren
#

yes

spice basalt
slate swan
unkempt canyonBOT
#
Not likely.

No documentation found for the requested symbol.

spice basalt
slate swan
slow fog
#

youre sus

honest vessel
#

!d discord.ext.commands.has_permissions

unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`discord.Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
spice basalt
spice basalt
honest vessel
#

remoce .core

oak warren
honest vessel
#

from ...commands import has_permissions

#

@oak warren not really

oak warren
#

hmm okay

slate swan
unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`discord.Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
placid skiff
honest vessel
#

@oak warren oh well check users roles if any in list exists in his roles

oak warren
#

i did do that

spice basalt
honest vessel
#

@spice basalt are u joking????

spice basalt
#

yes

oak warren
placid skiff
slate swan
weary gull
#

Can I somehow put a bot on heroku hosting from my phone?

honest vessel
#

get the member object get his roles see if any of ur list is matching his roles

slim ibex
oak warren
weary gull
honest vessel
# spice basalt yes

good cus almost reported u for trolling n wasting others time trying to help

slim ibex
#

so it will just spin up a domain

#

trust from personal experience, its not good for discord bots

maiden fable
#

Imagine running a self bot on replit ๐Ÿ˜”

slim ibex
#

use a VPS like vultr

spice basalt
maiden fable
#

just get the Oracle VPS if u don't even wanna spend any money lmao

honest vessel
#

@spice basalt remove .core i just misspelled

spice basalt
#

oops

#

i didn't know ๐Ÿ˜ฉ

slate swan
honest vessel
#

not easy wen its hard, ur forgiven

spice basalt
honest vessel
#

@spice basalt u should learn python tho

oak warren
# placid skiff check if any of the user roles is in your roles list

okay that worked but now when i remove the color role i have i cant add any updated code:

    async def interaction_check(self,interaction):
        colors=["Gold","Light Blue","Dark Blue","Dark Red","Indigo","Violet","Cyan","Turquoise","Light Green","Dark Green","Olive Green","Purple","Raspberry Purple","Pink"]
        rolenames = []
        for i in interaction.author.roles[1:][::-1]:
            rolenames.append(i.name.title())
        for i in rolenames:
            if i in colors and i == interaction.values[0]:
                return True 
        
        else:
            await interaction.response.send_message("You already have a color role",ephemeral=True)
            return False
spice basalt
weary gull
#

What would you recommend hosting a bot?

spice basalt
#

but i will learn from the docs

weary gull
honest vessel
spice basalt
#

is that what you meant by hosting?

honest vessel
#

no

weary gull
honest vessel
#

like hosting means provide/have up n running, like a webserver can host a website

#

host=server

placid skiff
honest vessel
#

fifa hosting soccer xD

#

a swimhall hosting swimpools

#

english?

maiden fable
slate swan
honest vessel
#

@maiden fable i heard u now that means ... ?

maiden fable
maiden fable
honest vessel
#

๐Ÿ˜ ๐Ÿคช

maiden fable
honest vessel
#

@oak warren hey ironman stop code bots n help captain america fight putin

slate swan
maiden fable
#

why u do this to me ๐Ÿ˜”

placid skiff
#

World can't afford a war between putin and Marvel

quaint epoch
oak warren
honest vessel
#

haha thats so true tho

maiden fable
#

Captain America: Let's produce shields on a bigger scale so that everyone gets one

slate swan
quaint epoch
#

!rule 7

unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

maiden fable
#

Anyways I'mma just stop before ash- well nvm

maiden fable
slate swan
crystal fable
#

Reminder: Message Content is changing to a Privileged Intent

After <t:1661904000:D> (<t:1661904000:R>), Discord bots in 100+ servers will need to be verified and approved by Discord to receive Message Content.

Applications for requesting the intent has already begun, and can be done alongside either the initial verification process in the Developer Portal, or by opening a support ticket if you've already been verified.

You can read more details about this over at:
https://support-dev.discord.com/hc/en-us/articles/4404772028055

maiden fable
#

Oh hi there Scragly

crystal fable
#

whoops

#

chat moved

honest vessel
#

haha np

crystal fable
#

wanted to remove the pinned notice

maiden fable
#

Haha

honest vessel
#

modabuse reeee

crystal fable
#

always

maiden fable
#

discord says the SLA for intent request is 5 days but they do be taking 3 months ๐Ÿ˜”

honest vessel
#

i just said if we collab on a putin bot that nukes then its relevant n not breaking rule 7

maiden fable
#

Calm down

crystal fable
#

but yeah earlier is better than later

alpine furnace
#

๐Ÿคทโ€โ™‚๏ธ guess they arenโ€™t exactly obligated to fulfill an SLA when thereโ€™s no mutual benefit

maiden fable
#

Yea

quaint epoch
#

!code 137

#

hey guys

#

i got an error code heroku 137 what does it mean>

maiden fable
#

Well ig I am just lucky since I have access to the intent

quaint epoch
#

heroku hates me again

#

when a run a command a few times, it just crashes

#

๐Ÿ˜”

maiden fable
#

Well, what I like to do in a situation like this: Delete the project and make another one from scratch

quaint epoch
#

well, maybe a third tiem?

maiden fable
#

ig

maiden fable
#

Nvm that ain't a valid server

quaint epoch
#

godly ping

#

i think this is it guys

honest vessel
#

i likeembeds tho

quaint epoch
unkempt canyonBOT
#

Hey @slate swan! I noticed you posted a seemingly valid Discord API token in your message and have removed your message. This means that your token has been compromised. Please change your token immediately at: https://discordapp.com/developers/applications/me

Feel free to re-post it with the token removed. If you believe this was a mistake, please let us know!

honest vessel
#

yoinked already too slow bot

slate swan
#

raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

quaint epoch
honest vessel
#

putin nowcoming (just kidding)

quaint epoch
#

smh

honest vessel
#

Regenerate ur token tho kek

maiden fable
honest vessel
#

andwhen post code keep client / bot.run(token) out from it

maiden fable
#

Indeed

quaint epoch
#

or use a .env to store token

honest vessel
#

^

#

i use env

maiden fable
#

Meh as if I am gonna run a self bot

honest vessel
#

just need to tell git to ignore that filetype cause i cant use git add . ๐Ÿ˜„

quaint epoch
maiden fable
#

Lmaooo

quaint epoch
#

heroku realy does hate me

honest vessel
#

selfbotting is not allowed, but itisallowed to make a client?

#

like CLI discord

maiden fable
#

Sure

honest vessel
#

anyone made a discordclient mimic IRC?

maiden fable
#

a client is just utilizing the same Discord API, but just using a GUI to show u the messages and stuff instead of making u write code for everything

honest vessel
#

ah yeah but a selfbot is a selfclient but it has automated features

#

practical same but not theoraticaly

#

no theoratical same not practical ? ๐Ÿ˜„

maiden fable
#

Technically speaking, other modded discord clients are running self bots (won't name them)

honest vessel
#

ye so the selfbotting comes as soon u have anything automated right?

#

(but notcorrect either, likeifu have afk if intact 10min n change status) that would also be selfbotting but its a client too

maiden fable
#

Yea, well technically rn, we all are self bots

#

But just cz discord has made the client, it isn't termed as self botting

honest vessel
#

no we are clients

#

but if we used like AutoHotKeys then we would be selfbotting

maiden fable
#

client is the app we are using to login to the Discord API and stuff

honest vessel
#

ah ok thats how u seeit

maiden fable
#

Haha I was just seeing the Discord app logs, and understood that why, sometimes it takes a good minute for discord to show someone as offline

honest vessel
#

i am always offlinestatus :S

#

@maiden fableHi! I am Hunter, a depressed single who also has Bipolar Disorder. urnotalone

maiden fable
#

Since u gotta ping the ws to keep u online, the client/app also pings the API. Sometimes the ping can take upto 2 min, cz of the logic, so we are shown online until the time for the ping isn't over

honest vessel
maiden fable
honest vessel
#

wait what whatu mean? ifi play gameitshow i play it? no

maiden fable
#

The "status" symbol/logo is just there for others to see, the API doesn't care about it. The symbol is coded in the frontend/app, not in the API

maiden fable
honest vessel
#

hm am lil bit confused but whatever

winter shore
#

Hello! I'm not quite sure what channel to ask this in, but I am looking to create a gui panel to play a discord bot, from my discord account;

My question is: "How can I hook onto discord in a way that I can read chat and type messages into the message box, without using a bot account"?

maiden fable
#

API is still sending the app/client, the game/rich presence information, but the client just checks if yr status is set as invisible/offline and if it is, it doesn't show the information

honest vessel
#

here we go

#

as we spoke about it

maiden fable
honest vessel
#

why would u tho run discord as a python client insteadof use the app @winter shore ?

#

i mean theres both apps n website

#

not sure if wanna help xD

maiden fable
#

And yea, the API still sends the app/client, information in the same JSON format, u get, by sending raw requests

honest vessel
#

@winter shore can u explain ur not goals but whats the point=?

#

(lack of english)

#

what u gonna gain from it?

honest vessel
maiden fable
#

eh, I ain't helping him make a GUI or smth since I haven't really read Discord's guidelines/ToS and idk if it is against their policies (probably it is)

honest vessel
#

"i want a nuclear plant for electricity -> use waste for nukebombs"

winter shore
spice basalt
#

how can i make it send an output when the command activates like
"Kicked <member kicked>"

spice basalt
#

will the command still activate then?

maiden fable
#

....?

honest vessel
#

yes

#

await ctx.send(f"I kicked this .... {member.mention} cuz i am a cool-coder!")

spice basalt
#

i meant can even use 2 awaits

maiden fable
#

who said u cannot use 2 awaits

honest vessel
#

yesu cando

spice basalt
#

ah

honest vessel
#

await ctx.send()
await fetch_user()
await asyncio.sleep(666)

#

await ==> courountine itmeans it work asyncron

quaint epoch
#

how do i set the current dir in a commandline?

maiden fable
#

indeed

quaint epoch
#

yes it's related to discord bots to run commands

honest vessel
#

pwd?

#

dependson ur OS

quaint epoch
#

cd worked

honest vessel
#

dir?*

slate swan
honest vessel
#

ashley stop

quaint epoch
#

lol

honest vessel
#

u always chatting n then lurking to do that ๐Ÿ˜›

slate swan
maiden fable
#

๐Ÿ˜”

boreal ravine
maiden fable
#

good thing

boreal ravine
slate swan
honest vessel
#

oh he deleted msg

maiden fable
#

I don't watch it anyways ยฏ_(ใƒ„)_/ยฏ

honest vessel
#

i might watch anime after the nukes

spice basalt
honest vessel
maiden fable
maiden fable
honest vessel
spice basalt
#

by the way, how can i make the bot say it like "Kicked {member}#0000"?

slate swan
maiden fable
quaint epoch
honest vessel
#

!d discord.Member

unkempt canyonBOT
#

class discord.Member```
Represents a Discord member to a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").

This implements a lot of the functionality of [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User").

x == y Checks if two members are equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

x != y Checks if two members are not equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

hash(x) Returns the memberโ€™s hash.

str(x) Returns the memberโ€™s name with the discriminator.
quaint epoch
formal basin
#

!d class message

unkempt canyonBOT
#

A template for creating user-defined objects. Class definitions normally contain method definitions which operate on instances of the class.

boreal ravine
honest vessel
#

str(x) Returns the memberโ€™s name with the discriminator.

quaint epoch
honest vessel
#

so basicly f"{member}"

quaint epoch
formal basin
#

!d class Message

unkempt canyonBOT
#

A template for creating user-defined objects. Class definitions normally contain method definitions which operate on instances of the class.

honest vessel
#

no need

quaint epoch
#

or ast.literal_eval(f'"{member}"')

honest vessel
#

@formal basin!d discord.Message

spice basalt
formal basin
#

!d discord.Message

unkempt canyonBOT
#

class discord.Message```
Represents a message from Discord.

x == y Checks if two messages are equal.

x != y Checks if two messages are not equal.

hash(x) Returns the messageโ€™s hash.
slate swan
boreal ravine
#

@formal basin #bot-commands for the love of god please go there

honest vessel
#

@formal basinwhat u lookingfor?

slate swan
quaint epoch
boreal ravine
#

ashley has no humour ignore her bruh

quaint epoch
honest vessel
quaint epoch
boreal ravine
honest vessel
#

!rules 7

unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

slate swan
honest vessel
#

@slate swan

slate swan
maiden fable
#

I wanna comment sooo bad but ๐Ÿ˜”

slate swan
#

dpy 1.7.3 third party libs pepe_cri

maiden fable
formal basin
#

Help please

slate swan
royal jasper
maiden fable
#

tf is a free variable

vale sierra
#
    @commands.command()
    @commands.has_permissions(mute_members=True)
    async def mute(self, ctx, member: discord.Member, *, reason="Aucune"):
        mutedRole = await getMutedRole(ctx)
        await member.add_roles(mutedRole, reason=reason)
        await member.send(f"> Tu as รฉtรฉ mute du serveur **{ctx.guild.name}**. Si tu penses que c'est une erreur, ouvre un **ticket** ou contacte les **administrateurs**.")
        embed = discord.Embed(title="**Mute**", description=f"{member.mention} a รฉtรฉ mute !", url="https://youtu.be/dQw4w9WgXcQ", color=0xba1206)
        embed.set_thumbnail(url="https://emoji.gg/assets/emoji/2912-peperee.png")
        embed.add_field(name="Raison", value=reason)
        embed.add_field(name="Modรฉrateur", value=ctx.author.name, inline=True)

        await ctx.send(embed=embed)
``` hello, when i test this code, my bot say i don't have the permissions
slate swan
formal basin
vale sierra
quaint epoch
spice basalt
#

can i make the command's output send in a different channel?

quaint epoch
#

is your handler in a cog?

royal jasper
spice basalt
#

how

vale sierra
quaint epoch
unkempt canyonBOT
#
await send(content=None, *, tts=False, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Sends a message to the destination with the content given.

The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.

To upload a single file, the `file` parameter should be used with a single [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") objects. **Specifying both parameters will lead to an exception**.

To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") objects. **Specifying both parameters will lead to an exception**.
quaint epoch
spice basalt
#

how do i use disnake

quaint epoch
vale sierra
quaint epoch
#

or use whatever wrapper you have rn

slate swan
unkempt canyonBOT
spice basalt
quaint epoch
vale sierra
#
@bot.event
async def on_command_error(ctx, error):
    if isinstance(error, commands.MissingRequiredArgument):
        await ctx.send(f"> {ctx.author.mention} vous devez indiquez un argument pour effectuer cette commande.")
    elif isinstance(error, commands.MissingPermissions):
        await ctx.send(
            f"> {ctx.author.mention} vous n'avez pas les permissions nรฉcessaires pour effectuer cette commande.") 
```@quaint epoch
slate swan
quaint epoch
maiden fable
#

add this line of code at the end of the handler and u r gonna be fine

spice basalt
quaint epoch
spice basalt
#

wow ok ashley confused me with it so hard yesterday

royal jasper
#

for guild in client.guilds:
    for member in guild.members:
        membros = member

components = [
        Select(
            placeholder = "select a user",
            options = [
                SelectOption(label=f"{membros}", value="select this user"),
            ]
        )
    ])

    while True:
        try:
            select_interaction = await client.wait_for("select_option")
            await select_interaction.send(content = f"{select_interaction.values[0]} was selected", ephemeral = False)
        except:
            await ctx.send("error")
``` there is any errors? because, when i try to run this command, it returns only me as a option
quaint epoch
#

@vale sierra did you run the command after removing the handler?

hasty axle
#

!resources

unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

manic wing
slate swan
maiden fable
hasty axle
#

thx

quaint epoch
slate swan
manic wing
spice basalt
maiden fable
slate swan
quaint epoch
#

the bot can only mute people with a role/perms lower than it

vale sierra
slate swan
vale sierra
quaint epoch
vale sierra
quaint epoch
vale sierra
quaint epoch
formal basin
royal jasper
quaint epoch
# vale sierra yes

try muting one of them, the bot won't mute you but it should work on them

formal basin
royal jasper
quaint epoch
royal jasper
#

like

if message. bla bla bla
formal basin
vale sierra
#

@quaint epoch can i dm you ? i think why but its long and i don't want to flood

quaint epoch
maiden fable
#

nvm, sorry for caps, forgot to turn them off

vale sierra
quaint epoch
formal basin
formal basin
maiden fable
royal jasper
#
@client.event
async def on_message(message):
    if message.channel.id in no_set:
        if message.id in role_set:
            # do stuff

    if message.author.id == client.user.id:
        # do stuff
    
    msg_content = message.content.lower()

try to use this

formal basin
#

Ok

maiden fable
#

u didn't close a bracket

#

role_set

slate swan
maiden fable
#

lolll

boreal ravine
#

use sets

#

more faster dogepopcorn

maiden fable
#

use tuples

tacit token
#
api_key = "myapikey"
base_url = "http://api.openweathermap.org/data/2.5/weather?"

@client.command()
async def weather(ctx, *, city: str):
    city_name = city
    complete_url = base_url + "appid=" + api_key + "&q=" + city_name
    response = requests.get(complete_url)
    x = response.json()
    channel = ctx.message.channel
    if x["cod"] != "404":
        async with channel.typing():
            y = x["main"]
            current_temperature = y["temp"]
            current_temperature_celsiuis = str(round(current_temperature - 273.15))
            current_pressure = y["pressure"]
            current_humidity = y["humidity"]
            z = x["weather"]
            weather_description = z[0]["description"]
            weather_description = z[0]["description"]
            embed = discord.Embed(title=f"Weather in {city_name}",
                              color=ctx.guild.me.top_role.color,
                              timestamp=ctx.message.created_at,)
            embed.add_field(name="Descripition", value=f"**{weather_description}**", inline=False)
            embed.add_field(name="Temperature(C)", value=f"**{current_temperature_celsiuis}ยฐC**", inline=False)
            embed.add_field(name="Humidity(%)", value=f"**{current_humidity}%**", inline=False)
            embed.add_field(name="Atmospheric Pressure(hPa)", value=f"**{current_pressure}hPa**", inline=False)
            embed.set_thumbnail(url="https://i.ibb.co/CMrsxdX/weather.png")
            embed.set_footer(text=f"Requested by {ctx.author.name}")
        await channel.send(embed=embed)
    else:
        await channel.send("City not found.")```

The Error

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'main'

boreal ravine
formal basin
#

What does this mean

boreal ravine
formal basin
boreal ravine
#

make sure the awaitable is inside in asynchronous function

naive spoke
#

what does .get do

fluid spindle
# formal basin So what do I do to fix it

You can only use the await keyword inside an asynchronous function ie you need to put it in an async function like this:

async def foo(param):
    await do_something()
naive spoke
#

oops wrong one

maiden fable
naive spoke
maiden fable
#

ah okay

fluid spindle
formal basin
fluid spindle
#

What did you do exactly? I may need to see the code

formal basin
visual island
formal basin
formal basin
visual island
#

57

formal basin
formal basin
quaint epoch
fluid spindle
# formal basin

Are you sure the await is inside that particular function beginning at line 27? You might be having some indentation problems.

honest vessel
quaint epoch
#

what's the difference between worker and web in Procfile in heroku?

royal jasper
honest vessel
#

if blablabla:
await respond("yeyeyeyeye")

quaint epoch
honest vessel
#

i said u were a spy for JS

#

tryina recruit

fluid spindle
quaint epoch
#

no, i just want a side-server option for python

#

i don't wanna open up pycharm or the cmd line

honest vessel
quaint epoch
honest vessel
#

be happy peopels even makes pylibs

quaint epoch
#

okay okay i get it

#

(mission failed, we'll get 'em next time)

honest vessel
quaint epoch
#

still not a js spy

honest vessel
#

gs

honest vessel
#

u share ip's and if one is bad u all blocked

#

and those places is where bad bots gets hosted

quaint epoch
#

still wanting a python side-server...

quaint epoch
honest vessel
#

@formal basin if u knew little py, u would figure this out

quaint epoch
#

!code

unkempt canyonBOT
#

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.

quaint epoch
#

@royal jasper , you need members intents enabled

royal jasper
honest vessel
#

i can let it slip n explain - it means u try use asyncron in a function u havnt defined as a async function

quaint epoch
#

show use where you defined client

royal jasper
#

client = commands.Bot(command_prefix=prefixo, intents=intents)
client.remove_command('help')
DiscordComponents(client)

#

prefixo = "/"

formal basin
honest vessel
#

@formal basincan u show code? i just read error and error tells me what i told u

#

from whole function decleration

quaint epoch
quaint epoch
#

did you also enable member intents in you bot app page?

quaint epoch
#

stop

#

!code

unkempt canyonBOT
#

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.

quick gust
#

indentation probably incorrect, also use a pastebin for large pieces of code

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.

honest vessel
#

@formal basincan u show me line

#

57

honest vessel
#

showcodearound57

formal basin
honest vessel
#

indentationswrong?

#

awaitshould besame level

quick gust
fluid spindle
#

I can't see anything wrong so it should be indentation

honest vessel
#
await message.delete()
await message.channel.send(f"{message.author.mention} you are not allowed to say that")
formal basin
honest vessel
#

canu paste ur whole code then !paste

#

cus ur source u deleted

formal basin
#

!paste

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.

honest vessel
#

@formal basinhttps://cdn.discordapp.com/attachments/343944376055103488/950447371953778818/unknown.png this error just sais u nvr used await

#

and thats the error u share with us

manic wing
#

bruhda thats the link

honest vessel
#

and i thought i was the one getting drunk

#

i think its indentation issue and his await is outside function

honest vessel
#

ty

#

here is error

#

as i said

formal basin
#

Yes.

honest vessel
#

look at that indentation

#

look ur 4th if statemnt

formal basin
fluid spindle
formal basin
honest vessel
#

@formal basin look picture dont u see anything sticking out? (pic i sent)

fluid spindle
honest vessel
#

very badly

honest vessel
#

Ok let me help u more

fluid spindle
#

give them the line number

cyan delta
# honest vessel look at that indentation

the if statement is in the same line as the function, meaning its outside of it, meaning everything inside that condition is outside that function, meaning it cant use await

honest vessel
#

@formal basin see any issues now?

formal basin
#

I seee

honest vessel
#

that is when people say indentations

#

your if-statement is outside function

#

and u try use await after it

formal basin
#

Do I do async def on_message(message):

fluid spindle
#

There are some other indentation problems too

honest vessel
#

omg

manic wing
honest vessel
#

can u take over caeden i need a cigg ๐Ÿ˜„

#

i tried my best

cyan delta
#

chill out

formal basin
honest vessel
#

i am chill

velvet compass
#

Btw, when you are sharing the code block from above, do you mind not sending the mean list?

honest vessel
#

@formal basinlets do a practice

#

!e
def myfunction():
print("monkey")
print("This is outside my function")
print(myfunction())

unkempt canyonBOT
#

@honest vessel :white_check_mark: Your eval job has completed with return code 0.

001 | This is outside my function
002 | monkey
003 | None
fluid spindle
#

The if statement in the 4th line of code is also indented by 1 space. Do you want it indented or do you not? @formal basin

honest vessel
#

!e
def myfunction():
a = 1
a = 2
print(a)

final iron
unkempt canyonBOT
#

@honest vessel :white_check_mark: Your eval job has completed with return code 0.

2
honest vessel
#

itry givehimexamples

final iron
#

Examples of what?

honest vessel
#

indentations

#

maybemy examplesare poor

fluid spindle
unkempt canyonBOT
#

@fluid spindle :white_check_mark: Your eval job has completed with return code 0.

001 | 2
002 | 3
003 | 4
004 | 5
fluid spindle
#

!e
a = 1
while a < 5:
a += 1
print(a)

unkempt canyonBOT
#

@fluid spindle :white_check_mark: Your eval job has completed with return code 0.

5
manic wing
#

stop spamming go #bot-commands

desert cosmos
formal basin
manic wing
formal basin
manic wing
#

ok then

formal basin
#

Iโ€™ll try

potent spear
# formal basin Help

lmao, just lowercase the content and check if idiot is in there instead of 100 variations of idiot

fluid spindle
#

same thing with, like, 5 other words

honest vessel
#

i just tried help this fellow botcoder indentations issues

#

i take a break bbl

desert cosmos
#

are there any permission i have to give my bot explicitly to be able to send ui elements ?

desert cosmos
#

hmm

fluid spindle
dusky aurora
#

Hello can someone help me i want to change my bots username but it says i have to do it with json can someone show me how that works

manic wing
dusky aurora
tardy atlas
#

Who can help with postgresql ( heroku/git )

modest plover
#

Any help?
Using Disnake

modest plover
#

Some have support for it, some don't iirc

#

Also helps us find what you need to use

dusky aurora
#

i have found the issue, still thanks

modest plover
#

Ok :)

dusky aurora
#

i used await client.user.edit(avatar='path',username='username')

modest plover
#

Ok

formal basin
#

The bot isnโ€™t doing anything

distant pendant
#

Is there someone with knowledge in Temporary Voice bots?

slate swan
#

does anyone know all embed identitiers

#

this is what iโ€™m saying iโ€™m trying to do this but my bot wonโ€™t send the footer auto and stuff

#

iโ€™m in school sorry if i donโ€™t reply just dm me if you can

vale sierra
#
    @commands.command()
    async def resume(self, ctx):
        client = ctx.guild.voice_client
        if client.is_paused():
            client.resume()
        emoji = '\N{THUMBS UP SIGN}'
        await message.add_reaction(emoji)
``` hello, i try to make my bot react with a emoji (๐Ÿ‘ ) but its don't work (no error codes)
midnight gorge
#

if your moving to nexcord do you just replace discord with nexcord?

cold sonnet
#

why would you @midnight gorge

#

await message.add_reaction("๐Ÿ‘")

#

@vale sierra

midnight gorge
sick birch
#

Unless you have a strong valid reason to switch over consider staying

slim ibex
river kindle
#

guys how can i create a discount command? For example:! Discount @user% 10
answer: I added 10% discount to @user
I want that 10% stored for @user and maybe 20% stored for @ user2 what can I do?

mellow gulch
#

@velvet tinsel can you explain what the static thing is

slim ibex
#

staticmethod

mellow gulch
#

static methon

velvet tinsel
#

!d static method

unkempt canyonBOT
#

static

To link to static files that are saved in STATIC_ROOT Django ships with a static template tag. If the django.contrib.staticfiles app is installed, the tag will serve files using url() method of the storage specified by STATICFILES_STORAGE. For example:

{% load static %}
<img src="{% static 'images/hi.jpg' %}" alt="Hi!">
```  It is also able to consume standard context variables, e.g. assuming a `user_stylesheet` variable is passed to the template:

```py
{% load static %}
<link rel="stylesheet" href="{% static user_stylesheet %}" type="text/css" media="screen">
```...
slim ibex
#

they belong to the class, not the instance, and take in no parameters

mellow gulch
#

method

velvet tinsel
#

!d staticmethod

unkempt canyonBOT
#

@staticmethod```
Transform a method into a static method.

A static method does not receive an implicit first argument. To declare a static method, use this idiom:

```py
class C:
    @staticmethod
    def f(arg1, arg2, ...): ...
```  The `@staticmethod` form is a function [decorator](https://docs.python.org/3/glossary.html#term-decorator) โ€“ see [Function definitions](https://docs.python.org/3/reference/compound_stmts.html#function) for details.

A static method can be called either on the class (such as `C.f()`) or on an instance (such as `C().f()`). Moreover, they can be called as regular functions (such as `f()`)...
velvet tinsel
#

@mellow gulch

velvet tinsel
mellow gulch
#

i dont understand

velvet tinsel
#

static methods are used when you have self but you never use it

slate swan
#

static methods are methods that dont need a class instance or are not bound to a class

velvet tinsel
#
class Myclass:
  def __init__(self, name):
    self.name = name

  def some_shit(self):
    print(self.name)

self is used there

slate swan
velvet tinsel
slim ibex
#

static methods are bound to the class

velvet tinsel
manic wing
#

staticmethods are useless

slim ibex
amber hinge
#
    @commands.Cog.listener()
    async def on_member_join(self, member):
        guild = member.guild
        try:
            data = getConfig(guild.id)
            guild = member.guild
            data = getConfig(guild.id)
            blacklisted = data["blacklist"]

            if logs.user.id in blacklisted:
                await member.ban(reason=f"Blacklisted.")
            except:
                pass

help me please :(

mellow gulch
#
from discord import app_commands
from discord.ext import commands


class Test(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        tree = app_commands.CommandTree(bot)

    @commands.Cog.listener()
    async def on_ready(self):
        print('Test Online')

    @tree.command()
    async def repeat(self, interaction: discord.Interaction, msg: str):
        await interaction.response.send_message(msg)


def setup(bot):
    bot.add_cog(Test(bot))```
slate swan
mellow gulch
#

so how would i use the staticmethod with this

manic wing
slate swan
vale sierra
velvet tinsel
#

anyways okimii and caeden have fun helping people here

slim ibex
#

(i do play 2 instruments though)

velvet tinsel
#

shit i play the piano

slate swan
slim ibex
#

cโ™ญ

velvet tinsel
#

caeden hates everything i do

velvet tinsel
slate swan
slate swan
slim ibex
#

chinese lol

mellow gulch
slate swan
amber hinge
velvet tinsel
slate swan
amber hinge
#

@velvet tinsel

slate swan
velvet tinsel
#

@amber hinge @slate swan is the expert here not me

#

Ask him hes smarter than me at programming

slate swan
amber hinge
#
Traceback (most recent call last):
  File "C:\Users\damie\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 606, in _load_from_module_spec
    spec.loader.exec_module(lib)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\gg$\Bot py\GROS PROJET\Cogs\blacklistfilter.py", line 23
    except:
    ^^^^^^
SyntaxError: invalid syntax

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

Traceback (most recent call last):
  File "D:\gg$\Bot py\GROS PROJET\bot.py", line 168, in <module>
    bot.load_extension(f'Cogs.{filename[:-3]}')
  File "C:\Users\damie\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 678, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\damie\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 609, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'Cogs.blacklistfilter' raised an error: SyntaxError: invalid syntax (blacklistfilter.py, line 23)

error

slate swan
#

line 23 lol

mellow gulch
#

idk @slate swan said that i would use it to fix this

velvet tinsel
#

@slate swan haha

#

Bye bye~

slate swan
manic wing
mellow gulch
velvet tinsel
amber hinge
#

@slate swan ??

manic wing
#

cus they scale upwards yk

velvet tinsel
#

Did you get your results

manic wing