#discord-bots

1 messages Β· Page 1127 of 1

slate swan
#

At least based on your last messages

#

πŸ’€

#

u didnt do shit

#

im gonna go and let u 2 handle this

#

If you could use Google and Search for *GitHub discord.py" it might've helped you

pliant gulch
#

Inb4 pr is doc change

slate swan
#

@slate swan dont call other people do shit

#

So instead of saying that I did nothing, read and use your capabilities sometimes

#

Coding is not just about asking and getting everything the way you need it. It's about your own research and how to find things

slate swan
#

arent we here for spoonfeeding, Krypton

#

Anyone could find within seconds how to install 2.0 if they would at least try it.

#

<@&831776746206265384>

#

this chat.

#

A mindset of a 12 yr old? See how you behave?

#

I'm giving advices on how to search things on your own

#

*!shh

#

silence iirc

crimson pulsar
#

!silence

unkempt canyonBOT
#

βœ… silenced current channel for 10 minute(s).

crimson pulsar
#

guys, stay on topic, no need to argue about frameworks

#

!warn 949145395274088489 you can't call out people names, just a warning this time for your language

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied warning to @slate swan.

crimson pulsar
#

!unhush

unkempt canyonBOT
#

βœ… unsilenced current channel.

crimson pulsar
#

@nocturne root same goes to you

slate swan
#

.topic

lament depotBOT
#
**What feature would you like to see added to the library? What feature in the library do you think is redundant?**

Suggest more topics here!

slate swan
#

Do bots even contain unique features nowadays

crimson pulsar
#

I had a bot to detect foul language using NLP and delete them

pliant gulch
#

I’ve seen this same exact topic 3 or so times in a row now from .topic

slate swan
#

Feels like every bot is a fork of another one

dusky pine
#

hikari cult you've done it once again

slate swan
#

looli do what?

slate swan
slate swan
crimson pulsar
#

to detect offensive speech

#

not really

#

sentences without foul words can also be offensive

slate swan
#

a list with thousands of words? interesting.

#

totally not, people can use other variants and misspelt versions of the word

pliant gulch
#

A word list isn’t sufficient enough imo, the English language is totally dependent on context so it’s kind of hard to tell without NLP

slate swan
#

still better than a static list.

#

i find sarth is ||not|| ~~ cute~~ very offensive and a statement that isnt correctlemon_sentimental😑

vale wing
slate swan
#

Exenifix, you've been working on kinda same bot right?

#

oh its an antispam

frozen patio
#

@torn sail it raises no errors

vale wing
slate swan
#

Antispam, just add some AI and your fork is done

#

exenifix is actually working on susventures V2lemon_smirk

vale wing
slate swan
#

open source lipbite

slate swan
slate swan
vale wing
slate swan
vale wing
#

git clone wtf yall talking about

slate swan
pliant gulch
slate swan
#

andy why are you always correcting me

#

this isnt a me only chat ykπŸ™‚

slate swan
pliant gulch
slate swan
slate swan
#

Petition to do it

#

bro

pliant gulch
unkempt canyonBOT
slate swan
#

Go ahead there

frozen patio
#

I got my bot into 10 servers today

#

Feel pretty good about that πŸ™‚

slate swan
#

Cool

frozen patio
#

Ye I released it today

vale wing
#

12k samples of type text - is_spam preanalyzed

#

Analyzing is like finding amount of unique symbols, total symbols, unique words and total words. Pretty basic approach but works fine still

#

Depends on what you consider spam

#

Meaningless messages are undetectable by my system for example because it uses non verbal algorithm, repetitive words and symbols are tho, and that kind of spam happens more often

slate swan
#

So lots people having a conversation would trigger that, it's the same case just not a bible.

odd mango
#

i was wondering if i could 1 line add slash commands to my existing bot

vale wing
odd mango
#

i am using dpy

vale wing
#

Dpy has a bit more difficult slash commands implementation and I can't help with it unfortunately cause I never used it

odd mango
#

ah its okay

slate swan
#

Trigger the anti spam, if it would have a trigger implemented the way you've described a potential "bypass"

#

Like let's say some hypothetical spammer joins your server with 10 different accounts and spams random bible verses. I don't think your bot would be able to detect it as spam unless you have heuristic checks in place as well.

#

Sounds like an alternative/change proposal to me

dusky pine
#

Discordians 4:3-2 - "get nuked haha"

slate swan
#

there's still more ways to do the same thing

slate swan
#

yeah I know you saw, welcome

dusky pine
#

why is it so big

#

turn it down

slate swan
#

why

dusky pine
#

ctrl +

slate swan
#

is this good?

dusky pine
#

πŸ˜”

slate swan
#

esoteric

dusky pine
#

esowtewic

slate swan
#

uwu

dusky pine
#

πŸ₯Ί

maiden fable
dusky pine
dusky pine
#

uh-huh... a music bot

slate swan
dusky pine
#

and a fcuikging database

slate swan
#

...?

#

you have no build overwrite to change your clients theme

dusky pine
#

you will get over the annie/dark phase

dusky pine
slate swan
#

ew

dusky pine
slate swan
#

what is this theme, how do you use it okimii

#

im a giga chad what can i say

slate swan
maiden fable
#

And this is OT talk

slate swan
dusky pine
maiden fable
maiden fable
slate swan
slate swan
maiden fable
#

Theme*
Typo

slate swan
#

ok

maiden fable
#

Same thing

slate swan
#

ok

dusky pine
#

My Bot Is Not Working ?? Can Anyone Please Help Me Solve This ?

import discord

discord.make_bot(moderation=True, music=True)

bot run
#

πŸ™ πŸ™ πŸ™

dusky pine
#

lmAO

#

good name

slate swan
#

thank you

dusky pine
slate swan
#

bro turn that theme off

#

or else ill do it myselflemon_imp

slate swan
vocal snow
#

everything is black now!!!!

#

how do i go back to light mode

dusky pine
#

click it again

vocal snow
#

ohhh

#

ty

slate swan
#

Clear πŸ™‚

dusky pine
#

now im curious, can you make your own build overrides

vocal snow
# slate swan

i clicked it and it scrolled down so i didnt see it

paper sluice
#

only discord devs can

slate swan
#

a rainbow cursed theme would be funny

#

with random colors

paper sluice
#

if discord gave this feature to everyone to play with, discord would be a mess

slate swan
#

that would be so funny

slow fog
slate swan
slow fog
tender venture
#

hello I would need help for my bot that I spent on Linux and therefore I have an error that I cannot resolve ```py

Traceback (most recent call last):
File "/home/container/loadsub.py", line 14, in <module>
configs = json.load(config)
File "/usr/local/lib/python3.10/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 7 column 6 (char 173)```

paper sluice
#

can u show ur json?

tender venture
#
{
    "token": "",
    "prefix": "An",
    "status": "nice bot",
    "suburl": {
        },
    "embed-color-text": "YAML",
    "embed-color": 16777215,
    "embed-config": {
        "prix": "oui",
        "vendeur": "oui",
        "avis": "oui",
        "localisation": "oui",
        "marque": "oui",
        "taille": "oui",
        "couleur": "oui",
        "etat": "oui"
    }
}```
#

i delete my token

paper sluice
#

the error suggests that you have extra data in your json file
do you have something like this by any chance?

{
    "token": "",
    "prefix": "An",
    "status": "nice bot",
    "suburl": {
        },
    "embed-color-text": "YAML",
    "embed-color": 16777215,
    "embed-config": {
        "prix": "oui",
        "vendeur": "oui",
        "avis": "oui",
        "localisation": "oui",
        "marque": "oui",
        "taille": "oui",
        "couleur": "oui",
        "etat": "oui"
    }
},
{...}
slate swan
#

πŸ’€ bro just make a class for all these stuff

#
class BotConfigs:
    token = ""
    prefix = ""
``` and so on
slate swan
paper sluice
slate swan
paper sluice
#
class YamlToClassAttr(type):
    """
    Tries to fetch data from config.yaml and making it class attr

    Defaults to `Undefined` if the attr name is not found.
    """
    
    def __getattr__(cls, attr: str) -> Any:
        class_name = cls.__name__
        
        try:
            cls_data = DATA[class_name]
        except KeyError:
            print(f'{class_name} not found in `config.yaml`')
            return
        
        if attr not in cls.__dict__:
            value = cls_data.get(attr, Undefined())
            obj_type = cls.__annotations__[attr]
            value_type = type(value)
            # trying to convert the object to the type-hint
            if value_type != obj_type:
                
                try:
                    value = obj_type(value)
                except (TypeError, ValueError):
                    raise NonConvertableType(
                        f'cannot convert {value_type.__name__!r} '
                        f"to '{obj_type.__module__}.{obj_type.__name__}'"
                    ) from None
            
            setattr(cls, attr, value)
        
        return cls.__dict__[attr]
slate swan
#

i love metaclasses but i never use themπŸ—Ώ

dusky pine
#

YamlToClassAttr(type)
this kinda sounds cursed

#

idk what happens if you inherit from type

paper sluice
slate swan
#

cursed, yet awesome.

paper sluice
#

i love cursed stuff

dusky pine
slate swan
#

πŸ’€

paper sluice
slate swan
paper sluice
#

exactly.

slate swan
#

im not a ghost

paper sluice
#

you are, if you are not, why are you under my bed pithink

slate swan
#

i have my reasons

#

πŸ™‚

paper sluice
#

now i gotta find a new house

#

ah shit here we go again

slate swan
#

😳

paper sluice
slate swan
paper sluice
#

i have my reasons

#

πŸ™‚

slate swan
#

you can get a pet capybara if you buy one of my houses

#

😳

dusky pine
#

so we're all living in Ryu's house

slate swan
dusky pine
#

in his walls

slate swan
#

good spot

shrewd apex
dusky pine
#

AYO

slate swan
#

asher freakyπŸ˜΅β€πŸ’«

paper sluice
#

thats it, im pulling out the ak

shrewd apex
#

rip

paper sluice
#

get ready

slate swan
shrewd apex
#

lmao i tried to be like Oki once

#

and it's creepy af

slate swan
#

its funny

#

well to me its very funny

shrewd apex
#

idm as long as i don't creep the other guy out

paper sluice
slate swan
#

no im a kawaii anime girl

dusky pine
#

you aren't a boy? 😳

paper sluice
slate swan
paper sluice
slate swan
#
>>> print(is_cute("ryuga"))
True
dusky pine
#

this channel has, once again, turned into oki's playground

shrewd apex
#

it always was

slate swan
unkempt canyonBOT
#

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

0.8999999999999999
slate swan
paper sluice
slate swan
dusky pine
#

someone should !otn a okimii's playground

shrewd apex
#

^

slate swan
#

im going to sleep

paper sluice
#

!ot πŸ’€

unkempt canyonBOT
shrewd apex
#

gn

slate swan
#

now someone else keep this channel alive

slate swan
slate swan
#

😳

dusky pine
paper sluice
slate swan
#

!pip pythonji wanna use this

unkempt canyonBOT
slate swan
shrewd apex
paper sluice
slate swan
#

the extension is .🐍
i wonder what would GitHub flag it as

#
import qt as Sarth

guys what are the methods of the sarth obj?

paper sluice
shrewd apex
#

see the pandas import

slate swan
paper sluice
slate swan
shrewd apex
#
import pandas as 🐼
dusky pine
#

BRO

paper sluice
slate swan
#

hear me out

dusky pine
#

AYOooooooooooooooooooooooo

slate swan
#

im going to get banned so im going to stop

dusky pine
#

yeah good

slate swan
#

😭

shrewd apex
#

it's gonna be a mass ban

slate swan
#

yeah you better do πŸ˜‚

#

.topic

lament depotBOT
#
**What's one feature you wish more developers had in their bots?**

Suggest more topics here!

slate swan
paper sluice
#

!ot before there is a blood bath here

unkempt canyonBOT
shrewd apex
dusky pine
slate swan
#

im the smoothest person in the world when it comes to flirting so dont test me

slate swan
slate swan
shrewd apex
#

:kek:

paper sluice
#

!ot always links to ot2, i thought it was random, life lie lemon_angrysad

dusky pine
#

!source ot2

unkempt canyonBOT
#
Bad argument

Unable to convert 'ot2' to valid command, tag, or Cog.

#
Command Help

!source [source_item=None]
Can also use: src

Display information and a GitHub link to the source code of a command, tag, or cog.

shrewd apex
#

!ot

unkempt canyonBOT
dusky pine
#

!source ot

unkempt canyonBOT
#

Sorry, an unexpected error occurred. Please let us know!

AttributeError: 'TagIdentifier' object has no attribute 'qualified_name'

dusky pine
#

Uh-huh

slate swan
#

not worthy

#

!src ot

unkempt canyonBOT
#

Sorry, an unexpected error occurred. Please let us know!

AttributeError: 'TagIdentifier' object has no attribute 'qualified_name'

slate swan
#

bro

shrewd apex
slate swan
#

#bot-commands

#

im not worthy either

shrewd apex
#

sarth ur turn

slate swan
#

sarth are you worthy?

#

definately not

#

you probably are since youre a god

#

!src off-topic

unkempt canyonBOT
#
Bad argument

Unable to convert 'off-topic' to valid command, tag, or Cog.

shrewd apex
#

!source offtopic

unkempt canyonBOT
#
Bad argument

Unable to convert 'offtopic' to valid command, tag, or Cog.

shrewd apex
#

rip

slate swan
#

πŸ˜”

dusky pine
#

!src src

unkempt canyonBOT
#
Command: source

Display information and a GitHub link to the source code of a command, tag, or cog.

Source Code
slate swan
#

if you do src with no args, it just brings that page

#

:kek:

dusky pine
#

!src

unkempt canyonBOT
slate swan
#

bro

dusky pine
#

wroooooooooooooooooooooooooong

slate swan
#

im going to sleep😑

dusky pine
#

❌❌❌

#

good night

unkempt canyonBOT
#

Sorry, an unexpected error occurred. Please let us know!

AttributeError: 'TagIdentifier' object has no attribute 'qualified_name'

dusky pine
#

!src otn

unkempt canyonBOT
#
Command: otname

Add or list items from the off-topic channel name rotation.

Source Code
dusky pine
#

!src abogus

unkempt canyonBOT
#
Bad argument

Unable to convert 'abogus' to valid command, tag, or Cog.

slate swan
#

😭

shrewd apex
#

ok let's stop

#

b4 we get banned

#

#bot-commands

slate swan
slate swan
#

i love you more, gn❀️

shrewd apex
#

sweet dreams

dusky pine
#

gn
proceeds to talk in another channel
gn
actually sleeps

scarlet sorrel
#

could anyone point me in the direction of a speech to text from discord call, in python? there is one, but its JS.

slate swan
#

Hi

robust fulcrum
#

How can we make our bot reply to the message?

robust fulcrum
shrewd apex
#

ctx.reply()

slate swan
#

ctx.reply()

slate swan
shrewd apex
#

lmfao

#

slow typing πŸ‘€

slate swan
#

SLOW NET

#

I'm not home!

placid skiff
unkempt canyonBOT
#

Library for performing speech recognition, with support for several engines and APIs, online and offline.

placid skiff
#

Duh

maiden fable
#

Oh, u already shared it

scarlet sorrel
#

yes but in discord bot.

maiden fable
#

Sorry, my discord was lagging

robust fulcrum
shrewd apex
#

anyone know how to extract image from assetbundles?

scarlet sorrel
placid skiff
scarlet sorrel
placid skiff
#

wait you want to record a speech from a voice channel?

robust fulcrum
slate swan
#

Code

robust fulcrum
# slate swan Code
    @commands.command()
    async def translatereply(self, ctx,lang:str):
        reply = ctx.message.reference
        conten = reply.cached_message.content
        translated = GoogleTranslator(source='auto', target=lang).translate(conten)
        trans = discord.Embed(title=f"Tranlated to {lang}", description=translated,color=discord.Color.green())
        await ctx.reply(embed=trans)
slate swan
#

ctx.message.content ?

robust fulcrum
#

Oof

robust fulcrum
#

Ryuga told me that

slate swan
#

Oh then @paper sluice

robust fulcrum
#

I mean reply one

#

The message reference

slate swan
#

Reply one is fine

robust fulcrum
#

Then?

#

Whats wrong

slate swan
#

conten

#

Var

paper sluice
slate swan
#

Irdk I never used reference attribute

slate swan
paper sluice
robust fulcrum
#

I not understood what you mean

paper sluice
#

conten = (reply.cached_message or await self.bot.fetch_message(reply.message_id)).content

paper sluice
#

ah sad

#

hold on

robust fulcrum
paper sluice
#

im in game, hold on

paper sluice
# robust fulcrum

conten = (reply.cached_message or await ctx.fetch_message(reply.message_id)).content

scarlet sorrel
#

could someone give me a tiny example of this, it isnt working

paper sluice
scarlet sorrel
paper sluice
#

like

Embed( title='python discord', description='foo, [hello](https://...)')
paper sluice
scarlet sorrel
#
embedVar.add_field(name="yo", value = ['invite']('link'), inline=False)
#

oh

hardy yoke
#

lol it's markdown formatting

scarlet sorrel
#

huh

hardy yoke
paper sluice
# scarlet sorrel huh

anything you type in discord, like code blocks, bold, italics its done over markdown, discord then converts that markdown into html and displays it

scarlet sorrel
#

wait so can i embed links here

paper sluice
#

wdym?

#

no that doesn't work

scarlet sorrel
#

😭

hardy yoke
#

discord disables that for users

paper sluice
#

discord doesn't allow that

west veldt
#

heyy

west veldt
slate swan
#

ryuga is famous

west veldt
#
@bot.event
async def on_message_delete(message):
    embed = discord.Embed(title=f"{message.author.name} deleted a message",
                          description="", color=0xFF0000)
    embed.add_field(name=message.content, value="This is the message that they deleted",
                    inline=True)
    embed.set_footer(text=message.author.id)
    channel = bot.get_channel(channelid)
    await channel.send(channel, embed=embed)```

i was trying to get my bot send time of message deleted in footer along with the id of the user but idk how to do
#

pride heart πŸ’€

slate swan
paper sluice
west veldt
#

o

#

rn its like this with that code

west veldt
slate swan
#

I think I will just go away from here getting ignored every single time

west veldt
#

im like not that good at coding

#

im only ok ok

#

and that u said there i found it a bit confusing tbh πŸ₯΄

slate swan
#

Just don't do description="" just remove it

#

It's fine

paper sluice
# west veldt

this is the time at which the message was deleted?

paper sluice
#

lol

west veldt
#

lol

hardy yoke
#

being ignored is part and parcel of being in support channels

west veldt
slate swan
#

I'm just in depression

brazen torrent
# west veldt

if u mean the date, its a "Unix Timestamp". <t:1656495247:d>

west veldt
#

it not issue i just want it to send the id of the user and the time of message deleted in the footer

wispy sequoia
#

I have

@commands.command(short_doc='Short description', description='Long description')

but in the help command embed (I'm making a custom one) even tho I use

value=command.short_doc or "No short description"

it doesn't display the short_doc and it always uses "No short description"

west veldt
#

like this carlbot

slate swan
#

!d discord.ext.commands.Command.short_doc see

unkempt canyonBOT
#

property short_doc```
Gets the β€œshort” documentation of a command.

By default, this is the [`brief`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Command.brief "discord.ext.commands.Command.brief") attribute. If that lookup leads to an empty string then the first line of the [`help`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Command.help "discord.ext.commands.Command.help") attribute is used instead.
slate swan
slate swan
#

!d datetime.datetime.timestamp

unkempt canyonBOT
#

datetime.timestamp()```
Return POSIX timestamp corresponding to the [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instance. The return value is a [`float`](https://docs.python.org/3/library/functions.html#float "float") similar to that returned by [`time.time()`](https://docs.python.org/3/library/time.html#time.time "time.time").

Naive [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instances are assumed to represent local time and this method relies on the platform C `mktime()` function to perform the conversion. Since [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") supports wider range of values than `mktime()` on many platforms, this method may raise [`OverflowError`](https://docs.python.org/3/library/exceptions.html#OverflowError "OverflowError") for times far in the past or far in the future.

For aware [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instances, the return value is computed as:

```py
(dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()
```   New in version 3.3.

Changed in version 3.6: The [`timestamp()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp "datetime.datetime.timestamp") method uses the [`fold`](https://docs.python.org/3/library/datetime.html#datetime.datetime.fold "datetime.datetime.fold") attribute to disambiguate the times during a repeated interval.
slate swan
#

πŸ’€

slate swan
#

which works like a relative timestamp

#

Ye

west veldt
slate swan
#

@west veldt discord.Embed(timestamp= datetime.datetime.now()) do this

#

along with other arguments if you had any

#

when did that become a thing sarthak

west veldt
slate swan
slate swan
#

poor sarthak πŸ˜”

west veldt
#

uh how to write both together

slate swan
#

the footer and timestamp are divided using | or β€’ depending on your device

slate swan
slate swan
slate swan
wispy sequoia
slate swan
wispy sequoia
#

Β―_(ツ)_/Β―

west veldt
#
@bot.event
async def on_message_delete(message):
    embed = discord.Embed(title=f"{message.author.name} deleted a message",
                          description="", color=0xFF0000)
    embed.add_field(name=message.content, value="This is the message that they deleted",
                    inline=True)
    embed.set_footer(f"ID: {message.author.id}")
    embed.timestamp = datetime.datetime.now()
    channel = bot.get_channel(channelid)
    await channel.send(channel, embed=embed)```

like this?
hardy yoke
#

you don't need channel in the .send

#

channel.send(embed=embed)

paper sluice
#

that happens a lot here

slate swan
#

!ot better place

unkempt canyonBOT
west veldt
#

what

unkempt canyonBOT
#

discord.on_message_delete(message)```
Called when a message is deleted. If the message is not found in the internal message cache, then this event will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.

If this occurs increase the [`max_messages`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Client "discord.Client") parameter or use the [`on_raw_message_delete()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.on_raw_message_delete "discord.on_raw_message_delete") event instead.

This requires [`Intents.messages`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Intents.messages "discord.Intents.messages") to be enabled.
west veldt
#

o-

paper sluice
#

the event wont be called if the message is not in the cache, so I don't think that should be a problem

west veldt
#

should this work?

paper sluice
#

hmm

paper sluice
dusky pine
#

hi, what event would be appropriate for updating presence (hikari-lightbulb here)

west veldt
paper sluice
brazen torrent
# west veldt should this work?
# Dont Forget:
from datetime import datetime

@bot.event
async def on_message_delete(message):
    embed = discord.Embed(title=f"{message.author.name} deleted a message",
                          description="", color=0xFF0000)
    embed.add_field(name=message.content, value="This is the message that they deleted",
                    inline=True)
    embed.timestamp = datetime.utcnow()
    embed.set_footer(text=str(message.author.id))
    channel = bot.get_channel(channelid)
    await channel.send(channel, embed=embed)

Worked by me

dusky pine
brazen torrent
paper sluice
west veldt
paper sluice
brazen torrent
west veldt
#

wew wew wew

west veldt
#

it worked

dusky pine
dusky pine
upbeat gust
dusky pine
#

ah ic

upbeat gust
#

You can check if hikari has this

dusky pine
#

but thanks

tough lance
#

Hi

paper sluice
#

Hi

shrewd apex
#

πŸ‘‹

slate swan
#

Hello πŸ‘‹

#

Hello

#

how to make tracking services (online website, bot, api)

#

an example is in the photo

slate swan
#

oh nvm you were already answered

#

we have sarthak uwu

robust fulcrum
#

Guys how can I make a pypi search command such that if it not found package on pypi so it return package not found.

dusky pine
robust fulcrum
dusky pine
#

!src pypi

unkempt canyonBOT
#
Command: pypi

Provide information about a specific package from PyPI.

Source Code
robust fulcrum
dusky pine
robust fulcrum
#

Or requests

dusky pine
#

aiohttp

robust fulcrum
#

Ok

paper sluice
#

httpx 😢

slate swan
#

you can use that

robust fulcrum
paper sluice
#

find*

heady sluice
#

so um

#

what happens to the View after its message is deleted?

#

is it still active?

paper sluice
#

the view gets deleted with the message

heady sluice
#

but the instance is stored in code

paper sluice
#

ya but u can't really do anything with it because the message is gone

heady sluice
#

does it know when the message is deleted

#

or does it wait for an action

paper sluice
#

hmm, u can test it, delete the message then do view.is_finished() to check

quick pewter
#

when i write ''quoi'' , my bot say "FEUR", but when "quoi" is written in a sentence like ''de quoi ?'' my bot doesn't react . somebody have idea ? currently i use ''if message.content.lower() == "quoi":
await message.channel.send("FEUR")''

dusky pine
#

!d in

unkempt canyonBOT
#
in

6.10.2. Membership test operations

The operators in and not in test for membership. x in s evaluates to True if x is a member of s, and False otherwise. x not in s returns the negation of x in s. All built-in sequences and set types support this as well as dictionary, for which in tests whether the dictionary has a given key. For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).

For the string and bytes types, x in y is True if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Empty strings are always considered to be a substring of any other string, so "" in "abc" will return True.

quick pewter
scarlet aurora
#
    @commands.command()
    @commands.is_owner()
    async def clone(self, ctx, channel_name):
        existing_channel = discord.utils.get(ctx.guild.channels, name=channel_name)
        if existing_channel is not None:
            await existing_channel.clone()
            await existing_channel.delete()
        else:
            await ctx.send(f'No channel named **{channel_name}** was found')``` instead of running !clone general I want to instead ping the channel name like !clone #general  , how would I do this?
scarlet aurora
paper sluice
scarlet aurora
#

thanks

scarlet aurora
paper sluice
scarlet aurora
#
    @commands.command()
    @commands.is_owner()
    async def clone(self, ctx, channel_name: discord.TextChannel):
        existing_channel = discord.utils.get(ctx.guild.channels, name=channel_name)
        if existing_channel is not None:
            await existing_channel.clone()
            await existing_channel.delete()
        else:
            await ctx.send(f'No channel named **{channel_name}** was found')```
paper sluice
#

remove the existing_channel thing, just use channel_name

#

its already a channel object

scarlet aurora
#

alr

paper sluice
#

u can change the name of channel_name to channel cuz that would be more appropriate

scarlet aurora
#
    @commands.command()
    @commands.is_owner()
    async def clone(self, ctx, channel: discord.TextChannel):
        channel = discord.utils.get(ctx.guild.channels, name=channel)
        if channel is not None:
            await channel.clone()
            await channel.delete()
        else:
            await ctx.send(f'No channel named **{channel}** was found')``` like this @paper sluice ?
paper sluice
#

no, remove channel = discord.utils.get(ctx.guild.channels, name=channel), you dont need it

scarlet aurora
#

and then that's it?

paper sluice
#

ya

scarlet aurora
#

@paper sluice it works if I do >clone general as well

#

as well as >clone #general

paper sluice
#

no

scarlet aurora
#

i justed tested it

paper sluice
#

ah well

scarlet aurora
paper sluice
#

its basically doing discord.TextChannel('<channel_name>') internally

scarlet aurora
#

so it will do either #general or general

#

is there a way to only make it use #general

#

@paper sluice

paper sluice
#

maybe?

#

i would just use slash commands for that

scarlet aurora
#

I don't want any slash commands though

scarlet aurora
paper sluice
#

just manually convert

#

inside the function

slate swan
cloud dawn
#

You could also pass the id.

scarlet aurora
#

i want to pass the channel like #general

#

nothing else

cloud dawn
#

Then you'd need to make your own custom converter. Although I don't see what's wrong with allowing multiple ways to point out a channel.

paper sluice
#

^

scarlet aurora
#

it works

#

what happens if there are multiple channels with the same name

cloud dawn
#

It will most likely pick the highest one in the hierarchy.

scarlet aurora
#

alright

cloud dawn
#

As for the #... it passes the id so it will always be the selected one.

scarlet aurora
#

it clones all if general is passed, unless it's #general

#

thanks for the help anyways

main forge
#

How do I trigger a rule? Say rule #7?

paper sluice
#

!rule 7 this?

unkempt canyonBOT
#

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

paper sluice
#

or do u want it for your bot?

main forge
#

!rule 7

unkempt canyonBOT
#

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

main forge
#

Thanks

slate swan
#

πŸ’€ Bruh

cunning ice
#

Bro you pinged my '3 months ago' msg
Hats off

white citrus
slate swan
#

Be patient, they are the most active channels and if someone can help they will

quaint epoch
#

what is the most updated fork atm

heady sluice
#

spoon

sick birch
#

has not received an update in thousands of years

shrewd apex
#

to make it :kek:

sick birch
#

only a few

#

still waiting on fork major update 2.0

paper sluice
shrewd apex
#

mhm

#

can't do a thing right

paper sluice
#

spork is trying to be c and python at the same time

shrewd apex
#

the analogyπŸ’€

paper sluice
#

πŸŽ‰ you just proved its trash

meager quartz
#

Hello

shell wing
#

Can anyone suggest a VPS for free which has nice uptime and all ?
Cause im thinking about shifting from replit to a VPs...

meager quartz
meager quartz
#

no?

#

i need help

#

no servers arent helping

#

u guys are my only hope!

shell wing
#

what cmd u need ?

#

an example or what ?

meager quartz
#

can u gemme um... the github for it

placid skiff
sick birch
austere gust
#

Yo. I am trying to make serverstatus, but when I am trying to get the file to check players this happens:

shrewd apex
shell wing
austere gust
#

btw if I make a verified discord bot, will I get verified bot developer badge?

shrewd apex
austere gust
shrewd apex
#

yes

austere gust
#

how it works

slate swan
shrewd apex
#

it's free upto $5

slate swan
#

you still have to pay if you surpass limits

#

yeah

shrewd apex
#

as long as u don't cross

austere gust
#

I just need to host my bot

shrewd apex
#

yeah

slate swan
#

rude

austere gust
#

ok but how

shrewd apex
#

the app will just shut down ur processes

#

if u cross

shrewd apex
shell wing
austere gust
#

what to do here

vale wing
shrewd apex
shrewd apex
vale wing
#

Do they grant a whole server or just computing powers with no server

shrewd apex
#

as long as u don't cross that limit it's free

shell wing
robust fulcrum
#

Guys how to fix this error?
Here is code

    @commands.command()
    async def pypi(self,ctx,package):
        url = f"https://pypi.org/pypi/{package}/json"
        async with aiohttp.ClientSession.get(url) as response:
            if response.status == 404:
                embesd = discord.Embed(title="404", description="package not found",color=discord.Color.red())
                await ctx.send(embed=embesd)
            else:
                resp = json.loads(response.text)
                verison = resp['info']['version']
                summary = resp['info']['summary']
                embesd = discord.Embed(title=f"{package} v{verison}",description=summary,color=discord.Color.green())
                embesd.url = resp['info']['package_url']
                await ctx.send(embed=embesd)
shrewd apex
shrewd apex
#

it prolly won't even cross 1-2$

robust fulcrum
shrewd apex
#

unless u have heavy ram usage

shell wing
robust fulcrum
shell wing
#

and how much database can it store under 5$ ?

vale wing
shrewd apex
slate swan
# robust fulcrum So?

that means that it has something to do with the ClientSession object and has to be instantiated in order to work

shrewd apex
shell wing
vale wing
#

@robust fulcrum simply just add brackets after ClientSession lol

slate swan
#

just create different apps

shell wing
# slate swan sure

Oh cool and im stupid sryy....how many users data can i store ? 😭

scarlet aurora
#
@commands.Cog.listener()
    async def on_raw_reaction_add(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g: g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.add_roles(role)

    @commands.Cog.listener()
    async def on_raw_reaction_remove(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g : g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.remove_roles(role)``` Why doesn't this work?
robust fulcrum
vale wing
slate swan
robust fulcrum
vale wing
#

They can protect from that only if they don't grant user sudo access

paper sluice
#

oh i was scrolled up

robust fulcrum
#

No i mean where would I get url stuff

vale wing
robust fulcrum
paper sluice
shrewd apex
scarlet aurora
paper sluice
vale wing
shrewd apex
#

βœ…

vale wing
#

Yes the most correct one

paper sluice
#
async with ClientSession() as session:
  async with session.get(url) as response:
      ...

shrewd apex
#

await session.get() as resp:

slate swan
vale wing
#

Aiohttp code samples started raining down in the channel for a bit

slate swan
#

lmao

shrewd apex
#

i am on phone otherwise I would have typed to :kek:

robust fulcrum
#
    @commands.command()
    async def pypi(self,ctx,package):
        url = f"https://pypi.org/pypi/{package}/json"
        async with aiohttp.ClientSession() as session:
            response =  await session.get(url)
            if response.status == 404:
                embesd = discord.Embed(title="404", description="package not found",color=discord.Color.red())
                await ctx.send(embed=embesd)
            else:
                resp = json.loads(response.text)
                verison = resp['info']['version']
                summary = resp['info']['summary']
                embesd = discord.Embed(title=f"{package} v{verison}",description=summary,color=discord.Color.green())
                embesd.url = resp['info']['package_url']
                await ctx.send(embed=embesd)

Now?

vale wing
#

That dude kinda thought that get was a staticmethod of ClientSession

austere gust
#

I install "fivem" but when I write "import fivem" vscode doesn't recognize it

slate swan
#

json.loads πŸ˜”

vale wing
slate swan
paper sluice
#

yes pretty much

slate swan
#

nvm im slow

robust fulcrum
robust fulcrum
#

πŸ˜‚ me using asyncio and aiohttp but i still don't know what's asynchronous

vale wing
#

My brain was very slow when I was writing state machine behaviours and they were smoking grass

shrewd apex
#

best make a connection object with the bot then use that throughout

vale wing
#

There are some examples about good practices in their docs iirc

slate swan
#
import aiosqlite

#async function uwu
conn = await aiosqlite.connect("uwu.db")
robust fulcrum
slate swan
#

nvm

#

I should read the convo but meh

robust fulcrum
vale wing
shrewd apex
#
async def main():
     async with aiohttp.ClientSession() as session:
          async with bot:
                bot.con = session
                await bot.start(token)
asyncio.run(main())
#

rip indents

restive osprey
#

I wanted to use a rust function inside a python program in replit.
I understand that I need to create a library first to use it
what should be name extension and content inside files
to do it?

shrewd apex
#

thats why i don't type in phone

vale wing
robust fulcrum
shrewd apex
#

u can do it in a setup hook to but that's longer to type

vale wing
#

Use await response.json()

shrewd apex
#

so it's tough in phone

restive osprey
shrewd apex
#

but basic usage is till same

#

yep

austere gust
#

Can any1 help me???? I did "pip install fivem" but my vscode thinks there is no module named fivem. I have already restarted vscode.

robust fulcrum
#

How can we close connection in aiohttp?

slate swan
vale wing
#

Too bad

shrewd apex
#

bot is just a class u are only assigning a connection object as class variable

shrewd apex
vale wing
restive osprey
#

how can I store a variable whose value don't change even after bot went offline?

robust fulcrum
#

I got this error now
(A lot of errors) :X

shrewd apex
#

pool is used for threading

#

hence completing the action of multiple tasks at one time

scarlet aurora
#
@commands.Cog.listener()
    async def on_raw_reaction_add(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g: g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.add_roles(role)

    @commands.Cog.listener()
    async def on_raw_reaction_remove(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g : g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.remove_roles(role)```Does anyone know why it's not giving me the reaction role?
paper sluice
#
async with bot:
  async with ClientSession() as session:
      bot.session = session
      await bot.start()

i use this

vale wing
shrewd apex
#
Using Pool. The Pool class in multiprocessing can handle an enormous number of processes. It allows you to run multiple jobs per process (due to its ability to queue the jobs). The memory is allocated only to the executing processes, unlike the Process class, which allocates memory to all the processes.
robust fulcrum
scarlet aurora
vale wing
#

Database connection pool? So basically one connection can't execute multiple queries at the same time even if it's async (at least this is for postres) and creating connection every time you execute a query is expensive operation, pools just create connections faster

paper sluice
#

ya it is πŸ˜”

paper sluice
#

async code imo is disgusting

scarlet aurora
#

@robust fulcrum there is no errors

paper sluice
#

then subscript

robust fulcrum
paper sluice
#

lol

robust fulcrum
#

Oof i forgot to

#

Discord already async don't make it more async πŸ˜‚

scarlet aurora
#
@commands.Cog.listener()
    async def on_raw_reaction_add(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g: g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.add_roles(role)

    @commands.Cog.listener()
    async def on_raw_reaction_remove(self, payload):
        message_id = payload.message_id
        if message_id == 991482553959731352:
            guild_id = payload.guild_id
            guild = discord.utils.find(lambda g : g.id == guild_id, self.bot.guilds)

            if payload.emoji.name == 'roblox':
                role = discord.utils.get(guild.roles, name="Roblox")
            elif payload.emoji.name == 'minecraft':
                role = discord.utils.get(guild.roles, name="Minecraft")
            elif payload.emoji.name == 'brawlhalla':
                role = discord.utils.get(guild.roles, name="Brawlhalla")

            member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)
            if member is not None:
                await member.remove_roles(role)```Why wont I get the role from the reaction, is there something I'm doing wrong, there are no errors?
vale wing
#

2.0 is max level async compared to previous ones idk they made async everything possible

robust fulcrum
austere gust
#

Any1 has any idea why my vscode isn't recognizing "fivem" as an import? I did "pip install fivem"

paper sluice
#

because its vscode

austere gust
austere gust
sick birch
scarlet aurora
sick birch
#

Use bot.get_guild(id) instead of guild = discord.utils.find(lambda g : g.id == guild_id, self.bot.guilds)

#

and also use guild.get_member(id) instead of member = discord.utils.find(lambda m : m.id == payload.user_id, guild.members)

paper sluice
#
async def main():
    async with discord.Client() as client:
        async with aiohttp.ClientSession() as session:
            client.session = session
            async with aiosqlite.connect("file.db") as connection:

                client.connection = connection
                await client.start("token")

try this

robust fulcrum
#

Guys give me a challenge for a command in my discord bot (I'll make the comamnd which you give me for challenge)

sick birch
#

Make a good bot core/bot base infrastructure so that it's easily expandable πŸ˜‰

#

Probably a better way than nesting 3 context managers would just be to call them individually, and use .close() on each of them afterward

robust fulcrum
paper sluice
#

i do like this in hikari

    async def set_http_connection(self, event: StartingEvent) -> None:
        """ Setting up the ClientSession just before the bot connects to discord """
        self.session = ClientSession()
        
    def close(self):
        """ Closes the ClientSession before closing """
        self.session.close()
        super().close()

u can setup multiple in the setup_hook then close it with the bot

shrewd apex
sick birch
#

Same as now, bind it to your client instance

maiden fable
#

PoV: They use 3.9

robust fulcrum
#

I'll do it

shrewd apex
robust fulcrum
#

Till tommorow

robust fulcrum
shrewd apex
#

make a bar graph either horizontal or vertical

#

u can use the squares available in reactions

robust fulcrum
#

Will pie chart work or line chart?

shrewd apex
#

i dont think u can make pie chart or line with reactions

robust fulcrum
#

Piechart would be more good

shrewd apex
#

just make one with reactions as a progress bar

robust fulcrum
shrewd apex
#

alr

robust fulcrum
#

@shrewd apex how much should be max values ?

#

Like max number of options in a poll

#

10 ig?

shrewd apex
#

10

robust fulcrum
#

Ok

#

Can I ask one thing?

shrewd apex
#

sure

robust fulcrum
#

How can I make arguments optional?

shrewd apex
#

make it default

#

like arg=None

robust fulcrum
#

Oh k

#

Like we do in other commands

#

Good night sweet dreams

frozen patio
#

Ok

flint isle
#

how can I include all text after getting the variables in the message one so i can use
$session saturday 2-7pm I SEE YOU
i need the i see you to be in the message var


    @commands.command(name='session', description='Sends the session information for duengeons and dragons this week')
    async def session(self, ctx, Day, time, message):
        embed = disnake.Embed()
        embed.title = f"**Session Information**"
        embed.description = f"Dnd session information for this week.\n\n**Day:** {Day}\n**Time:** {time} \n**Message:** {message}"
        embed.set_footer(text="Notification System")
        embed.set_author(name=f'{ctx.author.name}', icon_url=f"{ctx.author.avatar}")
        await ctx.send(embed=embed)```
paper sluice
#

async def session(self, ctx, Day, time, *, message):
this puts all the text after time inside message

flint isle
#

ok thank yoiu

slate swan
#

just create slash commands instead

#

πŸ‘Ž

paper sluice
#

slash commands are better than normal ones, in every way. Change my mind

shrewd apex
placid verge
#

guys how to check if a user has any of these roles?

paper sluice
placid verge
#

I'm doing it like this, it seems like its not working:

@commands.has_role([1234567899,125125215,12509095,35215215])
pliant gulch
#

Emoji converters, etc

#

Code block cleaner converters

paper sluice
#

i would just make a converter and type hint with that

pliant gulch
#

Yes but with slash commands you cannot!

pliant gulch
#

Slash commands are restricted to the types made by discord

#

My whole point being

paper sluice
hushed galleon
paper sluice
#

ig u can accept it as a str ( or some other basic type ) and pass it in ur convertor, but yea they are extra lines

hushed galleon
#

then you should use the other decorator @commands.has_any_role(1, 2, 3, ...)

#

note that you dont need to pass it as a list

#

in fact the has_role() check is only meant to take a single ID/name

hushed galleon
vocal snow
#

What are the possible reasons this can occur when setting a local file as the embed image? (stuck loading)

pliant gulch
#

I mean, the normal converters would work. I’m thinking about custom ones rn with no type affiliation to discord

shrewd apex
#

corrupted most likely

hushed galleon
#

well yeah 2.0's transformers are the slash equivalent to converters in text commands

pliant gulch
#

I’m asking if custom ones work

#

Cause discord requires a type enum to be passed to the API when registering

#

Of course, you could always just force all custom converters to be of STRING type

hushed galleon
#

transformers are custom

#

you can specify what type you want it to be on discord, and the transform classmethod will receive the corresponding type

cold tide
#

Can anyone help me invite my bot to my server?

#

struggling to rn.

hushed galleon
dull terrace
#

portal sprites are drawn, think they turned out nice 7739monkathink

paper sluice
hushed galleon
# cold tide Can anyone help me invite my bot to my server?

there's an invite link generator in the OAuth2 -> URL Generator section in the discord developer page
go to there, select the "bot" scope (and applications.commands if you're using slash commands), pick your server permissions and the link will be on the bottom

pliant gulch
cold tide
hushed galleon
#

the URI is only needed if you use scopes other than bot/applications.commands

#

at least afaik

brazen torrent
slate swan
#

Dear. I try to start the bot, it gives an error

#

need help to create a embed command.
my error: AttributeError: 'Client' object has no attribute 'command'

hushed galleon
slate swan
scarlet rune
#

update your discord lib

slate swan
slate swan
scarlet rune
#

discord.Bot your bot is? is it not?

slate swan
#

I found the error

slate swan
scarlet rune
slate swan
#

not exactly

scarlet rune
#

sorry

slate swan
#

2.0 is in github and has not been released

scarlet rune
#

i don't use dpy i use disnake, not sure

slate swan
#

you would need to do pip install git+https://github.com/Rapptz/discord.py

#

and ofc you would need git

#

iirc ashleys tutorial shows how to upgrade to 2.0 @slate swan check pins!

shell wing
#

Can I make a bot to check if a bot went offline or not ?
Bot1 - checks if bot2 is offline
If true : then bot1 sends alert
Else : well nothing

slate swan
shell wing
slate swan
#

Damn, do you need to install git too?

scarlet rune
slate swan
slate swan
unkempt canyonBOT
#

property status```
The member’s overall status. If the value is unknown, then it will be a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)") instead.
scarlet rune
#

You want to use a task loop for that i guess

slate swan
scarlet rune
#

Can i fetch my own bot's status? cause it always returns None, i don't know if it's possible to get the bot own status

glad cradle
#

why you should want to get the status of your own Bot

latent grove
#

In the proccess of building a bot what term would i use pull a username {user} or {player}

slate swan
unkempt canyonBOT
slate swan
#

it can return a member object of your bot so just check the status with Member.status

#

!d discord.Member.status

unkempt canyonBOT
#

property status```
The member’s overall status. If the value is unknown, then it will be a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.10)") instead.
slate swan
austere gust
#
@tasks.loop(seconds = 60) # repeat after every 60 secondss
async def myLoop():
    await bot.wait_until_ready()
    async with aiohttp.ClientSession() as session:
        csakmegnezni = 0
        async with session.get('http://87.237.52.47:30226/players.json') as response:
            csakmegnezni = 1
        if csakmegnezni == 0:
            print("nem lepett bele a kodba")
        else:
            print("nincs remeny")

            


myLoop.start()```
Yo. This is just a test, and nothing is being printed, but "csakmegnezi" should be printed.
austere gust
#

if it can response, it will be 1

#

still nothing

latent grove
#

Yea but if object = 1 print object or if object == 1 aka true print object

austere gust
#

The terminal is still empty..

latent grove
#

Find where its stopping and recorrect it there

slender cypress
#

Does discord.py have support for buttons in embeds?

slender cypress
#

I tried looking for it a while ago
couldnt find it in the documentation

#

I must’ve missed it

latent grove
# austere gust wdym

Code runs but no output prints it means it working but it doesnt send output because it stops somewhere add print to few lines and find out where stops and you can fix the err there

austere gust
#

@slender cypress u mean like this?

slate swan
latent grove
slender cypress
slate swan
slender cypress
#

also, how would I make a bot listen to all messages until a certain keyword is typed?

slate swan
#

i tested it out and thats the only reason why it would behave like that, the parent context manager got closed after the first request lol

austere gust
#

I added a bonus print (print ('asd2'). And it is get printed so we know where is the error

@tasks.loop(seconds = 60) # repeat after every 60 secondss
async def myLoop():
    await bot.wait_until_ready()
    async with aiohttp.ClientSession() as session:
        print('asd2')
        csakmegnezni = 0
        async with session.get('http://87.237.52.47:30226/players.json') as response:
            print('asd')
            csakmegnezni == 1
        if csakmegnezni == 0:
            print("nem lepett bele a kodba")
        else:
            print("nincs remeny")```
latent grove
#

Add while true statement

slate swan
#

no no

austere gust
#

this was only a test

slate swan
#

you can always open the session without context managers and close it yourself

#

Dear. installed git via installer restarted PUTTY and it still doesn't install

latent grove
slate swan
austere gust
#

So I wanted to know what it prints if the server is offline

slate swan
latent grove
slate swan
#

anyways got to go, cheers❀️

austere gust
#

bai

latent grove
slate swan
smoky cedar
#

I'm so confused... why am I getting this error in pycharm with the exact same scope and the exact same object as the method above already using sp?

warm tulip
#

hey guys

#

how i can make my bot that in a selected channel when someone say hello it says hi

#

?

scarlet rune
slate swan
#

make a on_message listener and add a check if message.channel.id == ur channel I'd and message.content == "hello" then send message.reply("hi")

slate swan
paper sluice
slate swan
#

I'll back home on 7th ig

paper sluice
#

one more week

slate swan
#

Wait let me get that role

#

it looks cool

paper sluice
#

lol

slate swan
paper sluice
slate swan
paper sluice
#

put atleast {}

slate swan
#

okay ty

paper sluice
slate swan
slate swan
#

It's mostly cool until you see the themes

paper sluice
slate swan
#

Simply read the error