#discord-bots

1 messages · Page 711 of 1

slate swan
#

i sent that before in read that other msg

tiny ibex
#

Cuz someone on the same IP as you abused the API

slate swan
#

dang

#

would change the command names to the language that the user set by the command command description etc to change the language from Polish to another language that the user set by the command

#

prob someone running an ssh server or alucard lmao

#

why doesnt this work?

tiny ibex
tiny ibex
slate swan
#

out of all the flagship selfbots alucard is the most resource heavy

slate swan
tiny ibex
slate swan
#

there is so much trashed code that it looks worse than react lmao\

soft lynx
#

Ok, so basically everything works except when you send the command, it returns every single role, including the ones that users have
@slate swan gn & thank you for your help so far, im going to bed so ill respond in the morning

soft lynx
slate swan
#

@slate swan

slate swan
tiny ibex
#

Alucard dumb fr

slate swan
#

how do i make the client wait untill its ready to recive messages?

slate swan
slate swan
slate swan
hardy yoke
#

repl will rate limit you from time to time cus all the bots share the same IP. Only permanent solution is paying for a host

slate swan
#

function*

slate swan
#

i want the client to wait for onready then display messages

#

on ready is an event when your bot connects to the gateway

cedar stream
unkempt canyonBOT
#

await wait_until_ready()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits until the client’s internal cache is all ready.
slate swan
#

thank you

cedar stream
#

Np

slate swan
cedar stream
#

🤷🏼‍♂️

slate swan
#

smh

slate swan
slate swan
#

ok

slate swan
#
async def on_message(ctx):
    async user.wait_until_ready()
    import os
    os.system("clear")
    global currentchannel
    global currentguild
    if currentguild != "DM":
        currentguild = int(currentguild)
    try:
        ctx.channel.id
        ctx.guild.id
    except:
        return
    if ctx.channel.id == currentchannel:
        # await ctx.delete()
        msg = ctx.content
        msghistory.append(ctx.guild.name + " | channel :: " + ctx.channel.name + " | " +fore_fromhex(ctx.author.display_name, getcolor(ctx.author)) +colorama.Back.RESET + colorama.Fore.RESET + " :: " + msg)
    for mssg in msghistory:
       print(mssg,colorama.Back.RESET, colorama.Fore.RESET)

yes this is "selfbot" code yes this is. custom client but its just a cli port just pls help me debug

cedar stream
#

Not async

slate swan
#

oH

#

LMAO

slate swan
slate swan
# slate swan oH

async keyword is for making asynchronous functions await is to use one as a coro

#

yep got it

cedar stream
#

Oh wait, It’ s a self-bot?

slate swan
#

no

#

c l i e n t

cedar stream
#

Oh ok

slate swan
#

why is your client called user?

#

:O
cli-ent :D
cli client

tiny ibex
cedar stream
slate swan
#

^

slate swan
tiny ibex
slate swan
#

its selfbot wording but its client code

slate swan
tiny ibex
#

Well anyways let's leave it

cedar stream
slate swan
#

is that like "i know thats a selfbot" or "i get it im not that dumb"

slate swan
#

Sorry I should be more specific

#

genuenly confused

slate swan
slate swan
slate swan
#

me either

slate swan
#

i mess up my codes from spelling for as in fro

cedar stream
slate swan
#

took me 10 min to figure out

tiny ibex
slate swan
tiny ibex
#

But if it isn't very cooll

slate swan
#

then nobody cares!

tiny ibex
#

I am gonna use selfbotsss

cedar stream
tiny ibex
#

(If they are legal)

slate swan
#

you can get sued

tiny ibex
slate swan
#

anyone know fix?

quick gust
tiny ibex
#

At max your ID banned

cedar stream
#

Cus custom clients are basically same shit

slate swan
#

nope just sued

quick gust
slate swan
quick gust
#

why would u get sued for making a selfbot on discord

tiny ibex
slate swan
quick gust
tiny ibex
#

I literally tried to use selfbots on whatsapp

#

And I used selfbots on discord

slate swan
#

the original java discord.cli devs got threatend with a suit

tiny ibex
#

Even got banned thrice

cedar stream
slate swan
#

i got banned bc i said "nazi"

tiny ibex
slate swan
slate swan
#

it had selfbot shit in it and a token stealer

tiny ibex
cedar stream
tiny ibex
slate swan
#

the main charge was breach of TOS on the grounds of selfbotting

tiny ibex
#

selfbotting is not something major

cedar stream
slate swan
#

tbh i dont think they knew abt the token stealers

cedar stream
cedar stream
tiny ibex
slate swan
#

who?

cedar stream
slate swan
#

i just use powecord

slate swan
#

bc they are actual scams

cedar stream
#

Ohh yes

slate swan
#

Why are we even discussing about selfbots

tiny ibex
#

!ot

unkempt canyonBOT
cedar stream
#

.topic

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

Suggest more topics here!

slate swan
#

even BetterDiscord and Bluecord are against Tos

cedar stream
slate swan
#

Mhm it just edits your discord client

tiny ibex
#

I saw one of the plugins which is like hella cool it allows spotify listen along without premium

#

I wonder how that is possible??

cedar stream
#

U can just make a gui that makes request to discord api with ur user token as Authorization header and u have a custom client

tiny ibex
#

And is that possible with bots??

cedar stream
tiny ibex
#

pause music together, play the same song etc.

cedar stream
#

Mby it uses a token from the other person

tiny ibex
#

How can it get other person's token

#

I tried to know bout it but I was too dumb to understand JS

cedar stream
#

Well if user gives this plugin perms via oauth, client will get access token

#

From spotify

#

But I’ m not sure if that is how they did it

tiny ibex
cedar stream
tiny ibex
#

If spotify not installed it opens on web browser

slate swan
#

Hm

cedar stream
#

Looks like spotify has a fat client which is hard to believe

tiny ibex
boreal ravine
#

discord is just jealous

mental kraken
#

That's not the main reason

boreal ravine
#

malicious stuff? i know that

mental kraken
#

Client modifications are dangerous because you're risking to install a malicious plugin

tiny ibex
#

Many plugins abuse API

boreal ravine
#

¯\_(ツ)_/¯

boreal ravine
#

ive never seen a malicious bd plugin before

tiny ibex
#
        const plugin = (Plugin, Library) => {
            const { DiscordModules, Patcher, WebpackModules } = Library;
            return class SpotifyListenAlong extends Plugin {
                constructor() {
                    super();
                }

                start() {
                    const { ActionTypes: { SPOTIFY_PROFILE_UPDATE: type } } = DiscordModules.DiscordConstants
                    Patcher.instead(DiscordModules.DeviceStore, 'getProfile', ( _, [id, t] ) =>
                        DiscordModules.Dispatcher.dispatch({
                            type,
                            accountId: id,
                            isPremium: true
                        })
                    )
                    Patcher.instead(WebpackModules.getByProps("isSpotifyPremium"), 'isSpotifyPremium', () => true)```
Things like these prolly break TOS
#

See the last line

mental kraken
#

Yeah if discord didn't make proper tos for that, all issues with plugins would've been their fault

#

Formally

tiny ibex
heavy folio
#

is it possible to get the messages a user sent in dms with the bot

boreal ravine
#

plugins dont hurt anyone 🙏

mental kraken
tiny ibex
heavy folio
tiny ibex
mental kraken
#

async for msg in channel.history(limit=None):
Where channel is the DM channel

heavy folio
#

hmm

boreal ravine
heavy folio
#

thanks

dreamy sluice
#

How do I send an animated emoji with my bot?

#

I tried putting it as <a:name:id>, but it doesn't work.

heavy folio
#

it doesnt work in some fields of the embed

boreal ravine
heavy folio
#

ye

slate swan
#

How to give animated emoji in bot messages

tough lance
slate swan
#

How can I make anyone who invites the bot to their server will automatically join my server

visual island
#

no

slate swan
#

I prefer sending a message as "thanks for adding me to the server" with related links in it

#

¯\_(ツ)_/¯

#

Inside the server itself

tawdry perch
cedar stream
tacit storm
#

i wonder how i would setup a mongodb database for discord.py on a digitalocean vps...

does anyone have an idea on how to do that?

slate swan
tacit storm
cedar stream
tacit storm
#

hm.

cedar stream
#

Like u can

#

But idk if they let u

#

Use mongo atlas

slate swan
#

You can create a mongodb server....

#

yea

#

Or , if you want to save stuff locally use sqlite3 or something

tacit storm
cedar stream
#

Look

#

You dont run mongo atlas on vps

#

Ur code for discord bot runs on ur vps

tacit storm
slate swan
#

It has a python example

tacit storm
#

ah thanks

cedar stream
cedar stream
slate swan
#

Tho ,it's preferred to use motor instead of Pymongo for Discord bots

tacit storm
#

alr

cedar stream
#

Or MotorEngine

tacit storm
slate swan
tacit storm
#

ive heard sqlite isn't great if you're bot is in a bit of servers though/

cedar stream
#

I mean, if you wanna make a public bot u wont want to use sqlite

slate swan
#

I want to make so that it automatically join

#

without asking the user

slate swan
#

Without the consent of user

heavy folio
slate swan
heavy folio
#

that sounds annoying

cedar stream
slate swan
heavy folio
slate swan
#

instead of always reading it

tacit storm
#

just forget about it.

#

ill ask in another server

cedar stream
heavy folio
#

💀

cedar stream
#

Not discord bots

slate swan
#

Yea ofcourse for them

cedar stream
#

Istg that guy will go on another server and ask how he can run mongo on vps and they will tell him to use mongo atlas

dreamy sluice
cedar stream
#

Is the bot in the server with that emoji?

dreamy sluice
#

Ye

#

This is what the bot does

dreamy sluice
#

lol

heavy folio
#

idt the bot has access to the emoji

dreamy sluice
#

Hm

heavy folio
#

try doing ctx.message.add_reaction(emoji) and see if any error returns

dreamy sluice
#

What should I add in the parameter for emoji?

cedar stream
#

!d discord.Client.get_emoji

unkempt canyonBOT
dreamy sluice
#

Mkay

heavy folio
cedar stream
#

Try getting emoji with this

heavy folio
#

oh yeah

cedar stream
#

And send it

cloud dawn
#

Is :aclock: emoji in your guild?

dreamy sluice
heavy folio
#

no need to be in the guild

#

needs to share a guild with the bot

cedar stream
#

Bots have free partial nitro ig

cloud dawn
#

Makes no sense ig

cedar stream
#

And they can send animated emojis

cloud dawn
#

Never work too much with emoji's so i dunno

heavy folio
dreamy sluice
heavy folio
#

any errors?

dreamy sluice
#

No errors

#

It just, doesn't return it

heavy folio
#

do you have an error handler

dreamy sluice
#

What's that?

heavy folio
dreamy sluice
#

I did

#

That doesn't return anything at all

heavy folio
#

show code

dreamy sluice
#

ye one sec

heavy folio
#

nvm

dreamy sluice
#
@bot.command()
async def timer(ctx):
  timer = discord.Client.get_emoji(924959483589971978)
  await ctx.send(timer)
dreamy sluice
#

yes

dreamy sluice
#

O_o

heavy folio
#

bot.get_emoji()

dreamy sluice
#

oh

heavy folio
#

you have to use an instance of it, not a class object

dreamy sluice
#

oh

heavy folio
#

ye

#

you should read this btw

slate swan
#

anyone know why its underlined

heavy folio
#

There's a difference between a class and an instance. Think of it like this:

  • A class is like a blueprint, or a concept. It defines what something should have, but it's not the same as actually having it.
  • An instance is the 'realized' version of the class, it contains everything that the class defines should be on it, but you can actually access and interact with these features.

Let's consider the Cat. We know a Cat has a name and an age, but Cat.age won't work, because Cat isn't an actual cat, it just represents the concept of a cat. It's like asking "What is the age of a cat?" - it doesn't make sense, because we need to have an actual cat.

mimi on the other hand is an instance of a Cat - it has everything a Cat should have. Maybe mimi was constructed, like mimi = Cat("Mimi", age=4), or maybe mimi was retrieved from somewhere else, like house.cats[0], but in any case, it has everything we need, and mimi.age will rightfully give us 4.

There are many situations in Object Oriented Programming where you will need an instance instead of a class to perform an operation properly (in fact, you almost always need an instance instead of a class), and these cases will usually be documented.
You should learn a good amount about Object Oriented Programming before working extensively with discord.py.

https://i.imgur.com/dHYdejb.png

Read more about classes and instances here:

Credit: devon

slate swan
#

ive tried import random.choice and import choice

heavy folio
slate swan
#

which what

#

i tried both

dreamy sluice
heavy folio
#

because random.choice isnt a package

dreamy sluice
#
@bot.command()
async def timer(ctx):
  print("sending emoji")
  timer = bot.get_emoji(924959483589971978)
  await ctx.send(timer)
heavy folio
#

it's just import random then random.choice()

unkempt canyonBOT
#

class discord.Emoji```
Represents a custom emoji.

Depending on the way this object was created, some of the attributes can have a value of `None`...
dreamy sluice
#

O-o

heavy folio
#

docs not loading for me hang on

slate swan
#

ah

#

got it thanks

tender charm
#

Hello, I am trying to make broadcast command by my way, and I have code in this form: ```@bot.command()
@commands.has_permissions(administrator=True)
async def bc(ctx):
await ctx.send('Type header text: ')
header = await bot.wait_for('message')

await ctx.send('Type footer text: ')
footer = await bot.wait_for('message')

embed = discord.Embed(title=header, description=footer, color=0x66d9ff)
await ctx.send(embed=embed)``` Header text type working, footer too, but It will not send embed into text channel. Can anybody help me?
wary ravine
#

how do i send that message where only the command author can see it

cloud dawn
wary ravine
cloud dawn
wary ravine
#

discord-interactions

heavy folio
dreamy sluice
#

Um, did I get ghost pinged?

slate swan
#

sorry i keep asking do yk why this doesnt work. why loop is underlined

heavy folio
#

what is global loop

#

i mean what's that var

slate swan
#

i used a youtube tutorial for looping. I was curious what global loop was too

wary ravine
#

remove global

#

no

#

remove global loop

cloud dawn
wary ravine
#

and define it at the start of your code

wary ravine
unkempt canyonBOT
#

When adding functions or classes to a program, it can be tempting to reference inaccessible variables by declaring them as global. Doing this can result in code that is harder to read, debug and test. Instead of using globals, pass variables or objects as parameters and receive return values.

Instead of writing

def update_score():
    global score, roll
    score = score + roll
update_score()

do this instead

def update_score(score, roll):
    return score + roll
score = update_score(score, roll)

For in-depth explanations on why global variables are bad news in a variety of situations, see this Stack Overflow answer.

cloud bison
#

my bot send to message per command and the code has only one sent function. how to fix?

cloud bison
#

i have this code

if mem == None :
            mem = ctx.author.id
            fin = {
                f"{mem}" : { "$gt": "1"}
            }
            for i in mycol.find(fin):
                k = i[f"{mem}"]
                await ctx.send(f"""
                your id is : 
                {k}
            """)

when i use the command the bot response twice

worn condor
cloud bison
#
else :
            
            fin = {
                f"{mem.id}" : { "$gt": "1"}
            }
            mycol.find(fin)
            k = i[f"{mem.id}"]
            await ctx.reply(f"""
                 id <@{mem.id}>'s  
                {k}
            """)
worn condor
cloud bison
worn condor
#

give me reference of the command

#

and ur combined code in codeblocks

#

then i maybe able to help u better

#

@cloud bison

cloud bison
#

did you mean the full code?

worn condor
#

running twice etc

cloud bison
#

my problem is when i use the command the bot respond two times theres no error in the code

worn condor
#

hm

#

where is the bot running?

cloud bison
#

replit

#

it's only this command

#

who has this error

cloud dawn
worn condor
#

not on ur machine

cloud bison
worn condor
cloud bison
worn condor
#

@cloud bison what is mem?

cloud bison
worn condor
cloud bison
#

  
  @commands.command()
  async def id(self, ctx, mem : discord.Member = None ):
      myclient = pymongo.MongoClient(os.environ['URLM'])
        
      mydb = myclient["players"]

      mycol = mydb["id"]
      try :

        if mem == None :
            mem = ctx.author.id
            fin = {
                f"{mem}" : { "$gt": "1"}
            }
            for i in mycol.find(fin):
                k = i[f"{mem}"]
                await ctx.send(f"""
                your id is 
                {k}
            """)

            
            
        else :
            
            fin = {
                f"{mem.id}" : { "$gt": "1"}
            }
            mycol.find(fin)
            k = i[f"{mem.id}"]
            await ctx.reply(f"""
                <@{mem.id}>'s id
                {k}
            """)

        
      except Exception:
          await ctx.send("""
          use 
          "setid
       
          
          """) 
worn condor
#

ok

#

looking into ur code rn

cloud dawn
# cloud bison ```py @commands.command() async def id(self, ctx, mem : discord.Member =...
  @commands.command()
  async def id(self, ctx, mem: discord.Member = None ):
      myclient = pymongo.MongoClient(os.environ['URLM'])
      mydb = myclient["players"]
      mycol = mydb["id"]

      mem = mem or ctx.author

      try:
          fin = {
              f"{mem.id}" : { "$gt": "1"}
            }
          for i in mycol.find(fin):
              k = i[f"{mem.id}"]
              await ctx.send(f"your id is {k}")
      except Exception:
          await ctx.send("use \"setid") 
``` let's shorten it first...
tidal hawk
#

How many different cogs may cause a error

boreal ravine
#

and why are you defining ur mongo client inside ur function

worn condor
#

yes i thought that

cloud bison
boreal ravine
tidal hawk
#

hm

#

I have 12 cogs. When i unload 1 cog, then it still runs

#

Never had a issue in past, but now when i created some more, problems started to happen

worn condor
#
  
  @commands.command()
  async def id(self, ctx, mem : discord.Member = None ):
      myclient = pymongo.MongoClient(os.environ['URLM'])
        
      mydb = myclient["players"]

      mycol = mydb["id"]
      try :

        if mem == None :
            mem = ctx.author.id
            fin = {
                f"{mem}" : { "$gt": "1"}
            }
        for i in mycol.find(fin):
             k = i[f"{mem}"]
             await ctx.send(f"your id is {k}")

cloud bison
boreal ravine
tidal hawk
#

Say, I have 1 cog, which has a loop inside. The loop prints something every 10 minutes. NOW when i unload the cog, it still keeps printing like nothing has happened.

#

Another issue. I have a 3 hour loop which outputs something into chat. Instead of outputing every 3 hours, outputs the results like 25 times within 3 hours

#

crazy.

cloud dawn
tidal hawk
#

And now when i unload it, the loop still keeps running 😅

cloud dawn
#

Inside the cog unload function use stop

#

!d discord.ext.commands.Cog.cog_unload

unkempt canyonBOT
#

cog_unload()```
A special method that is called when the cog gets removed.

This function **cannot** be a coroutine. It must be a regular function.

Subclasses must replace this if they want special unloading behaviour.
cloud dawn
#

!d discord.ext.tasks.Loop.stop

unkempt canyonBOT
#

stop()```
Gracefully stops the task from running.

Unlike [`cancel()`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop.cancel "discord.ext.tasks.Loop.cancel"), this allows the task to finish its current iteration before gracefully exiting.

Note

If the internal function raises an error that can be handled before finishing then it will retry until it succeeds.

If this is undesirable, either remove the error handling before stopping via [`clear_exception_types()`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop.clear_exception_types "discord.ext.tasks.Loop.clear_exception_types") or use [`cancel()`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop.cancel "discord.ext.tasks.Loop.cancel") instead.

New in version 1.2.
tidal hawk
#

But can you explain or guess why the loop runs 25 times within 3 hours?

cloud dawn
tidal hawk
#

But im not reloading

#

not doing anything

cloud dawn
#

Where do you load your cogs?

tidal hawk
#

when i start the bot?

cloud dawn
#

Yeah but where? on_ready?

tidal hawk
cloud dawn
#

Hmm do you import the main file somewhere?

tidal hawk
#

nopee

#

First I tought my raspberry is broken or smth, but the problem keeps happening on my pc aswell

cloud dawn
#

What do you expect is causing this?

#

I recommend adding the cog unload function though.. But the 25 times in 3 hours is still a mystery since i have thought of most my theories.

#

Best to add a print in the init to see if it gets re-executed.

tidal hawk
#

Okay, will do

#

Been programming discord bots for a year and now its first time when such thing is happening to me xd

cloud dawn
#

Most of these questions you have prob asked yourself aswell.

tidal hawk
#

Mhm

cloud dawn
#

Just ping me if anything pops up.

velvet tinsel
#

Pandabweer ♥️

boreal ravine
#

Did anyone know that if you get rate limited on replit

cloud dawn
boreal ravine
velvet tinsel
#

😳

boreal ravine
#

yeah

visual island
#

oh, time to bm

slate swan
#

use it in your on_disconnect event

velvet tinsel
#

😭

maiden fable
slate swan
#

😂 imagine using that on your local-host tho

maiden fable
#

Won't work ngl

slate swan
#

it just kills the process with the id 1

maiden fable
#

Oh hmm

#

Rip

velvet tinsel
#

😭

visual island
#

anyone have tried?

cloud dawn
#

Repl.it is still bad nonetheless lol

visual island
#

replit's terminal on phone doesn't work well

visual island
velvet tinsel
#

Replit terrible

cloud dawn
untold token
robust meteor
#

I'm getting this output with the bot deploy on Heroku.

#

This is the code

import discord
from discord.ext import commands, tasks
from discord.commands import slash_command, Option
from pymongo import MongoClient
import os
from dotenv import load_dotenv
load_dotenv()

cluster = MongoClient(os.environ.get('mongodb'))
db = cluster['Data']['logs']

class Logsmesed(commands.Cog):
    def __init__(self, bot):
        self.bot=bot
    @commands.Cog.listener()
    async def on_message_edit(self, before, after):
        find=db.find_one({'guild':after.guild.id})
        if find is None:
            return
        else:
            channelid=find['channel']
            channel=self.bot.get_channel(channelid)
        if before.content!=after.content:
            embed=discord.Embed(
                title=f'Message edited!',
                description=f'**Author:** {before.author.mention}\n**Channel:** {after.channel.mention}',
                colour=discord.Colour.green()
            )
            embed.add_field(name='Before:', value=f'{before.content}', inline=True)
            embed.add_field(name='After:', value=f'{after.content}', inline=True)
            embed.set_footer(text=f'{after.author} | Made by Aung.S#8430.')
            embed.set_thumbnail(url=after.author.avatar.url)
            await channel.send(embed=embed)
        else:
            return
            
def setup(bot):
    bot.add_cog(Logsmesed(bot))```
untold token
#

It gives you 512

cloud dawn
untold token
robust meteor
robust meteor
#

uhh yeah

cloud dawn
robust meteor
robust meteor
#

this is in cog

cloud dawn
untold token
robust meteor
cloud dawn
untold token
#

Because the repl gets resetted, the shared IP changes

#

I knew that for a long time

robust meteor
cloud dawn
robust meteor
#

it work well before this file

robust meteor
# cloud dawn It's just a cog? There is no bot.
from discord.ext import commands, tasks
import os
from discord import Intents, Bot
from keep_alive import keep_alive
from dotenv import load_dotenv
load_dotenv()

intents = discord.Intents.all()
intents.members = True
intents.messages = True

bot=discord.Bot(intents=intents)

for ext in ['cogs.event.logs.logssetup', 'cogs.event.logs.memberupdate', 'cogs.event.logs.messagedelete', 'cogs.event.logs.messageedit', 'cogs.event.logs.newmember', 'cogs.event.logs.removemember', 'cogs.event.logs.userupdate', 'cogs.reactionrole.reactionrole', 'cogs.event.welcomeconfig', 'cogs.general.avatar','cogs.general.stats', 'cogs.general.translate','cogs.general.userinfo','cogs.general.serverinfo','cogs.levelling.levelling', 'cogs.moderation.verify', 'cogs.moderation.kick', 'cogs.fun.image', 'cogs.music.music', 'cogs.music.chess', 'cogs.music.betrayal', 'cogs.music.poker', 'cogs.general.dm', 'cogs.fun.pop', 'cogs.moderation.nickname', 'cogs.ticketing.ticketing', 'cogs.fun.fasttype', 'cogs.general.wikipedia', 'cogs.fun.userphone', 'cogs.fun.connect', 'cogs.moderation.mute', 'cogs.general.calc', 'cogs.chatbot.chatbot', 'cogs.globalchat.globalchat']:
    bot.load_extension(ext)

keep_alive()
print(str(os.environ.get('TOKEN')))
bot.run(str(os.environ.get('TOKEN')))```
#

if you want

cloud dawn
#

Lol how to cut yourself in the fingers.

robust meteor
#

what do you mean?

cloud dawn
#

We're not allowed to help with music bots here 👀

untold token
#

Also you could use a much better way to load cogs

#

No not the os way, even better

#

using pkgutil

robust meteor
cloud dawn
robust meteor
#

but that isn't a problem

boreal ravine
robust meteor
#

I ask help with just audit logs command

cloud dawn
cloud dawn
#

I just told you pithink

worn condor
untold token
#
import pkgutil
 ​        ​for​ ​m​ ​in​ ​pkgutil​.​iter_modules​([​exts​]): 
 ​            ​# a much better way to load cogs 
 ​            ​module​ ​=​ ​f"cogs.​{​m​.​name​}​" 
 ​            ​try​: 
 ​                ​bot.​load_extension​(​module)
                   
 ​                ​print(​f"Loaded extension '​{​m​.​name​}​'"​)
 ​            ​except​ ​Exception​ ​as​ ​e​: 
 ​                ​traceback​.​format_exc​(​e​)
worn condor
#

which doesnt play from yt link

untold token
#

Lavalink also scrapes

robust meteor
#

there is no music feature in this bot

worn condor
#

nvm

#

lets help

#

aung

robust meteor
boreal ravine
worn condor
#

hi kayle

cloud dawn
worn condor
#

and to ur question i wont help

#

coz idk myself

robust meteor
#
from discord.ext import commands 
from discord_together import DiscordTogether 
from discord.commands import slash_command
import os

class YoutubeTogetherCog(commands.Cog): 
    def __init__(self, bot): 
        self.bot = bot
    @commands.Cog.listener()
    async def on_ready(self): 
        self.togetherControl = await DiscordTogether(os.getenv('TOKEN'))
    @slash_command(
        name='youtube',
        description='Watch youtube together.'
    )
    async def youtube(self, ctx): 
        link = await self.togetherControl.create_link(ctx.author.voice.channel.id, 'youtube')
        embed=discord.Embed(
            description='**A WILD YOUTUBE TOGETHER APPEARS!**',
            colour=discord.Colour.green()
        )
        embed.add_field(name='Click the button below to watch.', value='This is beta feature so it works only on PC.', inline=False)
        embed.set_thumbnail(url='https://docs.discord-together.ml/1.2/assets/DT-Logo-New.png')
        view = discord.ui.View() 
        view.add_item(discord.ui.Button(label='Click here to watch!', url=link, style=discord.ButtonStyle.url))
        await ctx.respond(embed=embed, view=view)
        
def setup(bot): 
    bot.add_cog(YoutubeTogetherCog(bot))```
worn condor
#

and like to keep it that way

robust meteor
#

and problem isn't watch together

cloud dawn
#

He breaks ToS anyways since he made an experimental feature publicly accessible.

worn condor
untold token
#

No? Watch together is usable by bots

#

There is a literally a verified bot for it

#

Activities

worn condor
robust meteor
worn condor
#

my friend has one that uses it

untold token
#

You can use a bot application create a discord Activity and it doesn't break any TOS

worn condor
#

and its verified

robust meteor
#

and yt together doesn't related to my problem..

visual island
robust meteor
visual island
#

it's a problem with the worker

#

although there might be a fix, it won't be on your code

lament mesa
robust meteor
#

nvm I fixed

#

thanks everyone for helping me

wanton veldt
#

is possible to make a server mute command?

tawdry perch
slate swan
#

Why do I receive this error for my verification command?
https://paste.pythondiscord.com/inofibotom.py

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'int' object has no attribute 'lower'
wanton veldt
slate swan
#

Yes

#

You need to assign a mute role

#

That doesn't have perms to type anywhere

wanton veldt
#

i dont want a chat mute

#

i want a voice mute

slate swan
#

Ohhh

#

Yes that's possible too

wanton veldt
wanton veldt
slate swan
#

Yeah I'm pretty sure it is

tawdry perch
#

!d disnake.Member.edit

unkempt canyonBOT
#

await edit(*, nick=..., mute=..., deafen=..., suppress=..., roles=..., voice_channel=..., timeout=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the member’s data.

Depending on the parameter passed, this requires different permissions listed below...
tawdry perch
#

use the mute

mild raft
#

It's don't send a embed:

@bot.command()
async def reactrole(ctx, emoji, role: discord.role,*, message):

emb = discord.Embed(description= message)
msg = await ctx.send(embed= emb)
await msg.add_reaction(emoji)

with open("reactrole.json") as json_file:
    data = json.load(json_file)

    new_react_role = {
        'role_name':role.name,
        'role_id':role.id,
        'emoji':emoji,
        'message_id':msg.id
    }

    data.append(new_react_role)

with open("reactrole.json", "w") as j:
    json.dump(data, j, indent=4)
mild raft
#

Hey everyone, welcome to my channel.👋

In this part 4 of my how to make Discord Bot video we will be implementing reaction role for our discord bot

All the links 🌐 mentioned in the video 📺
https://discord.com/developers/applications
https://discordpy.readthedocs.io/en/latest/

🐙 Github
https://github.com/Dhanush-git/Discord.py

👋 Get in touch
...

▶ Play video
slate swan
wanton veldt
#

ty

cloud dawn
tawdry perch
slate swan
#

Sure, one sec

#

Big error

Traceback (most recent call last):
  File "C:\Users\leogr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\Users\leogr\OneDrive\Desktop\SEC Interactive\cogs\verification.py", line 38, in verify
    code = await self.bot.wait_for(verification_code, check=check)
  File "C:\Users\leogr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 980, in wait_for
    ev = event.lower()
AttributeError: 'int' object has no attribute 'lower'

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

Traceback (most recent call last):
  File "C:\Users\leogr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\leogr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\leogr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'int' object has no attribute 'lower'
tawdry perch
#

you use .lower somewhere?

visual island
#

no, it's from the internals

slate swan
tawdry perch
#

oh?

visual island
#

event should be string

slate swan
#

What event?

tawdry perch
#

oh..

#

wait_for

#
code = await self.bot.wait_for(verification_code, check=check)
visual island
#

verification_code is the event currently, and is an int

tawdry perch
#

you can wait for specific message to be sent by using that?

slate swan
#

oh

#

I was reading an example of d.py docs

cobalt jacinth
#

suddenly the bot is doing this

tawdry perch
#

you have 2 instances running

cobalt jacinth
#

no

velvet tinsel
#

Cool

cobalt jacinth
#

only one

cloud dawn
tawdry perch
#

you made it send 2 messages then?

velvet tinsel
#

Hello Pandabweer

cobalt jacinth
#

Yeah so two instances were running 😅

#

I found out after closing pc

tawdry perch
#

knew it

cobalt jacinth
#

Because before i had closed pycharm only

#

Why would this happen ?

velvet tinsel
#

What’s happening

velvet tinsel
cloud dawn
cloud dawn
velvet tinsel
#

Like splitgate

#

Sometimes it runs after I close my PC

cobalt jacinth
#

I only use pycharm...this was very wierd. Must be pycharm bug...another instance of it was running

cobalt jacinth
#

Just shutdown the pc

velvet tinsel
#

Ok

boreal ravine
velvet tinsel
gentle gyro
#

Any good tutorials to make a music bot?

cloud dawn
tawdry perch
gentle gyro
tawdry perch
#

no, they break ToS doesn't matter if it's for your personal server

gentle gyro
#

oohh

#

That's sad

visual island
#

but if you make your own songs/music then...

wanton veldt
#

hi i have this code ```py
@commands.command(pass_context=True)
@commands.has_permissions(ban_members = True)
async def softban(self, ctx, member: discord.Member=None, *, reason=None):
await ctx.guild.ban(member, reason = reason)
await asyncio.sleep(0.1)
await ctx.guild.unban(member)
embed = discord.Embed(title=f"Softban", description=f"Softban will ban but immediately unban the user and send them a new invite link!")
await ctx.reply(embed=embed)
await member.send(f" You have been softbanned from: {guild.name} reason: {reason}")

#

any ideas?

cloud dawn
#

Why not just kick them?

#

pass_context=True is depricated btw

visual island
vestal ingot
#

Hello, I am trying to make voice channel invite command but It will not work. Can anybody help me?

import os
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='!')

@bot.event
async def on_connect():
  print("bot is online!")

@bot.command()
async def F(self,ctx,*,text):
  if(ctx.author.voice):
    channel = ctx.author.voice.channel
    Invite = await ctx.channel.create_invite(max_uses=100,unique=True)
    name = channel.name
    embed = discord.Embed()
    link = "["+name+"]("+str(Invite)+")"
    embed.description = text+"\n"+link
    await ctx.send(embed=embed)
  else:
    await ctx.send("You are not in the voice")
unkempt yacht
#

I made a create channel command and was wondering if it would be possible if it could make it under a certain category and not at the top of the server

cloud dawn
vestal ingot
#

Ok thk, i go to try

cloud dawn
unkempt canyonBOT
#

await create_text_channel(name, *, reason=None, category=None, position=..., topic=..., slowmode_delay=..., nsfw=..., overwrites=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Creates a [`TextChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel "discord.TextChannel") for the guild.

Note that you need the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to create the channel.

The `overwrites` parameter can be used to create a ‘secret’ channel upon creation. This parameter expects a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") of overwrites with the target (either a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") or a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")) as the key and a [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/master/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite") as the value.

Note

Creating a channel of a specified position will not update the position of other channels to follow suit. A follow-up call to [`edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel.edit "discord.TextChannel.edit") will be required to update the position of the channel in the channel list...
unkempt yacht
#

this is my code rn

cloud dawn
unkempt yacht
#
@client.command(aliases=['cc'])
@commands.has_permissions(manage_channels=True)
async def createchan(ctx, *, name=None):
  guild = ctx.message.guild
  if name == None:
    await ctx.send('Sorry, but you have to insert a name. Try again, but do it like this: `.cc [channel name]`')
  else:
    channel = await guild.create_text_channel(name)
    await ctx.send(f"Created a channel named {channel.mention}")```
#

ok

cloud dawn
#
category (Optional[CategoryChannel]):

The category to place the newly created channel under. The permissions will be automatically synced to category if no overwrites are provided.
cold sonnet
#

but you don't really have to create that guild variable

granite mountain
#

hi

slate swan
maiden fable
#

code is a Message object and also it's a string

#

So u need to do int(code.content)

slate swan
#

Where would I put that?

boreal ravine
wanton veldt
#
import discord
from discord.ext import commands, tasks
from discord.ext.commands import MissingPermissions, CheckFailure, MemberNotFound

class kick(commands.Cog, name="kick"):
    def __init__(self, bot: commands.Bot):
        self.bot = bot

    @commands.Cog.listener()
    @commands.has_permissions(ban_members = True)
    async def on_message(self, ctx, message):

        if message.content.startswith("pa andrei"):
            george_id = int('916469565024772096') 
            member = message.guild.get_member(george_id)
            await member.kick() 
            await ctx.send(f'Andrei has been kicked!')
            await member.send(f"ESTI VAI SOARTA TA INTRA INAPOI ")

def setup(bot: commands.Bot):
    bot.add_cog(kick(bot))```
any ideas why i get this error
final iron
wanton veldt
#

so?

tawdry perch
#

remove ctx

wanton veldt
#

but if i remove ctx my bot cant send mesaages back

tawdry perch
#

on_message does not take ctx, it wont work with it

final iron
tawdry perch
#

you can do await message.channel.send instead

boreal ravine
#

can a select menu option have an emoji

manic wing
#

emoji is a kwarg

boreal ravine
#

in the selectoption class?

manic wing
#

yes

boreal ravine
#

thanks

manic wing
boreal ravine
#

ew discord together

wanton veldt
wanton veldt
tawdry perch
#

you wanted to send message to member?

wanton veldt
#

await member.send(f"txt ")

tawdry perch
#

oh wait.. is that a DM listener or smth?

wanton veldt
tawdry perch
#

well I don't really have time to explain it, sorry

snow flare
#

Is there a way to trigger a command through the bot code and not just through discord messages with a prefix? Or would I just have to create a standard python def for the function and put it into the certain part of the code when I want it to be triggered?

tall dust
#

@wanton veldt remove the server invite from your code

wanton veldt
#

ik i m just dumb

#

can someone help me i have this code ```py
@commands.Cog.listener()
@commands.has_permissions(ban_members = True)
async def on_message(self, message):

    if message.content.startswith("pa andrei"):
        george_id = int('916469565024772096') # already casting to an integer
        member = message.guild.get_member(george_id)
        await member.send(f" txt ")
        await member.kick() 
        await message.channel.send(f'Andrei has been kicked!')

and i get this errorpy
await member.send(f"txt ")
AttributeError: 'NoneType' object has no attribute 'send'```

wanton veldt
tall dust
#

i believe get_member returns None if the member is not already in the bot's cache

maiden fable
#

But then, there's hardly any case when get member returns None. The only possible explanation is wrong ID

wanton veldt
#

the id is fine

maiden fable
cloud dawn
wanton veldt
#

thats what i found on google bcz i dident know how to do it

cloud dawn
#

ig

wanton veldt
#

so what can i do?

dire folio
wanton veldt
#

im confuzed rn the kick command is working but the dm dosent work

dire folio
#

I can't remember how tho

#

It's smth to do with create_dm()

maiden fable
#

No need

#

user.send automatically creates one

dire folio
#

Oh never knew that

#

I have it somewhere in my bot 1 sec

#

Nvm the file isn't loading

tidal hawk
#

Panda you remember the issue I had?

#

with cogs

cloud dawn
tidal hawk
#

Well it works now, I think the issue was that there were too many cogs to handle

#

I deleted 3 of cog files and now it works

cloud dawn
#

How many cogs do you have?

#

Shouldn't be an issue though...

tidal hawk
#

I had 12, heard that it shouldnt be a issue

quick gust
wanton veldt
# maiden fable No need

wait now i get this error ```py
await member.send(f" txt ")
File "C:\Python310\lib\site-packages\discord\guild.py", line -1, in fetch_member
TypeError: can't send non-None value to a just-started coroutine

tidal hawk
#

But maybe my raspberry wasn't powerful to handle them all

quick gust
#

Possible that the cogs u deleted, were the ones causing the error

maiden fable
#

Never saw that error before

tidal hawk
#

The cogs I deleted, had like few completely seperated functions

cloud dawn
#

line -1?

wanton veldt
cloud dawn
wanton veldt
#

thats what i m trying

quick gust
maiden fable
wanton veldt
#

yea its easyer for me

#

STOP BULLYING ME

maiden fable
#

What?

#

None's bullying u

north coral
maiden fable
#

I won't really comment on the msg since I don't wanna start a debate or smth here rn

north coral
#

Good choice 😉

slate swan
wanton veldt
#

no

cloud dawn
slate swan
#

That the error is in

wanton veldt
#
import discord
from discord.ext import commands, tasks
from discord.ext.commands import MissingPermissions, CheckFailure, MemberNotFound

class kick(commands.Cog, name="kick"):
    def __init__(self, bot: commands.Bot):
        self.bot = bot

    @commands.Cog.listener()
    @commands.has_permissions(ban_members = True)
    async def on_message(self, message):

        if message.content.startswith("pa andrei"):
            george_id = ('916469565024772096') # already casting to an integer
            member = message.guild.fetch_member(george_id)
            await member.send(f" txt")
            await member.kick() 
            await message.channel.send(f'Andrei has been kicked!')

def setup(bot: commands.Bot):
    bot.add_cog(kick(bot))```
cloud dawn
#

Are you trying to make commands?

wanton veldt
#

to consider only messages from admins

jaunty sparrow
#

@wanton veldtDo you have the members intent on?

wanton veldt
#

yes

slate swan
#

I wouldn’t use on_message for commands

cloud dawn
wanton veldt
jaunty sparrow
#

Can you print guild.members?

cloud dawn
wanton veldt
#

ok

cloud dawn
#

You would need to make it a command for that not a listener.

quick gust
wanton veldt
#

sorry

cloud dawn
wanton veldt
#
    @commands.command()
    async def on_message(self, message):
        if message.content.startswith("pa andrei"):
            george_id = ('916469565024772096') # already casting to an integer
            member = message.guild.fetch_member(george_id)
            await member.send(f"txt ")
            await member.kick() 
            await message.channel.send(f'Andrei has been kicked!')
dense swallow
#

Anyone here uses pycord?

slate swan
#

No

cloud dawn
dense swallow
#

Well dpy is dead..

cloud dawn
dense swallow
#

Just asked, don't need any help rn.

cloud dawn
dense swallow
#

Im planning on moving to it, bcz it has the most stars

#

and it's partnered.. yeah so why not

cloud dawn
#

Disnake and Pycord are the 2 strongest contesters in the race yeah.

final iron
wanton veldt
#

can i dm you?

final iron
#

No

snow flare
#

how to dm someone using the bot?

cloud dawn
#

!d discord.Member.send

unkempt canyonBOT
#

await send(content=None, *, tts=None, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, mention_author=None, view=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://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.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.9)") of [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.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://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.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.9)") of [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
wanton veldt
#

everything is fine but line 15 dosent work

final iron
#

Is there an error?

wanton veldt
#

no

final iron
#

What are you typing in to trigger the event?

wanton veldt
#

pa andrei

final iron
#

You need to use your bots prefix since it's a command

wanton veldt
#

can't I avoid using the prefix?

final iron
#

There's an invoke without prefix arg but I got to go

wanton veldt
tame sierra
#

how do I make a certain argument in a command function optional?

craggy cloak
#

Error:

#

Code:

    for item in bag:
        amount = item["amount"]
        name = item["item"]
        emote = item["emote"]
        em.add_field(name=f"👜 Items\n {name}", value=amount, inline=False)
        em.set_footer(text=f"💸 {ctx.author.name} 💸")
        em.timestamp = datetime.now()
    await ctx.send(embed=em)

tame sierra
# craggy cloak **Error:**

I believe it's telling you that the emote variable isn't being used for anything, but make sure to get a second opinion

maiden fable
#

Yea that's it says. Not an error tho

torn sail
unkempt yacht
#

I made a dm command and i want to make it so only users that have the Administrator permission can use it in a server

#
@commands.has_permissions([perm?]=True)
#

the [perm?] bit isn't the actual code

boreal ravine
#

!e

def main(n="hi"):
  print(n)
main()
unkempt canyonBOT
#

@boreal ravine :white_check_mark: Your eval job has completed with return code 0.

hi
quick gust
#

!d discord.Permissions.administrator

unkempt canyonBOT
#

Returns True if a user is an administrator. This role overrides all other permissions.

This also bypasses all channel-specific overrides.

mental wadi
#

what is my problem ? :|

maiden fable
gloomy cloud
#

hey can someone help me

#

bot = bot.command(command_prefix='!')

mental wadi
gloomy cloud
maiden fable
#

U need to do from discord.ext import commands then use commands.Bot @mental wadi

gloomy cloud
#

im biggener

maiden fable
gloomy cloud
#

not working

maiden fable
#

Show error

#

Did u import commands?

maiden fable
#

Why do u even need to import bot tho

unkempt yacht
#

When the bot has sent the dm to a user, i want it to send "I've sent a dm to [member mention]"

Would this line of code work:

      await ctx.send("I've sent a dm to" {member})```
maiden fable
#

Sure

#

Wait no

#

!f-stringa

gloomy cloud
maiden fable
#

!f-strings

unkempt canyonBOT
#

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

maiden fable
maiden fable
unkempt yacht
#

oh ok

maiden fable
unkempt yacht
#

tyy

slate swan
gloomy cloud
unkempt yacht
#

so like this

      await ctx.send(f"I've sent a dm to {member}")```
maiden fable
#

from discord.ext import commands

maiden fable
slate swan
slate swan
#

and its commands

gloomy cloud
#

dont working

maiden fable
#

Bro u never ran it

gloomy cloud
#

what do you mean

wheat stirrup
#

!e

def list(n=[1, 2, 3]):
  print(n)
list()
unkempt canyonBOT
#

@wheat stirrup :white_check_mark: Your eval job has completed with return code 0.

[1, 2, 3]
boreal ravine
#

@wheat stirrup #bot-commands

wheat stirrup
rare saddle
#

How to get an Author ID correctly?

honest vessel
#

oh i see

rare saddle
honest vessel
#

do like inner.channel.topic.split(" Author ID - ")[1]

rare saddle
modern fiber
#

I need help guys how do I connect my bot with the roblox group? So when I type /update it gives me the role that I have in the roblox group?

potent spear
modern fiber
#

Well- Im pretty new, but yeah.

potent spear
potent spear
#

let's split this up in more understandable parts

#

you know what classes are, attributes and methods?

#

if not, look more into python first, you'll get way faster in developing that bot your dreamed of if you know the basics

modern fiber
#

Appreciate it a lot.

plain cloud
#

When I started discord.py Id never touched Python before. 2019 me was an absolute madman 😩 it’s a wonder I maintained enough patience to continue coding

modern fiber
#

Guys, why isn't this working?

plain cloud
#

did you ever define client?

#

obviously not

#

client = discord.Client()

manic wing
#

@maiden fable

#

you know the !d command this bot has

#

wanna make it?

#

with me

#

and turn it into a pypi package

#

like jishaku where you just load it

cloud dawn
#

uwu he's asking you for a date
:3

manic wing
#

panda wanna do it with me? <3

cloud dawn
#

I would but i'm kinda busy this week being the end of the year and all.

manic wing
#

mmmhmmmm

#

thats what they all say

cloud dawn
#

Gotta work from tuesday to thursday then friday birthday with new year 🥳

manic wing
#

disappointing smh

cloud dawn
#

But i do want to make a new bot soon :)

#

If you are still active here i'll hit you up how about that?

manic wing
#

my idea is that its extremely user friendly in the way that you just pip install it and load it to your bot and its a free docs command which would be otherwise pretty hard

manic wing
cloud dawn
#

Well if you want to do that also do !pypi

#

And the python info commands like !global

#

Handy stuff.

manic wing
manic wing
#

!tags

unkempt canyonBOT
#
Available tags


» args-kwargs
» async-await
» blocking
» botvar
» class
» classmethod
» codeblock
» comparison
» contribute
» customchecks
» customcooldown
» customhelp
» decorators
» defaultdict

cloud dawn
#

!customhelp

unkempt canyonBOT
#

Custom help commands in discord.py

To learn more about how to create custom help commands in discord.py by subclassing the help command, please see this tutorial by Stella#2000

cloud dawn
#

:3

manic wing
#

wha

slate swan
#

Gm guys

cloud dawn
#

Good evening okimii

slate swan
#

oh yeah sorry i just wokeup😭

#

its 2pm my faultpithink

cloud dawn
#

Average American.

slate swan
#

no i was on the road for 12hours last night and i was programming for atleast 2 hours it was 3am so i went to sleep its just my schedule

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied mute to @spare moon until <t:1640630048:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

cloud dawn
slate swan
manic wing
#

!source docs

unkempt canyonBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
slate swan
#

i cant really solve but i will solve it today hopefully

cloud dawn
#

Today i saw this error in this channel ```py
File "C:\Python310\lib\site-packages\discord\guild.py", line -1, in fetch_member
TypeError: can't send non-None value to a just-started coroutine

cloud dawn
#

He putted has_permissions on a on_message event.

#

line -1

#

😂

quaint epoch
#

would py await ctx.send('Hello world!') and py await ctx.message.channel.send('Hello world!') do the same thing?

quick gust
#

Why ctx if ure doing message.channel

cloud dawn
#

Same outcome but different object.

quaint epoch
covert igloo
#

!resourses

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.

slate swan
slate swan
quick gust
slate swan
#

@cloud dawn im so tired i just popped a whole mountain dew canpithink

cloud dawn
#

infernum gonna hit us with the ot soon

#

i feel it in my code

quick gust
#

!oyt

#

sike

cloud dawn
#

Close one 😅

slate swan
slate swan
#

now i will go back to coding bye now🕴️

quick gust
#

good luck

slate swan
#

are you saying that because im bad🕴️

#

kayle no

#

stop

cloud dawn
slate swan
boreal ravine
#

okimii: im gonna learn sql!
couple weeks later: i dont have motivation

cloud dawn
#

facts

boreal ravine
#

doe be like that tho 👀

slate swan
slate swan
#

i like action not boring old sqlyert

quick gust
cloud dawn
#

Bro json can't filter like sql

#

speed

tawdry perch
#

SQL is fun, Just started using postgres

quick gust
#

but yes you are bad oki

#

jk

cloud dawn
slate swan
boreal ravine
#

u

quick gust
#

mii

slate swan
#

who?pithink

#

smh say my whole name its just 6 characters yert

quick gust
slate swan
#

yall not funny im leaving now smh 🕴️

#

making fun of my name after i wakeup so disrespectful 🕴️ yert

quick gust
cloud dawn
#

||still reacts after said he was leaving||

slate swan
#

i left guys but i have 2 monitors with discord openpithink

slate swan
cloud dawn
slate swan
cloud dawn
#

He was just waiting for the opportunity

slate swan
#

exactly

cloud dawn
#

jokes on you i got 3

#

i see all

slate swan
#

second monitor discord and main 144hz with pycharm pithink

slate swan
cloud dawn
#

1440p 144hz all py_guido

cloud dawn
#

ok i'll stop now

slate swan
#

what you got 2 3090tis?

cloud dawn
slate swan
#

2000 series isnt bad eitherpithink

cloud dawn
#

It can run everything i want so it's good enough

slate swan
cloud dawn
#

only cyberpunk i don't max whatever

slate swan
plain cloud
#

my 4GB ram HP laptop… built: different 😩💪
runs discord bots fine though

slate swan
#

but does your gpu have a cool rgb light you can customize pithink

cloud dawn
slate swan
#

pycharm eats hella ram tho

slate swan
cloud dawn
slate swan
#

🕴️

cloud dawn
slate swan
#

bro pycharm eats a whole 1gb of ram😳

plain cloud
#

Minecraft mod requiring 20gb of ram- I’m-

cloud dawn
#

This is just the application i was also running the server lmao

slate swan
#

😭

#

you know what i hate about my setup😔

plain cloud
#

Notepad++ is nice 😌✌️

cloud dawn
#

You are in front of it

slate swan
slate swan
modern fiber
#

Can somebody check this code for me?

cloud dawn
#

jkjk

cloud dawn
slate swan
modern fiber
#

Its connected with the Roblox API.

slate swan
modern fiber
#

Also, what cookie should I use?