#Allgemeine Hilfe

1 messages · Page 81 of 1

west valley
#

gelöst

frosty nexus
#

Kann mir jemand sagen ob man bei #💻・cookie-hosting pip freeze machen kann und wie?

west valley
solid ingot
frosty nexus
west valley
#

Mir wurde gesagt ich soll es machen... Hab es aber nicht hingekriegt

frosty nexus
#

Und da im Moment das Problem habe das „discord“ nicht gefunden wird würde ich gerne wissen was ich alles installiert hab

solid ingot
#

zeig Mal deine requirements datei

frosty nexus
#

Hab keine peeposhy peeposhy

west valley
#

Was nuss ich im Dashboard bei Invite Link reinmachen?

frosty nexus
frosty nexus
west valley
frosty nexus
#
    bot = discord.bot()
AttributeError: module 'discord' has no attribute 'bot'```





Code: 


```py 


import discord
import os


bot = discord.bot()


intents = discord.Intents.default()
intents.guilds = True
intents.members = True


# Laden der Cog


if __name__ == "__main__":
  for filename in os.listdir("cogs"):
   if filename.endswith(".py"):
    bot.load_extension(f"cogs.{filename[:-3]}")
#

ps; in vsc klappt es so aber in keks nicht

stone flint
ruby sparrow
stone flint
#

Ja dieses menü

#

Kenne nur forms aber bei forms ist das ja nicht so

ruby sparrow
#

das ist bei neu bei handy

#

das ist von discord die commands

stone flint
#

Okay würde sowas cool finden ya für meinen economy bot

ruby sparrow
#

? das meiste du oder

stone flint
ruby sparrow
#

das zeig nur auf handy an

stone flint
#

Asoo schade

ruby sparrow
#

Guck @stone flint

stone flint
#

Ok

frosty nexus
stone flint
# ruby sparrow

Stimmt habs gerade gesehen sobald die commands anklickbar sind dann erscheint das menü

ruby sparrow
#

Ja😱

ruby sparrow
frosty nexus
frosty nexus
stone flint
frosty nexus
stone flint
#

Komisch

frosty nexus
#

@stone flint @ruby sparrow bitte schön

ruby sparrow
frosty nexus
ruby sparrow
#

Zeig mal requirements.txt

#

@frosty nexus

frosty nexus
ruby sparrow
frosty nexus
#

dennoch nicht

ruby sparrow
#

Send alles

frosty nexus
#

da steht nur noch py-cord drinnen

ruby sparrow
#

Mach m alles was ist in #💻・cookie-hosting

cloud cedar
ruby sparrow
#

wie kann ich in eine Datenbank abspeichern ob der Button an ist oder aus ist

fierce dove
#

Mit der Anfrage

#

Ner

ruby sparrow
#

hast du ein zb ?

fierce dove
#

Habe oc verbot

#

Pc

#

Oder frag Chat gpt

ruby sparrow
fierce dove
#

Privat

fresh flint
#

Schau in deinem Hoster mal nach

lofty rock
#

systemctl start wings hab ich schon gemacht was soll ich sonst noch machen?

lofty rock
#

@solid ingot kannst du mir bitte helfen bin am verzweifeln 😔

chilly gust
#

mal ne kleine frage so neben bei macht es einen performance unterschied wenn ich mehrere slash commands in ein cog packe oder soll ich sie doch lieber in verschiedene packen?

ruby sparrow
#

?

tawdry leaf
#

Moin!
wieso kommt hier EmojiNotFound bevor ich im code sage wenn es das ist er den text senden soll?

        if isinstance(emoji, discord.Emoji) and self.bot.get_emoji(emoji.id):
           ...
        else:
            await ctx.respond("Dieses Emoji hat der Bot nicht gefunden", ephemeral=True)
solid ingot
#

mach try except

frosty nexus
#

Ich habe mir gerade eine sehr blöde frage gestellt und wollte die mir mal von ein paar Profis beantworten lassen ich weis nicht wie ich drauf gekommen bin aber ist es möglich mmehrere bots in einem code laufen zulassen ( in verschiedenen datein)

#

container@pterodactyl~ Error Event [096ea645-773d-43d9-a336-cd1febff6a4b]: another power action is currently being processed for this server, please try again later

Wie schlimm ist das??

#

bzw was hat das zu bedeuten

edgy scaffold
#

Moin

fierce dove
fierce dove
#

Mit Subprocess

fresh flint
#

Wie installiere ich GoLang 1.23 auf Ubunto 22.04

mental hamlet
#

google ist dein freund

modest obsidian
#

``kann mir jemand helfen Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\DiscordBotpy\main.py", line 3, in <module>
from discord import commands,client
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord_init_.py", line 34, in <module>
from .bot import *
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\bot.py", line 40, in <module>
from .cog import CogMixin
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\cog.py", line 39, in <module>
from .commands import (
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands_init_.py", line 29, in <module>
from .permissions import *
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\permissions.py", line 29, in <module>
from .core import ApplicationCommand
ImportError: cannot import name 'ApplicationCommand' from 'discord.commands.core' (C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py)

Process finished with exit code 1``

fierce dove
#

Für was

modest obsidian
ruby sparrow
fierce dove
#

Machst du manchmal auch nicht Nico

fierce dove
#

Code

tawdry leaf
#

xD

modest obsidian
# fierce dove Code

ich hab was anderes gemacht und habe denn fehler code erhalten Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 7, in <module>
intents.members = True
AttributeError: 'NoneType' object has no attribute 'members'

modest obsidian
# fierce dove Code

das ist der code dazu import os

import ezcord
from ezcord import discord, bot

intents = discord.Intents.default()
intents.members = True
class Bot(ezcord.Bot):
def init(self):
super().init(intents=intents)

async def on_ready(self):
    print(f"Senf")

bot = Bot()

if name == "main":
for filename in os.listdir("cogs"):
if filename.endswith(".py"):
bot.load_extension(f"cogs.{filename[:-3]}")

bot.run

ruby sparrow
#

Du musst schon die intense auch bei Discord developers an machen @modest obsidian

modest obsidian
modest obsidian
frosty nexus
nocturne junco
#

Wie kann ich das auch bei meinen Discord Bot machen ?

restive herald
modest obsidian
modest obsidian
fierce dove
modest obsidian
fierce dove
#

Du nervst nicht

#

Bei was brauchst du Hilfe

modest obsidian
# fierce dove Bei was brauchst du Hilfe

bei dem hier Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 6, in <module>
intents.members = True
AttributeError: 'NoneType' object has no attribute 'members'

#

und ich musst da im discord developer intense an machen aber weißt du wo ich das anmache

modest obsidian
fierce dove
#

Du hast die an

modest obsidian
fierce dove
#
 import os

import ezcord
from ezcord import discord, bot

intents = discord.Intents.all()
class Bot(ezcord.Bot):
    def __init__(self):
        super().__init__(intents=intents)

    async def on_ready(self):
        print(f"Senf")

bot = Bot()

if __name__ == "__main__":
    for filename in os.listdir("cogs"):
        if filename.endswith(".py"):
            bot.load_extension(f"cogs.{filename[:-3]}")

bot.run()

@modest obsidian

devout orchidBOT
#
Ghost Ping

@fierce dove hat @modest obsidian gepingt.

modest obsidian
fierce dove
#

🙂

modest obsidian
# fierce dove 🙂

da kommt das Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 14, in <module>
bot = Bot()
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 9, in init
super().init(intents=intents)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ezcord\bot.py", line 111, in init
super().init(command_prefix=prefix or "!", intents=intents, **kwargs)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ezcord\internal\dc_init_.py", line 3, in init
raise ModuleNotFoundError("No discord library found. Please install a supported library.")
ModuleNotFoundError: No discord library found. Please install a supported library.

Process finished with exit code 1

fierce dove
#

Zeig mal deine pip freeze

#

@modest obsidian

modest obsidian
# fierce dove Zeig mal deine pip freeze

aiohttp==3.9.1
aioredis==2.0.1
aiosignal==1.3.1
aiosqlite==0.19.0
async-timeout==4.0.3
attrs==23.1.0
blinker==1.7.0
cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
dacite==1.8.1
DateTime==5.5
discord-py-slash-command==4.2.1
editor==1.6.6
ezcord==0.6.2
ffmpeg-python==0.2.0
Flask==3.0.2
fonttools==4.53.0
frozenlist==1.4.1
future==1.0.0
google-api-core==2.19.0
google-auth==2.30.0
google-cloud-dialogflow==2.30.0
googleapis-common-protos==1.63.1
grpcio==1.64.1
grpcio-status==1.62.2
idna==3.6
imageio-ffmpeg==0.4.9
importlib-metadata==7.0.1
importlib_resources==6.4.0
intents==0.3.0
itsdangerous==2.1.2
Jinja2==3.1.3
kiwisolver==1.4.5
lxml==5.1.0
MarkupSafe==2.1.5
matplotlib==3.9.0
multidict==6.0.4
numpy==1.26.4
option==2.1.0
packaging==24.1
params==0.9.0
pillow==10.3.0
proto-plus==1.23.0
protobuf==4.25.3
py-cord==2.5.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycord==0.1.1
pyparsing==3.1.2
python-dateutil==2.9.0.post0
python-dotenv==1.0.0
pytz==2024.1
PyYAML==5.4.1
requests==2.31.0
responses==0.25.0
rsa==4.9
runs==1.2.2
scrapetube==2.5.1
six==1.16.0
termcolor==2.4.0
tournament==1.0.0
typing_extensions==4.9.0
urllib3==2.2.1
variables==0.0.1
Werkzeug==3.0.1
wind==0.0.0.dev0
xmod==1.8.1
yarl==1.9.4
zipp==3.17.0
zope.interface==6.4.post2

odd kiteBOT
#

@modest obsidian

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

DateTime==5.5```
⚠️ Schreibe **nur** die Package-Namen in deine Datei
```yml
importlib-metadata==7.0.1
importlib_resources==6.4.0```
⚠️ Eventuell hast du falsche Packages installiert
```yml

pycord==0.1.1 -> py-cord```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
fierce dove
#

Bitte ändern

#

pip uninstall pycord importlib_resources importlib-metadata DateTime

#

pip Install py-cord

#

@modest obsidian

modest obsidian
fierce dove
#

install

#

Das i klein

modest obsidian
fierce dove
#

Ja

modest obsidian
#

Hat geklappt

fierce dove
#

Geht der bot jz

modest obsidian
#

Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 14, in <module>
bot = Bot()
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 9, in init
super().init(intents=intents)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ezcord\bot.py", line 111, in init
super().init(command_prefix=prefix or "!", intents=intents, **kwargs)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\ezcord\internal\dc_init_.py", line 3, in init
raise ModuleNotFoundError("No discord library found. Please install a supported library.")
ModuleNotFoundError: No discord library found. Please install a supported library.

Process finished with exit code 1

fierce dove
#

pip install py-cord

modest obsidian
fierce dove
#

Pip freeze wieder

modest obsidian
#

aiohttp==3.9.1
aioredis==2.0.1
aiosignal==1.3.1
aiosqlite==0.19.0
async-timeout==4.0.3
attrs==23.1.0
blinker==1.7.0
cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
dacite==1.8.1
discord-py-slash-command==4.2.1
editor==1.6.6
ezcord==0.6.2
ffmpeg-python==0.2.0
Flask==3.0.2
fonttools==4.53.0
frozenlist==1.4.1
future==1.0.0
google-api-core==2.19.0
google-auth==2.30.0
google-cloud-dialogflow==2.30.0
googleapis-common-protos==1.63.1
grpcio==1.64.1
grpcio-status==1.62.2
idna==3.6
imageio-ffmpeg==0.4.9
intents==0.3.0
itsdangerous==2.1.2
Jinja2==3.1.3
kiwisolver==1.4.5
lxml==5.1.0
MarkupSafe==2.1.5
matplotlib==3.9.0
multidict==6.0.4
numpy==1.26.4
option==2.1.0
packaging==24.1
params==0.9.0
pillow==10.3.0
proto-plus==1.23.0
protobuf==4.25.3
py-cord==2.5.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pyparsing==3.1.2
python-dateutil==2.9.0.post0
python-dotenv==1.0.0
pytz==2024.1
PyYAML==5.4.1
requests==2.31.0
responses==0.25.0
rsa==4.9
runs==1.2.2
scrapetube==2.5.1
six==1.16.0
termcolor==2.4.0
tournament==1.0.0
typing_extensions==4.9.0
urllib3==2.2.1
variables==0.0.1
Werkzeug==3.0.1
wind==0.0.0.dev0
xmod==1.8.1
yarl==1.9.4
zipp==3.17.0
zope.interface==6.4.post2

fierce dove
#

Mh sus

#

Mach Mal

from ezcord import discord, bot weg
modest obsidian
fierce dove
#

Und jz

import discord

modest obsidian
# fierce dove Und jz import discord

Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 4, in <module>
import discord
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord_init_.py", line 34, in <module>
from .bot import *
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\bot.py", line 40, in <module>
from .cog import CogMixin
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\cog.py", line 39, in <module>
from .commands import (
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands_init_.py", line 29, in <module>
from .permissions import *
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\permissions.py", line 29, in <module>
from .core import ApplicationCommand
ImportError: cannot import name 'ApplicationCommand' from 'discord.commands.core' (C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py)

Process finished with exit code 1

odd kiteBOT
#

@modest obsidian

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

DateTime==5.5```
⚠️ Schreibe **nur** die Package-Namen in deine Datei
```yml
importlib-metadata==7.0.1
importlib_resources==6.4.0```
⚠️ Eventuell hast du falsche Packages installiert
```yml

pycord==0.1.1 -> py-cord```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
modest obsidian
#

hab aber alles gemacht

modest obsidian
fierce dove
#

Deinstalliere py-cord und installiere py-cord wieder

#

@modest obsidian

modest obsidian
fierce dove
#

uninstal py-cord

modest obsidian
modest obsidian
fierce dove
#

hast du das pip davor gemacht

modest obsidian
#

habs aber jetzt gemacht

fierce dove
#

🤣

#

Und jz wieder install py-cord aber nicht vergessen das pip davor zu machen

fierce dove
#

Was kommt jz

#

Wenn du denn bot Startest

odd kiteBOT
#

@modest obsidian

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

DateTime==5.5```
⚠️ Schreibe **nur** die Package-Namen in deine Datei
```yml
importlib-metadata==7.0.1
importlib_resources==6.4.0```
⚠️ Eventuell hast du falsche Packages installiert
```yml

pycord==0.1.1 -> py-cord```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
fierce dove
#

Diggga

#

Nein

#

Zum zweiten Mal das hat er schon gemacht

modest obsidian
fierce dove
#

🙂

#

Kein Problem

modest obsidian
fierce dove
#

👍

tired hearth
#

Warum kann ich kein pycord instalieren bzw. nutzen?

dusty tiger
#

py-cord

#

Und nd pycord

tired hearth
#

warum geht das nicht? @dusty tiger

dusty tiger
#

Mach pip freeze

tired hearth
#

was jetzt

dusty tiger
#

Schick die Liste

tired hearth
#

py-cord==2.5.0 pycord==0.1.1

dusty tiger
#

pip uninstall pycord

tired hearth
#

hab

dusty tiger
#

Start nochmal

tired hearth
dusty tiger
#

Schau mal hier #🔍・pycord-help

tired hearth
#

soll ich den ordner mal löschen?

vast cradle
#

wo ist denn da all_user_ids hinterlegt

fierce dove
vast cradle
#

habs noch net getestet

#

bin grade an 2 baustellen drann

fierce dove
#

Oh

vast cradle
#

es klappt

#

mus mir das nur in ein command umwandeln

#

wie kann ich mir holen wann der user seinen Discord Account erstellt hat und wann

#

er dem Server beigetreten ist

fierce dove
#

@vast cradle hier

#

joined_at = discord Account erstellt

created_at = Server beigetreten

vast cradle
#

ah äähm und wie wandel ich das in discord zeitcode um

#

also das da z.b steht vor 32 Jahren

fierce dove
# vast cradle ah äähm und wie wandel ich das in discord zeitcode um

Mein Discord Server
https://discord.gg/zfvbjTEzv6

Links aus diesem Video
Pycord Docs ► https://docs.pycord.dev/en/stable/

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Mein Hosting* ► https://tidd.ly/3gJufg6
Code auf Github ► https://github.com/tibue99/tutorial-bot

PYCORD
Docs ► https://docs.pycord.dev/
Guide ► https://guide.pycord.dev/introduction/
Discord Serve...

▶ Play video
#

Da hat er des erklärt

vast cradle
#

hab mir das Aktiver Entwickler batch geholt

nocturne junco
#

Wie kann ich das auch bei meinen Bot machen ? (anstatt immer ctx.respond zu nutzen)

viscid lake
nocturne junco
viscid lake
#

So wäre ein normaler Text

nocturne junco
viscid lake
#

Bei einer perms Anfrage

nocturne junco
#

DEIN TEXT

viscid lake
#

Da muss halt dein Text hin was du schicken willst

nocturne junco
viscid lake
nocturne junco
ruby sparrow
#

Zeig code @nocturne junco

nocturne junco
ruby sparrow
#

*das

nocturne junco
ruby sparrow
#

Was für eine Nachricht 🤷‍♂️

#

@nocturne junco

nocturne junco
#

ich will das auch bei meinen Bot haben, weiß aber nicht wie. Ich sehe das zum ersten mal.

ruby sparrow
ruby sparrow
#

wie bekomme ich den fette Punkt da weg

tawdry leaf
tawdry leaf
ruby sparrow
#

Aso ...

frosty nexus
#

ist das normal???

ruby sparrow
#

Wo hast du deine db auf gemacht?

#

@frosty nexus

frosty nexus
#

normal im host

ruby sparrow
#

Denn ja

frosty nexus
restive herald
ruby sparrow
#

Du musst die db auf dein pc haben und denn db browser haben oder was @restive herald sagt

frosty nexus
restive herald
#

google das eif

frosty nexus
#

k

frosty nexus
ruby sparrow
urban glen
#

hat timo mal ein video für json hochgeladen

ruby sparrow
#

@urban glen

urban glen
#

danke

ruby sparrow
#

Bitte

frosty nexus
#

Kann mir jemand sagen ob die die ganzen Datenbanken in ein Ordner tuhen kann ohne das es bei der abfrage Probleme gibt? Weil es ist echt nervig die alle durchgehend zu sehen

ruby sparrow
#

Ja

#

zb "database/test.db" @frosty nexus

frosty nexus
ruby sparrow
#

Ja ?

frosty nexus
ruby sparrow
#

Bitte🙂

modest obsidian
#

Hi kann wer da mir helfen Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\cog.py", line 790, in _load_from_module_spec
setup(self)
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\cogs\counting.py", line 83, in setup
bot.add_cog(CountingCog(bot, 1112002246448791564))
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\cogs\counting.py", line 9, in init
self.conn = sqlite3.connect('db/counting_system.db')
sqlite3.OperationalError: unable to open database file

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

Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\main.py", line 20, in <module>
bot.load_extension(f"cogs.{filename[:-3]}")
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\cog.py", line 912, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\cog.py", line 795, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.counting' raised an error: OperationalError: unable to open database file
Exception ignored in: <function CountingCog.del at 0x0000027A3C8CB040>
Traceback (most recent call last):
File "C:\Users\chris\Documents\Python porjects\discord.py feuerchris\cogs\counting.py", line 78, in del
self.c.close()
AttributeError: 'CountingCog' object has no attribute 'c'

Process finished with exit code 1

modest obsidian
ruby sparrow
#

Cogs

modest obsidian
frosty nexus
modest obsidian
tawdry leaf
tawdry leaf
odd kiteBOT
#

Mein Discord Server
https://discord.gg/zfvbjTEzv6

Links aus diesem Video
EzCord Docs ► https://ezcord.readthedocs.io/en/latest/ezcord/sql.html

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Mein Hosting* ► https://tidd.ly/3gJufg6
Code auf Github ► https://github.com/tibue99/ezcord-template

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Inhalt 📚
Heute schauen wir uns an, wie wir Datenbank...

▶ Play video
frosty nexus
cloud cedar
#

Hi

#

fp = builtins.open(filename, "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'img/bg.png'

#

wie sollte meine ordnerstruktur aussehen?

dusty tiger
cloud cedar
#

also werden die aus der main heraus geladen?

#

also von der main aus

frosty nexus
#


import discord
from discord.ext import commands

class JoinRoleCog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_member_join(self, member):
        # Geben Sie hier den Namen oder die ID der Rolle ein, die Sie vergeben möchten
        role_name = "⇨Besucher"  # Ersetzen Sie dies durch den Namen Ihrer Rolle
        role = discord.utils.get(member.guild.roles, name=role_name)

        if role:
            try:
                await member.add_roles(role)
                print(f"Rolle {role_name} wurde an {member.name} vergeben.")
            except Exception as e:
                print(f"Fehler beim Hinzufügen der Rolle: {e}")
        else:
            print(f"Rolle {role_name} nicht gefunden.")

def setup(bot):
    bot.add_cog(JoinRoleCog(bot))

wieso wird den neuen user die rolle nicht gegeben???

Error nicht vorhanden

graceful fiber
#

Aber in die else schleife geht er nicht?

frosty nexus
frosty nexus
graceful fiber
#

ist eindeutiger?

ruby sparrow
#

ist er bot über die role ?

frosty nexus
tawdry leaf
#

fehlen bestimmt die intents im code 😄

tawdry leaf
#

denke nicht das die rolle das problem ist sondern der user

graceful fiber
#

also ob das event überhaupt triggert

ruby sparrow
frosty nexus
ruby sparrow
#

die role von dem bot auch ?

frosty nexus
ruby sparrow
#
 @commands.Cog.listener()
    async def on_member_join(self, member):
        
        role_name = "⇨Besucher"
        role = discord.utils.get(member.guild.roles, name=role_name)

        if role:
            try:
                await member.add_roles(role)
                print(f"Rolle {role_name} wurde an {member.name} vergeben.")
            except Exception as e:
                print(f"Fehler beim Hinzufügen der Rolle: {e}")
        else:
            print(f"Rolle {role_name} nicht gefunden.")```
#

@frosty nexus

frosty nexus
ruby sparrow
#
intents.member = True```
#

@frosty nexus

frosty nexus
ruby sparrow
#

Member

#

groß geschreiben

fierce dove
tawdry leaf
fierce dove
#

intents.message_content = True
intents. Memberss = True

Müssen raus @frosty nexus

tawdry leaf
#

was laberst du 😄

fierce dove
#

Warum

tawdry leaf
#

intents.members = True @frosty nexus

ruby sparrow
tawdry leaf
#

ja ist logisch kek

frosty nexus
#
    intents.Member = True
    ^^^^^^^^^^^^^^
AttributeError: 'Intents' object has no attribute 'Member'```
fierce dove
#

Code

tawdry leaf
#

hell nooooo

fierce dove
#

Main py

frosty nexus
#

aif wen höte ich jz

tawdry leaf
fierce dove
#

Freese lucky

frosty nexus
#

entspannt euch

odd kiteBOT
fierce dove
tawdry leaf
#

wieso denn groß 😠

ruby sparrow
#

ka

frosty nexus
ruby sparrow
#

members

ruby sparrow
#

so jz

tawdry leaf
frosty nexus
tawdry leaf
#

habe mit dem event auch oft probleme 🙂

frosty nexus
ruby sparrow
frosty nexus
ruby sparrow
#

halt so

#

send mal bild

#

@frosty nexus

tawdry leaf
frosty nexus
#

ganz oben

#

@ruby sparrow

tawdry leaf
#

@ruby sparrow was wird das 😄

ruby sparrow
#

ne

#

ka

tawdry leaf
#

dann verwirr ihn einf nd 🙂

ruby sparrow
#

haha

tawdry leaf
#

bzw das except ausgelöst

#

es muss an den member liegen.

tawdry leaf
frosty nexus
dusty tiger
ruby sparrow
#

@tawdry leaf ich glaube er hat noch nicht mein Code getestet

dusty tiger
#

in deinem code

#

amk

#

@frosty nexus schick mal deinen akteullen code

#

und error wenn einer vorhanden ist

frosty nexus
# dusty tiger <@1111732978012389488> schick mal deinen akteullen code

import discord
from discord.ext import commands

class JoinRoleCog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_member_join(self, member):
        
        role_name = "test "
        role = discord.utils.get(member.guild.roles, name=role_name)

        if role:
            try:
                await member.add_roles(role)
                print(f"Rolle {role_name} wurde an {member.name} vergeben.")
            except Exception as e:
                print(member) 
                print(f"Fehler beim Hinzufügen der Rolle: {e}")
        else:
            print(f"Rolle {role_name} nicht gefunden.")

def setup(bot):
    bot.add_cog(JoinRoleCog(bot))
frosty nexus
dusty tiger
#
import discord
from discord.ext import commands

class JoinRoleCog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_member_join(self, member):
        
        role_id = "123412341234"
        role = self.bot.get_guild(member.guild.id).get_role(int(role_id))

        if role:
            try:
                await member.add_roles(role)
                print(f"Rolle {role.name} wurde an {member.name} vergeben.")
            except Exception as e:
                print(member) 
                print(f"Fehler beim Hinzufügen der Rolle: {e}")
        else:
            print(f"Rolle mit der ID {role_id} konnte nicht gefunden werden.")

def setup(bot):
    bot.add_cog(JoinRoleCog(bot))
``` probier mal so
#

und deine role_id oben einfügen

dusty tiger
#

error?

frosty nexus
#

nope

dusty tiger
#

mach mal debugging

#

also nach jeder line ein print

tawdry leaf
#

wie gesagt liegt am member 🙂

dusty tiger
#

@frosty nexus Hast du Intents im Developer Portal und im Code aktiviert?

tawdry leaf
#

@dusty tiger stinkt

dusty tiger
#

@tawdry leaf stinkt

tawdry leaf
#

geduscht habe ich doch heute

#

du aber nicht

dusty tiger
#

ich nicht c:

tawdry leaf
#

ja kannst neben den hund schlafen

dusty tiger
#

Zeig mal wie du sie im Code angemacht hast

frosty nexus
#
    setup(self)
  File "/home/container/moderation/warn.py", line 61, in setup
    bot.add_cog(WarnCog(bot))
                ^^^^^^^^^^^^
  File "/home/container/moderation/warn.py", line 10, in __init__
    self.create_table()
  File "/home/container/moderation/warn.py", line 14, in create_table
    self.c.execute("""
sqlite3.OperationalError: database or disk is full
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 26, in <module>
    bot.load_extension(f"moderation.{filename[:-3]}")
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 795, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'moderation.warn' raised an error: OperationalError: database or disk is full```



Guten morgen, meine datenbank ist voll und ich würde gerne wissen wie ic diese erweitern kann
fierce dove
#

Starte mal denn bot neu

frosty nexus
fierce dove
#

Ja daran liegt es

frosty nexus
fierce dove
#

Kein Problem

#

Weil ich das auch hatte denn Fehler

dusty tiger
#

3 genickbrüche beim lesen bekommen

fierce dove
#

Oki

pulsar sundial
#

wie kann ich permission auf eine rolle machen?

ruby sparrow
#

Was für role?

#

@pulsar sundial

pulsar sundial
ruby sparrow
#

@pulsar sundial

pulsar sundial
#

wo sind da role?

ruby sparrow
#
@commands.has_role(Deine Role id)``` @pulsar sundial
pulsar sundial
#

habs danke

#

wie kann ich als thumbnail das vom server nehmen?

embed.set_thumbnail(name=ctx.guild)
ruby sparrow
#

Hast du noch?

pulsar sundial
pulsar sundial
#
embed.set_thumbnail(ctx.guild)
        # embed.set_footer(text=f"Blood In von {ctx.author.display_name}")
        embed.set_author(name=ctx.guild)

Fehler:


[ERROR] Error while executing /bloodin 
Traceback (most recent call last):
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
          ^^^^^^^^^^^^^^^
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\Kanun Kartell Bot\cogs\bloodin.py", line 31, in bloodin
    embed.set_thumbnail(ctx.guild)
TypeError: Embed.set_thumbnail() takes 1 positional argument but 2 were given```
dusty tiger
#

Weißt du was das thumbnail ist?

urban glen
#

Moin Jungs
wie fetch'd man in einem Modal Value daten aus einer db?
sprich:
aktuell steht als bsp in der Datenbank: Name: Test123
und im Modal Value soll das dann auch stehen

aber WIE soll man das machen ?

ruby sparrow
urban glen
#

ne das meinte ich nicht, aber alles gut, mein hirn hat bisschen nachgedacht und ich hab nh lösung gefunden

ruby sparrow
#

So denn hab ich falsch verstanden sry @urban glen

nocturne junco
#

Wie kann ich commands in ein embed einfügen, so das wenn jemand drauf drückt, der command direkt in die Message box gepastet wird. So ähnlich wie bei denn Bot Bios, nur als Embed! (Im Bild sind die befehle, die man in die Bot BIo packen kann)

rancid raven
nocturne junco
rancid raven
rancid raven
#

Die id kannste bekomme wenn du rechtsklick auf den command machst bei dem schwarz hinterlegten box

nocturne junco
#

wie mache ich das hier ? ( #💻・cookie-hosting )

fierce dove
#

Wie meinst

nocturne junco
#

pip install --upgrade pip habe ich schon versucht

graceful fiber
#

Hast du das im Terminal eingegeben?

nocturne junco
graceful fiber
#

Weiß nicht tbh ob das online im Server anders ist

#

Aber du musst auch nicht upgraden

#

Wird nichts an der Laufweise von deinem Bot ändern

modest obsidian
#

nur ne kurze frage wenn man ein bot hostet und man die website schließt läuft er trotzdem oder geht er dann offline ?

fierce dove
#

Meinst du keks Hosting

#

@modest obsidian

modest obsidian
fierce dove
#

Kannst die Seite auch schließen

#

Aber du musst jede 7 Tage /extend machen

#

Wenn du es nicht machst wird dein Server suspendiert

modest obsidian
frosty nexus
#

@modest obsidian nicht zu dankensigmadab

frosty nexus
# modest obsidian 😁

wenn du was nicht davon verstanden hast frag, bin froh das ich einaml in meinem leben helfen konnte

graceful fiber
#

Bitte formatieren

#

@modest obsidian

modest obsidian
#
from discord.ext import commands
from discord.commands import slash_command
import datetime
import asyncio
class MorgenundAbend(commands.Cog):
    def init(self, bot: Bot): # type: ignore
        self.bot = bot
        self.good_morning_task = asyncio.create_task(self.good_morning())
        self.good_night_task = asyncio.create_task(self.good_night())

    def cog_unload(self):
        self.good_morning_task.cancel()
        self.good_night_task.cancel()

    async def good_morning(self):
        await self.bot.wait_until_ready()
        while not self.bot.is_closed:
            now = datetime.datetime.utcnow()
            if now.hour == 6 and now.minute == 0:
                channel = self.bot.get_channel(1111799805384081588)
                if channel:
                    await channel.send("Guten Morgen")
            await asyncio.sleep(60)

    async def good_night(self):
        await self.bot.wait_until_ready()
        while not self.bot.is_closed:
            now = datetime.datetime.utcnow()
            if now.hour == 22 and now.minute == 0:
                channel = self.bot.get_channel(1111799805384081588)
                if channel:
                    await channel.send("Gute Nacht")
            await asyncio.sleep(60)

def setup(bot):
    bot.add_cog(ScheduledMessages(bot)) 
frosty nexus
#

from discord import Bot
from discord.ext import commands
from discord.commands import slash_command
import datetime
import asyncio
class MorgenundAbend(commands.Cog):
    def __init__(self, bot: Bot): # type: ignore
        self.bot = bot
        self.good_morning_task = asyncio.create_task(self.good_morning())
        self.good_night_task = asyncio.create_task(self.good_night())

    def cog_unload(self):
        self.good_morning_task.cancel()
        self.good_night_task.cancel()

    async def good_morning(self):
        await self.bot.wait_until_ready()
        while not self.bot.is_closed:
            now = datetime.datetime.utcnow()
            if now.hour == 6 and now.minute == 0:
                channel = self.bot.get_channel(1111799805384081588)
                if channel:
                    await channel.send("Guten Morgen")
            await asyncio.sleep(60)

    async def good_night(self):
        await self.bot.wait_until_ready()
        while not self.bot.is_closed:
            now = datetime.datetime.utcnow()
            if now.hour == 22 and now.minute == 0:
                channel = self.bot.get_channel(1111799805384081588)
                if channel:
                    await channel.send("Gute Nacht")
            await asyncio.sleep(60)

def setup(bot):
    bot.add_cog(ScheduledMessages(bot))```
modest obsidian
#

weil ich habe ein problem mit ScheduledMessages

frosty nexus
modest obsidian
frosty nexus
#

Was ist den dein Zeil davon?

modest obsidian
frosty nexus
nocturne junco
#

Wie kann ich ein Embed bearbeiten, bzw. einen Button,nachdem er ausgeführt wurde zu disable =True stellen ?

nocturne junco
frosty nexus
# modest obsidian Alles gut

ich habe es mir mal angeschaut aber ich kann dir leider nicht sagen woran es liegt, und ich will dir da auch ungerne was falsches sagen

frosty nexus
#

Servus, nach ein paar tagen habe auch ich mal wieder ein fehler ich habe versucht hinter dieses Geheimnis zu kommen.

Und zwar habe ich mich mal an subprocess ran gemacht ich habe mir dazu ein Video angeschaut und alles genauso gemacht aber was in diesem Video nicht gesagt wurde wie man eine bestimmte Nummer der datei bekomme ich will eig die test.py aber bekomme die timo.py kann mir da jemand weiter helfen????

import subprocess


process = subprocess.Popen(['ls'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
print(stdout.decode('utf-8').split('\n')[3])

Kann mir da jemand helfen

frosty nexus
#

@solid ingot du weißt es doch bestimmt magst du mir das kurz sagwn

tawdry leaf
frosty nexus
#

Weisst du auch zufällig wie ich die ausgewählt Datei auch dadurch zu laufen bekomme?

modest obsidian
frosty nexus
tawdry leaf
#

da bist aber so weit weg

frosty nexus
tawdry leaf
#

ja da fehlt ja auch der ganze code dazu 😂

#

du hast die nur aus einer liste ausgewählt

frosty nexus
#

War voll verwirrt

tawdry leaf
#

ja weil alles dazu fehlt 🙂

frosty nexus
frosty nexus
tawdry leaf
frosty nexus
tawdry leaf
#

habe ich bereits geschrieben 😄

#

selbe antwort wie beim benötigen

frosty nexus
tawdry leaf
#

ist immernoch die selbe antwort

frosty nexus
tawdry leaf
#

💀

tawdry leaf
frosty nexus
tawdry leaf
#

dann kümmere dich erstmal darum

frosty nexus
#

+✅

modest obsidian
#

Hey kann mir da jemand helfen das ziel ist das der bot Radio abspielt [ERROR] Error while executing /play
Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py", line 131, in wrapped
ret = await coro(arg)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py", line 1009, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "C:\Users\chris\Documents\Python porjects\Feuer radio\cogs\Radio.py", line 19, in play
await ctx.author.voice.channel.connect() # Bot ist in keinem Voice Channel
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\abc.py", line 1970, in connect
voice = cls(client, self)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\voice_client.py", line 233, in init
raise RuntimeError("PyNaCl library needed in order to use voice")
RuntimeError: PyNaCl library needed in order to use voice

tawdry leaf
#

PyNaCl library needed in order to use voice

modest obsidian
fierce dove
native helm
#
  setup(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback```

```import discord
import ezcord
import aiosqlite
from discord.ext import commands
from discord.commands import slash_command


class AntiLinkDB(ezcord.DBHandler):
    def __init__(self):
        super().__init__("database/antilink.db")

    async def setup(self):
        await self.exec(
            """CREATE TABLE IF NOT EXISTS guilds(
            guildid INTEGER PRIMARY KEY,
            log_channel_id INTEGER DEFAULT NONE
            )"""
        )

    async def set_log_channel_id(self, guild_id, log_channel_id):
        async with self.start() as cursor:
            await cursor.execute("INSERT OR IGNORE INTO guilds (guildid) VALUES (?)", (guild_id,))
            await cursor.execute("UPDATE guilds SET log_channel_id = ? WHERE guildid = ?", (log_channel_id, guild_id))

    async def get_log_channel_id(self, guild_id):
        async with self.start() as cursor:
            await cursor.execute("SELECT log_channel_id FROM guilds WHERE guildid = ?", (guild_id,))
            result = await cursor.fetchone()
            return result[0] if result else None


db = AntiLinkDB()


class AntiLink(ezcord.Cog):
    def __init__(self, bot):
        self.bot = bot

    @slash_command(description=":link: ⨯ Here you can setup your AntiLink")
    async def antilink_setup(self, ctx, logs: discord.TextChannel):
        await db.set_log_channel_id(ctx.guild.id, logs.id)
        antiLink = discord.Embed(
            title=":link: ⨯ Anti Link Setup",
            description=f"You have set the Anti Link Logs channel to {logs.mention}",
            color=discord.Color.green()
        )
        await ctx.respond(embed=antiLink)

    @commands.Cog.listener()
    async def on_message(self, message):
        if not message.author.bot and ("ht tp" in message.content or ".g g/" in message.content):
            log_channel_id = await db.get_log_channel_id(message.guild.id)
            if log_channel_id:
                log_channel = self.bot.get_channel(log_channel_id)
                if log_channel:
                    embed = discord.Embed(
                        title=":link: ⨯ Link Detected",
                        description=f"Message from {message.author.mention} in {message.channel.mention}:\n{message.content}",
                        color=discord.Color.red()
                    )
                    await log_channel.send(embed=embed)
            await message.delete()


async def setup(bot):
    await bot.add_cog(AntiLink(bot))
ruby sparrow
native helm
# native helm ```C:\Users\vison\Desktop\Zio\.venv\lib\site-packages\discord\cog.py:790: Runtim...
Traceback (most recent call last):
  File "C:\Users\vison\Desktop\Zio\.venv\lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 52, in on_message
    log_channel_id = await db.get_log_channel_id(message.guild.id)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 28, in get_log_channel_id
    result = await cursor.fetchone()
AttributeError: 'AntiLinkDB' object has no attribute 'fetchone'```

Code ist oben
raven lotus
#

Weiß jemand, wie man einen Bot mit einem Command neustartet?

ruby sparrow
raven lotus
#

Dankeeeeee

nocturne junco
#

@raven lotus

#

OPS XD

#

sorry, war kein gewollter ping!

native helm
#
import ezcord
import aiosqlite
from discord.ext import commands
from discord.commands import slash_command


class AntiLinkDB(ezcord.DBHandler):
    def __init__(self):
        super().__init__("database/antilink.db")

    async def setup(self):
        await self.exec(
            """CREATE TABLE IF NOT EXISTS guilds(
            guildid INTEGER PRIMARY KEY,
            log_channel_id INTEGER DEFAULT NONE
            )"""
        )

    async def set_log_channel_id(self, guild_id, log_channel_id):
        async with self.start() as cursor:
            await cursor.execute("INSERT OR IGNORE INTO guilds (guildid) VALUES (?)", (guild_id,))
            await cursor.execute("UPDATE guilds SET log_channel_id = ? WHERE guildid = ?", (log_channel_id, guild_id))

    async def get_log_channel_id(self, guild_id):
        async with self.start() as cursor:
            await cursor.execute("SELECT log_channel_id FROM guilds WHERE guildid = ?", (guild_id,))
            result = await cursor.fetchone()
            return result[0] if result else None


db = AntiLinkDB()


class AntiLink(ezcord.Cog):
    def __init__(self, bot):
        self.bot = bot

    @slash_command(description="🔗 ⨯ Here you can setup your AntiLink")
    async def antilink_setup(self, ctx, logs: discord.TextChannel):
        await db.set_log_channel_id(ctx.guild.id, logs.id)
        antiLink = discord.Embed(
            title="🔗 ⨯ Anti Link Setup",
            description=f"You have set the Anti Link Logs channel to {logs.mention}",
            color=discord.Color.green()
        )
        await ctx.respond(embed=antiLink)

    @commands.Cog.listener()
    async def on_message(self, message):
        if not message.author.bot and ("ht tp" in message.content or ".g g/" in message.content):
            log_channel_id = await db.get_log_channel_id(message.guild.id)
            if log_channel_id:
                log_channel = self.bot.get_channel(log_channel_id)
                if log_channel:
                    embed = discord.Embed(
                        title="🔗 ⨯ Link Detected",
                        description=f"Message from {message.author.mention} in {message.channel.mention}:\n{message.content}",
                        color=discord.Color.red()
                    )
                    await log_channel.send(embed=embed)
            await message.delete()


def setup(bot):
    bot.add_cog(AntiLink(bot))```

```[ERROR] Error in event on_message 
Traceback (most recent call last):
  File "C:\Users\vison\Desktop\Zio\.venv\lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 52, in on_message
    log_channel_id = await db.get_log_channel_id(message.guild.id)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 28, in get_log_channel_id
    result = await cursor.fetchone()
AttributeError: 'AntiLinkDB' object has no attribute 'fetchone'```
#

Kann mir einer Helfen

native helm
#

IK aber das geht ja nicht

ruby sparrow
#
import discord
import ezcord
import aiosqlite
from discord.ext import commands
from discord.commands import slash_command

class AntiLinkDB(ezcord.DBHandler):
    def __init__(self):
        super().__init__("database/antilink.db")

    async def setup(self):
        await self.exec(
            """CREATE TABLE IF NOT EXISTS guilds(
            guildid INTEGER PRIMARY KEY,
            log_channel_id INTEGER DEFAULT NONE
            )"""
        )

    async def set_log_channel_id(self, guild_id, log_channel_id):
        async with self.start() as cursor:
            await cursor.execute("INSERT OR IGNORE INTO guilds (guildid) VALUES (?)", (guild_id,))
            await cursor.execute("UPDATE guilds SET log_channel_id = ? WHERE guildid = ?", (log_channel_id, guild_id))

    async def get_log_channel_id(self, guild_id):
        async with self.start() as cursor:
            await cursor.execute("SELECT log_channel_id FROM guilds WHERE guildid = ?", (guild_id,))
            result = await cursor.fetchone()
            return result[0] if result else None

db = AntiLinkDB()

class AntiLink(commands.Cog):  # Corrected from ezcord.Cog
    def __init__(self, bot):
        self.bot = bot

    @slash_command(description="🔗 ⨯ Here you can setup your AntiLink")
    async def antilink_setup(self, ctx, logs: discord.TextChannel):
        await db.set_log_channel_id(ctx.guild.id, logs.id)
        antiLink = discord.Embed(
            title="🔗 ⨯ Anti Link Setup",
            description=f"You have set the Anti Link Logs channel to {logs.mention}",
            color=discord.Color.green()
        )
        await ctx.respond(embed=antiLink)

    @commands.Cog.listener()
    async def on_message(self, message):
        if not message.author.bot and ("ht tp" in message.content or ".g g/" in message.content):
            log_channel_id = await db.get_log_channel_id(message.guild.id)
            if log_channel_id:
                log_channel = self.bot.get_channel(log_channel_id)
                if log_channel:
                    embed = discord.Embed(
                        title="🔗 ⨯ Link Detected",
                        description=f"Message from {message.author.mention} in {message.channel.mention}:\n{message.content}",
                        color=discord.Color.red()
                    )
                    await log_channel.send(embed=embed)
            await message.delete()

def setup(bot):
    bot.add_cog(AntiLink(bot))
#

@native helm

urban glen
#

welches python sollte ich installieren ?

#

die neuste version oder python 3.10 oder ...

welche würdet ihr empfehlen

urban glen
native helm
# ruby sparrow ```py import discord import ezcord import aiosqlite from discord.ext import comm...
Traceback (most recent call last):
  File "C:\Users\vison\Desktop\Zio\.venv\lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 49, in on_message
    log_channel_id = await db.get_log_channel_id(message.guild.id)
  File "C:\Users\vison\Desktop\Zio\commands\Antilink.py", line 27, in get_log_channel_id
    result = await cursor.fetchone()
AttributeError: 'AntiLinkDB' object has no attribute 'fetchone'```
odd kiteBOT
#

Mein Discord Server
https://discord.gg/zfvbjTEzv6

Links aus diesem Video
EzCord Docs ► https://ezcord.readthedocs.io/en/latest/ezcord/sql.html

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Mein Hosting* ► https://tidd.ly/3gJufg6
Code auf Github ► https://github.com/tibue99/ezcord-template

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Inhalt 📚
Heute schauen wir uns an, wie wir Datenbank...

▶ Play video
ruby sparrow
#

guck dir mal das Video an

modest obsidian
#

Hey kann mir jemand helfen bei dem hier [ERROR] Error while executing /ticket
Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py", line 131, in wrapped
ret = await coro(arg)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\commands\core.py", line 1009, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "C:\Users\chris\Documents\Python porjects\Feuer-chris utility\cogs\Ticket.py", line 19, in ticket
await ctx.send(embed=embed, view=ANView())
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\abc.py", line 1651, in send
data = await state.http.send_message(
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 367, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

fierce dove
#

Der bot hat keine rechte

modest obsidian
fierce dove
#

Code

modest obsidian
modest obsidian
ruby sparrow
modest obsidian
ruby sparrow
modest obsidian
#

und der user auch

ruby sparrow
#

Hat der User administrator

#

und er bot

#

@modest obsidian

modest obsidian
ruby sparrow
#

ne

#

die können nicht

#

Die Role braucht administrator 😱

#

@modest obsidian

modest obsidian
ruby sparrow
modest obsidian
#

aber wie kann ich das machen das alle das nutzen oder besser gesagt ein ticket öffnen können

ruby sparrow
#

Die können das alle das recht nur für dem command

#

Die Berechtigung sind nur für die commandsbestimmt nicht für die Buttons

#

@modest obsidian

#

😱

ruby sparrow
modest obsidian
# ruby sparrow Eine frage die ist auch nicht böse gemeint versteht du dem code?

Ja aber die ganze zeit ging es aber auf einmal nicht mehr bekomme das die ganze zeit Ignoring exception in view <ANView timeout=None children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Ticket erstellen' emoji=<PartialEmoji animated=False name='🎟️' id=None> row=None>:
Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ui\view.py", line 426, in _scheduled_task
await item.callback(interaction)
File "C:\Users\chris\Documents\Python porjects\Feuer-chris utility\cogs\Ticket.py", line 60, in button_callback1
ticket_channel = await interaction.guild.create_text_channel(f"ticket-{username}", category=cat, overwrites=overwrites)
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\guild.py", line 1217, in create_text_channel
data = await self._create_channel(
File "C:\Users\chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 373, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In parent_id: Not a category

ruby sparrow
modest obsidian
ruby sparrow
#

Du musst eine Kategorie ange

#

Angeben

modest obsidian
#

danke

ruby sparrow
#

Bitte

ruby sparrow
frosty nexus
#



/home/container/.local/lib/python3.12/site-packages/discord/cog.py:790: RuntimeWarning: coroutine 'setup' was never awaited
  setup(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
automod/modadmin ist geladen
Ignoring exception in on_connect
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.12/site-packages/discord/client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "/home/container/.local/lib/python3.12/site-packages/discord/bot.py", line 1178, in on_connect
    await self.sync_commands()
  File "/home/container/.local/lib/python3.12/site-packages/discord/bot.py", line 735, in sync_commands
    registered_commands = await self.register_commands(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.12/site-packages/discord/bot.py", line 599, in register_commands
    registered = await register("bulk", data, _log=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.12/site-packages/discord/http.py", line 373, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In 7: Application command names must be unique```







kann mir jemand sagen warum dieser error auftritt
ruby sparrow
frosty nexus
ruby sparrow
frosty nexus
#

danke

ruby sparrow
#

Das freut mich sehr das dir geholfen hab(:

frosty nexus
ruby sparrow
frosty nexus
ruby sparrow
#

Bitte

#

komme ich kekse?

frosty nexus
ruby sparrow
#

Hast du auch nur def setup

frosty nexus
ruby sparrow
#

😱

#

Bitte

fierce dove
fierce dove
frosty nexus
#

habe ich

fierce dove
#

Geht es

frosty nexus
#

yes

fierce dove
#

Perfekt

frosty nexus
#

kann mir jemand erklären wie ich mit einem Dropdown menu ein kannal erstellen kann?????? (Ticket skript)

graceful fiber
nocturne junco
#

Habe ein neues Projekt erstellt, und pycord wieder installiert. Und ich kann kein import discord machen. Das system kennt einfach es nicht! Selbst nachdem ich zum 5ten mal Projekt und Pycord + 1x Pycharm neuinstalliert habe!

Hat da irgend wer eine Idee ??

raven lotus
raven lotus
nocturne junco
raven lotus
#

Geh mal zum Terminal und gebe folgendes ein:

pip install py-cord
nocturne junco
#

so ist richtig nh ?

raven lotus
raven lotus
#

Würde ich sagen

nocturne junco
#

Ah supper dankeeee!! :D

#

vielen vielen dank

raven lotus
#

Falls du weitere Fragen hast, schreibe hier was rein

#

(Kannst mich maybe auch Pingen 👀)

nocturne junco
#

@raven lotus weißt du zufällig warum ich die extension nicht laden kann ? (habe iwi das gefühl was vergessen zu haben)

#

der bot token wird natürlich noch resetet ^^ ( nicht das die mods denken ich wäre bissle dumm 👀)

#

ahh ich habs...

#

mensch bin ich blind xD

nocturne junco
raven lotus
thick haven
#

Ich habe mal das dashboard tutortial durch geschau und probiert aber hier ist es sehr komisch

    if datetime.now() > token_expires_at or user.get("code") == 0:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'datetime.datetime' and 'str'   ```

Er printet mir das hier
----> token_expires_at

Code:
token, refresh_token, token_expires_at = session

user = await api.get_user(token)
print(f"----> {token_expires_at}")
if datetime.now() > token_expires_at or user.get("code") == 0:
urban glen
#

code:

    @commands.Cog.listener()
    async def on_ready(self):
        for guild in self.bot.guilds:
            results = await db.get_options(guild.id)
            if not results:
                continue

            for category_id, label_name, label_description in results:
                options = [
                    discord.SelectOption(
                        label=label_name,
                        description=label_description,
                        value=str(category_id),
                        emoji="📁"
                    )
                ]

            message_id = await db.get_message_id(guild.id)
            print(f"message_id : {message_id}")
    async def get_message_id(self, guild_id):
        await self.all("SELECT message_id FROM ticket_system_message_id WHERE guild_id = ?",
            guild_id
        )

ich möchte die message_id von dem guild herausholen aber ich habe mir das mal geprintet und da steht immer

message_id : None
also ich verstehe es nicht

frosty nexus
#

gibt es eine möglichkeit das der bot "diese anwendung Reagiert nicht " nicht mehr sendet sonder nur die eigentliche nachricht

ruby sparrow
frosty nexus
tawdry leaf
#

Cool

frosty nexus
fierce dove
frosty nexus
fierce dove
frosty nexus
fierce dove
frosty nexus
#

Aber lern mittlerweile sehr viel neues seit dem ich aktiv Keks schaue

fierce dove
#

Oha

#

🙂

frosty nexus
#

wie kann man das machen

ruby sparrow
#

Er hat dazu ein Video gemacht

ruby sparrow
#

Hier

frosty nexus
tawdry leaf
fierce dove
#

Ok

frosty nexus
#

kann mir ihrget jemand sagen wofür das gut ist

fierce dove
#

Ka

tawdry leaf
frosty nexus
solid ingot
violet pendant
#

was tun?

#

(ich will pip installieren damit ich meinen bot hosten kann)

fierce dove
#

Bisschen mehr

#

Text sonst könnrn wir dir nicht helfen

tawdry leaf
next echo
#

Hat wer auch das selbe Problem das aufeinmal PyCharm nicht mehr mit GitHub verknüpft ist und wenn man es neu verknüpfen will es nicht klappt obwohl man alles richtig macht?

tawdry leaf
#

ne benutzte vsc 👀

vast cradle
#

Gibt es so was in Pycord

ruby sparrow
#

Ne

vast cradle
#

Schade

#

Ist ja dieses neue Umfrage funktion

#

Von Discord

tawdry leaf
#

ja gibt es nur in discord

#

sind einf nur emojis

frosty nexus
#

ist es möglich mit einem Modal eine art suche zu machen ?

Sprich wenn man zum Beispiel einen Namen mit einem anderen command eingetragen hat und da sind jz angenommen 100 hundert Namen drinnen kann man die suche mit dem modal verkürzen in dem man den gesuchten Namen in dem modal einträgt ???

graceful fiber
#

Aber am ehesten fällt mir zu suche nur autocomplete ein

odd kiteBOT
#

Mein Discord Server
https://discord.gg/zfvbjTEzv6

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Mein Hosting* ► https://tidd.ly/3gJufg6
Code auf Github ► https://github.com/tibue99/tutorial-bot

PYCORD
Docs ► https://docs.pycord.dev/
Guide ► https://guide.pycord.dev/introduction/
Discord Server ► https://discord.gg/pycord

Discord Developer Portal ► https://discord...

▶ Play video
frosty nexus
# graceful fiber Aber am ehesten fällt mir zu suche nur autocomplete ein

also angngenommen ich mache /user_register {user_name} und dieses sache wird in einer db gespeichert,
und wenn ich dann /show_user mache wird ein embed mit alle usern und einem button gesendet der button heißt Nach bestimmten user suchen und dann kommt ein modal und da kannst du dan den namen eingeben und dann wird dir nur der user mit seiner id angezeigt

#

Checkst du?

dull siren
#

kann mir wer helfen warum das nicht geht?

ruby sparrow
urban glen
dull siren
dull siren
urban glen
#

hm existiert halt nicht in den dateien

urban glen
#
[ERROR] Error in event on_ready 
Traceback (most recent call last):
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\ezcord\bot.py", line 435, in _check_cog_groups
    if cog.group not in self.cogs.keys():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'SlashCommandGroup'

Irgendwer ein Plan was das bedeuten könnte? benutzte ezcord.

Code:

import ezcord
from pycord import multicog

class BlackSwipeBot(multicog.Bot, ezcord.Bot):
    pass

bot = BlackSwipeBot()
bot.load_cogs(subdirectories=True, log=ezcord.CogLog.all_cogs)
tawdry leaf
#

was genau soll multicog machen 😅

urban glen
tawdry leaf
#

als ob man das nicht ohne multicog kann ?

urban glen
urban glen
#

wenn du normal eine gruppe erstellst dann müssen alle subcommands in dem Cog sein

urban glen
tawdry leaf
urban glen
urban glen
#
[ERROR] Error in event on_connect 
Traceback (most recent call last):
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\bot.py", line 1178, in on_connect
    await self.sync_commands()
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\bot.py", line 735, in sync_commands
    registered_commands = await self.register_commands(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\bot.py", line 599, in register_commands
    registered = await register("bulk", data, _log=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\http.py", line 373, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In 47: Application command names must be unique
[ERROR] Error in event on_ready 
Traceback (most recent call last):
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\ezcord\bot.py", line 435, in _check_cog_groups
    if cog.group not in self.cogs.keys():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'SlashCommandGroup'
#

also nicht genau das gleiche aber der TypeError ist trotzdem da

tawdry leaf
#

dann liegt es wohl an der Class

urban glen
#

"Application command names must be unique" kommt halt weil man ohne multicog das mit den gruppen nicht machen darf

tawdry leaf
urban glen
#

jaja es geht mir ja um TypeError: unhashable type: 'SlashCommandGroup' der von ezcord ausgelöst wird

tawdry leaf
#

und multicog geht nicht ohne multicog.Bot?

urban glen
#

und für ezcord halt auch

tawdry leaf
#

wird denke das problem sein 😅

urban glen
#

hä?

urban glen
#
class BlackSwipeBot(ezcord.Bot):
    def __init__(self):
        super().__init__(error_handler=False)

bot = BlackSwipeBot()
bot.load_cogs(subdirectories=True, log=ezcord.CogLog.all_cogs)
#

wenn ichs so mache kommt doch genau das gleiche

tawdry leaf
#

weil du wie du sagst dafür mutlcog brauchst

urban glen
#

ist ja logisch. Mir geht es um TypeError: unhashable type: 'SlashCommandGroup'

tawdry leaf
#

richtig

urban glen
#

der wie ich schon 5 mal sagte von ezcord asugelöst wird

tawdry leaf
#

issue

urban glen
#

ich kann ja wohl nicht der einzige sein der SlashCommandGroups benutzt

tawdry leaf
#

hm da bin ich mir nicht sicher, das könnte schwierig werden
ich hoffe das py-cord das irgendwann als standard-funktionalität einbaut

#

deine Frage wurde denke ich schon mal beantwortet 🙂

#

Frage: #1019974414487535736 message

Antwort:
#1019974414487535736 message

tawdry leaf
urban glen
tawdry leaf
#

denk nochmal über den error nach 🙂

urban glen
#
[ERROR] Error in event on_ready 
Traceback (most recent call last):
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\ezcord\bot.py", line 435, in _check_cog_groups
    if cog.group not in self.cogs.keys():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'SlashCommandGroup'
#

DER HIER

tawdry leaf
#

das ist nicht der

urban glen
#

ES GEHT UM DEN ABER

tawdry leaf
urban glen
tawdry leaf
#

du hast oben im error noch multicog im code benutzt würde ich mal behaupten

urban glen
#

also ich sehe da kein multicog

#

du schlaumeier

tawdry leaf
#

ich sagte im oberen error wieso denn so angefressen 😂

#

du brauchst hilfe also benehm dich doch normal 🤔

urban glen
#

weil du so tust als ob du alles besser wüsstest aber irgednwie nur quatsch erzählst

#

du gehst mir echt ordentlich auf die nerven grade

tawdry leaf
urban glen
#

Ich denke nicht

tawdry leaf
#

wieso antwortet timo dir dann nicht peppoHey

urban glen
#

Aber gut, ich denke nicht dass du helfen kannst also lassen wir es dabei

urban glen
tawdry leaf
#

was habe ich den damit zu tun das timo dir nicht antwortet 😂

urban glen
#

Du hast doch grad behauptet ich würde mich nicht klar ausdrücken

tawdry leaf
urban glen
#

Hab ich jetzt auf die falsche Nachricht von dir geantwortet und das war schon zu kompliziert für dich, ja?

tawdry leaf
urban glen
tawdry leaf
#

😮

#

hochmut kommt bekanntlich vor den Fall

urban glen
#

Fangen wir nochmal neu an.

Code:

import ezcord

from config import config

bot = ezcord.Bot(error_handler=False)

TESTING = True

if __name__ == '__main__':
    bot.load_cogs(subdirectories=False, log=ezcord.CogLog.all_cogs, ignored_cogs='add_views')
    token = TESTING and config.testing_token or config.token
    bot.run(token)

Error:

[ERROR] Error in event on_ready 
Traceback (most recent call last):
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\discord\client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\louis\Desktop\blackswipe-rework\.venv\Lib\site-packages\ezcord\bot.py", line 435, in _check_cog_groups
    if cog.group not in self.cogs.keys():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'SlashCommandGroup'

pycord-multicog ist deinstalliert, daran liegt es also nicht.

tawdry leaf
urban glen
#

Moment

tawdry leaf
#
class admin(ezcord.Cog,):
    blacklist = SlashCommandGroup("blacklist", "Blacklist commands", guild_ids=[493422342635126786],default_member_permissions=discord.Permissions(administrator=True)```
so sieht bei mir eine SlashCommandGroup aus
urban glen
#
class EmbedTemplate(commands.Cog):
    def __init__(self, bot: discord.Bot) -> None:
        self.bot = bot

    group = discord.SlashCommandGroup('embed_template', 'Save / load embeds.', **command_args)

    @group.command(name='load', description='Load a saved embed from database.')
    async def load_embed(self, ctx: discord.ApplicationContext, ...):
       pass
#

das ist ein random beispiel

#

hat auch so nie probleme gemacht, auch vor multicog was ja in dem fall grad irrelevant ist

tawdry leaf
#

also so geht des bei mir auch:

import discord
from discord.ext import commands
class EmbedTemplate(commands.Cog):
    def __init__(self, bot: discord.Bot) -> None:
        self.bot = bot

    group = discord.SlashCommandGroup('embed_template', 'Save / load embeds.')

    @group.command(name='load', description='Load a saved embed from database.')
    async def load_embed(self, ctx: discord.ApplicationContext):
        pass


def setup(bot):
    bot.add_cog(EmbedTemplate(bot))```
#

und der cmd ist auch registriert also daran liegt es auch nicht

urban glen
tawdry leaf
#

hast du vsc mal neugestartet 😅

urban glen
#

Also der command ist trotzdem registiert

tawdry leaf
#

Also ich habe öfter des problem das der code geht aber ich bei vsc einen error bekomme (ka warum) starte neu und es geht einwandffrei

urban glen
tawdry leaf
#

hm also wenn dann vllt die py-cord version aktualisieren

urban glen
#

grad erst in der venv installiert, ist also aktuell

#

py-cord==2.5.0

#

ezcord==0.6.4

tawdry leaf
#

hm okay ich benutze 2.5.1

#

aber ist beta

tawdry leaf
urban glen
#

hm?

tawdry leaf
#

weil dein code geht bei mir einwandfrei

tawdry leaf
urban glen
#

ne, 3.11.0

tawdry leaf
#

dann könnte es daran liegen

urban glen
#

in welcher hinsicht? zu "alt"?

#

weil das kommt mir sehr unwahrscheinlich vor

tawdry leaf
#

ich denke evtl. gibt es in ezcord was des es seit 3.12 nur gibt

#

anders wüsste ich nicht woran es liegen sollte wir haben die selbe ezcord version

urban glen
#

ich finds auch komisch

#

ich probier mal 3.12.2

tawdry leaf
#

laut github reicht 3.9 oder höher 🤔

urban glen
#

ja ändert auch nix mit 3.12.2

tawdry leaf
#

Hm

#

Wäre auch irgendwie komisch gewesen

urban glen
#

jo

tawdry leaf
#

Nur zum Verständnis im error steht ja die eine Zeile von ezcord und die sagt doch das der error kommt weil ein Key in einen cog ist „zu dem er nicht gehört „

tawdry leaf
# urban glen jo

Wenn du dir den error Code bei ezcord anschaust sagt des dir was woran es liegen könne ?

#

Ich bin der Meinung wenn du nur die Main.py mit den einen cog startest kann der error nicht kommen der dort steht 😅

Also würde ich des Problem haben würde ich vsc komplett alle tasks killen und es wieder versuchen 💀😂

#

Weil der error eben so keinen Sinn macht weil es nur eine cog group zum laden gibt

urban glen
#

Ich denke es kommt zum unhashable type error weil versucht wird zu schauen ob cog.group (welche den Typ SlashCommandGroup hat) member von den cogs.keys() ist. Wenn das der Fall ist und slashcommandgroup nicht hashable ist weiß ich nicht warum es überhaupt jemals funktionieren sollte 😅

#

Macht auf jeden Fall kein Sinn so

tawdry leaf
#

Mich wundert es das es bei mir geht und bei dir nicht sigmadab

#

Einf später nochmal probieren dann geht es so Mythos mäßig

#

So wie ich vsc eben kenne 😂

tawdry leaf
urban glen
#

Für mich unerklärlich

tawdry leaf
#

Es muss an vsc legen anders gehts nicht

urban glen
#

Vor allem geht der Command ja trotzdem, es kommt einfach dieser Error

#

keine Ahnung was Timo mit dem Part vor hat

urban glen
#

Du bist ein vsc hater

tawdry leaf
#

Ne ich mag vsc aber ezcord macht nur Probleme in vsc

urban glen
#

Nur weil Timo pycharm benutzt? Fände ich ja ziemlich schlecht gemacht dann

#

Ich denke ich werde ezcord dann einfach nicht benutzen

tawdry leaf
#

😂

tawdry leaf
tawdry leaf
#

Aber so wie du jz ezcord benutzt erfüllt es nicht wirklich seinen nutzen

tawdry leaf
#

Du kannst ezcord.Cog nehmen und dann direkt die Commands bzw. Groups darunter die init ist in der Cog von ezcord

native helm
#

aiocache==0.12.2
aioconsole==0.5.1     
aiofiles==22.1.0      
aiohttp==3.7.4.post0  
aiosignal==1.3.1      
aiosqlite==0.19.0     
altgraph==0.17.4      
annotated-types==0.6.0
anyio==3.6.2
asgiref==3.7.2        
async-timeout==3.0.1  
asyncpg==0.28.0       
attrs==22.2.0
beautifulsoup4==4.11.2
better-ipc==2.0.3     
bitarray==2.9.2       
blinker==1.7.0        
Brotli==1.1.0
bs4==0.0.2
certifi==2022.12.7
cffi==1.16.0
chardet==4.0.0
charset-normalizer==3.0.1
chat_exporter==2.7.1
click==8.1.3
colorama==0.4.6
colored==2.2.4
crypto_cpp_py==1.4.4
cryptography==42.0.7
cursor==1.3.5
cytoolz==0.12.3
DateTime==5.5
discord-webhook==1.3.1
discum==1.1.0
easy-pil==0.3.3
easygui==0.98.3
ecdsa==0.18.0
emoji==2.11.1
eth-account==0.11.0
eth-hash==0.7.0
eth-keyfile==0.8.0
eth-keys==0.5.0
eth-rlp==1.0.1
eth-typing==4.0.0
eth-utils==4.0.0
eth_abi==5.0.1
exceptiongroup==1.2.0
ezcord==0.6.4
fade==0.0.9
fake-useragent==1.5.1
Faker==24.3.0
fastapi==0.110.2
fernet==1.0.1
ffmpeg-python==0.2.0
filetype==1.2.0
Flask==2.2.2
frozenlist==1.4.1
future==0.18.3
gevent==24.2.1
google-re2==1.1.20240501
grapheme==0.6.0
greenlet==3.0.3
h11==0.12.0
hexbytes==0.3.1
httpcore==0.15.0
httpx==0.23.0
idna==3.4
imageio-ffmpeg==0.4.9
itsdangerous==2.1.2
Jinja2==3.1.2
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
keyboard==0.13.5
lark==1.1.9
loguru==0.7.1
lru-dict==1.3.0
MarkupSafe==2.1.2
marshmallow==3.21.1
marshmallow-dataclass==8.4.2
marshmallow-oneofschema==3.1.1
MouseInfo==0.1.3
mpmath==1.3.0
multidict==6.0.4
mypy-extensions==1.0.0
nest-asyncio==1.6.0
numpy==1.26.3
outcome==1.3.0.post0
packaging==24.0
parsimonious==0.9.0
pefile==2023.2.7
PIL-Tools==1.1.0
Pillow==10.1.0
plyer==2.1.0
poseidon_py==0.1.4
prompt-toolkit==3.0.36
protobuf==5.26.0
psutil==5.9.8
py-cord==2.5.0
pyaes==1.6.1
PyAutoGUI==0.9.54
pycparser==2.21
pycryptodome==3.20.0
pycurl==7.45.3
pydantic==2.7.1
pydantic_core==2.18.2
PyGetWindow==0.0.9
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
pylibcheck==0.2.2
PyMsgBox==1.0.9
pynput==1.7.7
pyperclip==1.8.2
pypiwin32==223
pypresence==4.3.0
PyRect==0.2.0
PyScreeze==0.1.30
PySocks==1.7.1
pystyle==2.9
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytube==15.0.0
pytweening==1.2.0
pytz==2024.1
pyunormalize==15.1.0
pywin32==306
pywin32-ctypes==0.2.2
PyYAML==6.0.1
questionary==2.0.1
random-user-agent==1.0.1
referencing==0.34.0
regex==2023.12.25
requests==2.31.0
requests-futures==1.0.1
requests-toolbelt==1.0.0
rfc3986==1.5.0
rlp==4.0.0
rpds-py==0.18.0
selenium==4.18.1
sellpass==1.0
six==1.16.0
sniffio==1.3.0
sortedcontainers==2.4.0
soupsieve==2.5
starknet-py==0.18.3
starlette==0.37.2
sympy==1.11.1
tabulate==0.9.0
tasksio==0.0.0
termcolor==2.4.0
terminut==0.0.0.940
tinyaes==1.1.0
tls-client==1.0.1
toml==0.10.2
toolz==0.12.1
tqdm==4.66.1
trio==0.24.0
trio-websocket==0.11.1
typing-inspect==0.9.0
typing_extensions==4.11.0
ua-parser==0.18.0
ujson==5.9.0
undetected-chromedriver==3.5.5
urllib3==1.26.14
uvicorn==0.29.0
veilcord==0.0.7.5
wcwidth==0.2.13
web3==6.9.0
webdriver-manager==4.0.1
websocket==0.2.1
websocket-client==1.8.0
websockets==12.0
Werkzeug==2.2.3
win32-setctime==1.1.0
wsproto==1.2.0
yarl==1.8.2
zipp==3.13.0
zope.event==5.0
zope.interface==6.2```
#
Traceback (most recent call last):
  File "c:\Users\vison\OneDrive\Desktop\Royal market\Main.py", line 8, in <module>
    intents = discord.Intents.all()
AttributeError: module 'discord' has no attribute 'Intents'
odd kiteBOT
#

@native helm

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

DateTime==5.5```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
native helm
solid ingot
#

deinstalliere discord-webhook und installiere py-cord neu

native helm
#

geht schon

urban glen
#

code:

class ButtonView(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)

    @discord.ui.button(label="Generate Image", style=discord.ButtonStyle.primary, custom_id="generate_image")
    async def generate_image(self, button, interaction):
        # Load background image
        background = Editor("C:/Users/melvi/PycharmProjects/background.png").resize((800, 250))


        random_text = ''.join(random.choices(string.ascii_letters + string.digits, k=6))


        font = Font.poppins(size=90, variant="bold")



        background.text((438, 126), random_text, color="black", font=font, align="center")

        file = discord.File(fp=background.image_bytes, filename="image.png")
        await interaction.response.send_message("Image", file=file, ephemeral=True)

imports

import discord
from discord.ext import commands
from discord.commands import SlashCommandGroup, slash_command
from easy_pil import Editor, Font

import random
import string

wie kann ich den random text so verzerren

next echo
#

Kann man auch machen das man eine bestimmte Rolle braucht anstatt Berechtigung und wenn ja wie?

@discord.default_permissions(administrator=True)
next echo
#

Meine ohne die Servereinstellungen zu benutzen

#

Aber mal andere Frage wie kann ich machen das die Blacklist die groß und kleinschreibung ignoriert? (Also das wenn man z. B tEsT schreibt die Blacklist trotzdem getriggert wird)

Owner = {"Test"}
Blacklist = []
Blacklist.extend(Owner)

class test(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @slash_command(description="Test")
    @discord.guild_only()
    async def test(self, ctx, name):
     if name in Blacklist:
      embed = discord.Embed(
         color=0x660000,
         title="Error",
         description="Dieser Account befindet sich auf der Blacklist."
     )
      embed.set_thumbnail(url="url")

      await ctx.respond(embed=embed, ephemeral=True)
     else:
next echo
tawdry leaf
#

wie du es eig schreibst.

fierce dove
#

Ka

tawdry leaf
#

also

tawdry leaf
next echo
#

okay

tawdry leaf
fierce dove
#

Haha

tawdry leaf
#

habe einf den ezcord code entfernt und es geht

tawdry leaf
# next echo okay
    @slash_command(description="Test")
    @discord.guild_only()
    async def test(self, ctx, name: str):
        Owner = ["lucky220804"]
        Blacklist = {name.lower() for name in Owner}
        if name.lower() in Blacklist:
            embed = discord.Embed(
                color=0x660000,
                title="Error",
                description="Dieser Account befindet sich auf der Blacklist."
            )

            await ctx.respond(embed=embed, ephemeral=True)
        else:
            await ctx.respond("Name nicht in der Blacklist.")

so kannst du des abfragen

tawdry leaf
#

kd

fleet fossil
#

kann mir jemand helfen pelican zu installieren bekomme es nicht hin zu laufen zu bringen und habe es mehrmals probiert

tawdry leaf
#

hast a des video gschaut

fleet fossil
tawdry leaf
#

ok

next echo
#

Wie kann ich dieses Problem beheben?

Code:

response.json()["data"]["featured"]["entries"]["newDisplayAsset"]["materialInstances"]["Images"]["icon"]

Error:

Application Command raised an exception: TypeError: list indices must be integers or slices, not str
ruby sparrow
#

response.json()["data"]["featured"]["entries"][0]["newDisplayAsset"]["materialInstances"]["Images"]["icon"]
#

@next echo

next echo
#

also das selbe

#

@ruby sparrow

ruby sparrow
#

Denn ka

urban glen
#

und guck dir die struktur an,

#

irgednwas davon ist eine liste und kein dict

next echo
#

hat sich schon erledigt

#

aber trotzdem danke

urban glen
urban glen
#

code:

class ButtonView(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)

    @discord.ui.button(label="Generate Image", style=discord.ButtonStyle.primary, custom_id="generate_image")
    async def generate_image(self, button, interaction):
        # Load background image
        background = Editor("C:/Users/melvi/PycharmProjects/background.png").resize((800, 250))


        random_text = ''.join(random.choices(string.ascii_letters + string.digits, k=6))


        font = Font.poppins(size=90, variant="bold")



        background.text((438, 126), random_text, color="black", font=font, align="center")

        file = discord.File(fp=background.image_bytes, filename="image.png")
        await interaction.response.send_message("Image", file=file, ephemeral=True)

imports

import discord
from discord.ext import commands
from discord.commands import SlashCommandGroup, slash_command
from easy_pil import Editor, Font

import random
import string

wie kann ich den random text so verzerren

urban glen
#

Wie verzerren

nocturne junco
#

Server startet nicht!

graceful fiber
nocturne junco
graceful fiber
#

Da steht schon alles drin erstmal

nocturne junco
graceful fiber
nocturne junco
#

also hilft mir #🔍・pycord-help nicht weiter.

graceful fiber
#

Sicher dass deine datei
requirements**.txt** heißt?

nocturne junco
#

naja habe halt requirements hingeschrieben .txt wird ja normalerweise automatisch gemacht wegen plain text

#

aber ich probier mal, durch das manuelle hinzufügen von .txt

nocturne junco
graceful fiber
#

Plain Text muss keine txt Datei sein 🙂

graceful fiber
nocturne junco
#

@graceful fiber was muss ich hinschreiben wenn er sqlite3 installieren soll ?

graceful fiber
#

Ka, schau einfach mal wie es bei pip heißt

#

Oder wie es auf deinem Rechner installiert ist

#

pip list

nocturne junco
#

ah okay danke

graceful fiber
tired hearth
#

Wie erstelle ich eine command bzw. ändere ihn sodas man ihn überall nutzten kann?

tired hearth
native helm
#

du darfst halt keine Guild_id Haben in der main dann geht es

tired hearth
native helm
#

dann müsste es gehen

tired hearth
#

Ich möchte das hier

#

@native helm

native helm
#

ah soll ich tuto machen

tired hearth
native helm
tired hearth
tired hearth
#

Das was du im Video machtest habe ich ja schon

#

@native helm

native helm
#

ja müsst nichts mehr machen

tired hearth
native helm
#

Druck strg R

tired hearth
fierce dove
#

Wie kann ich anzeigen lassen im embed das immer nur 10 unser auf eine Seite sind

class LeaderboardPaginator(discord.ui.View):
    def __init__(self, bot, ctx, rows, page_type):
        super().__init__()
        self.bot = bot
        self.ctx = ctx
        self.rows = rows
        self.page_type = page_type
        self.current_page = 0
        self.items_per_page = 10
        self.embeds = self.create_embeds()

    def format_currency(self, amount):
        return f'{amount:,}'

    def create_embeds(self):
        embeds = []
        current_embed = discord.Embed(color=discord.Color.blue())
#
       if self.page_type == "cash":
            current_embed.title = "Cash Leaderboard"
            rows = sorted(self.rows, key=lambda x: x[1], reverse=True)
        elif self.page_type == "bank":
            current_embed.title = "Bank Leaderboard"
            rows = sorted(self.rows, key=lambda x: x[2], reverse=True)
        else:
            current_embed.title = "Total Leaderboard"
            rows = sorted(self.rows, key=lambda x: x[1] + x[2], reverse=True)

        for i, row in enumerate(rows):
            if len(current_embed.fields) >= 10:
                embeds.append(current_embed)
                current_embed = discord.Embed(color=discord.Color.blue())
                if self.page_type == "cash":
                    current_embed.title = "Cash Leaderboard"
                elif self.page_type == "bank":
                    current_embed.title = "Bank Leaderboard"
                else:
                    current_embed.title = "Total Leaderboard"
            
            member = self.ctx.guild.get_member(row[0])
            if member is not None:
                if self.page_type == "cash":
                    value = f"{money} {self.format_currency(row[1])}"
                elif self.page_type == "bank":
                    value = f"{money} {self.format_currency(row[2])}"
                else:
                    value = f"{money} {self.format_currency(row[1] + row[2])}"
                current_embed.add_field(name=f"{i + 1}. {member}", value=value, inline=False)

        if current_embed.fields:
            embeds.append(current_embed)

        return embeds
#

Aber wie bekomme ich das hin

#

Command

@slash_command(name="leaderboard", description="Zeigt die Bestenliste der Bankkonten an")
    async def leaderboard(
        self,
        ctx: discord.ApplicationContext,
        page: Option(str, choices=["cash", "bank", "total"], default="cash"),
    ):
        async with aiosqlite.connect(self.db) as db:
            cursor = await db.execute(
                """
                SELECT user_id, cash_balance, bank_balance FROM bank_accounts
                WHERE cash_balance >= 0 AND bank_balance >= 0
                """
            )
            rows = await cursor.fetchall()
        
        view = LeaderboardPaginator(self.bot, ctx, rows, page)
        embed = view.embeds[0]
        await ctx.respond(embed=embed, view=view, ephemeral=True)                          
fierce dove
#

Danke

tired hearth
urban glen
#

suchst du was @indigo sleet ?

indigo sleet
ruby sparrow
indigo sleet
#

ok

chilly gust
#

Kann mir wer helfen mit kekshosting vlt ich bekomms nd hin den server on zu schalten ^^

chilly gust
#

ich hab meine requirements liste zusammen geschrieben allerdings sagt er mir er findet kein import discord xD

ruby sparrow
#

Zeig deine requirements

chilly gust
#

py-cord
dotenv
aiohttp
aiosqlite
FFmpegPCMAudio
requests
datetime
aiosqlite

das sind sie

ruby sparrow
#

Hast du auch dahinter .txt geschrieben

chilly gust
#

ja

ruby sparrow
#

zeig mal auf bild

chilly gust
odd kiteBOT
#

@chilly gust

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

datetime```
⚠️ Eventuell hast du falsche Packages installiert
```yml

dotenv -> python-dotenv```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
ruby sparrow
#

@chilly gust

chilly gust
#

k

#

klappt trotzdem nicht xD

#

ah ich hab den fehler gefunden jetzt ist die frage wie installiere ich ffmpegpcaudio auf dem server?

ruby sparrow
#

py-cord
python-dotenv

aiosqlite

requests

aiosqlite

das sind sie

chilly gust
#

vergiss es ich habs hinbekommen xD danke fürs helfen

ruby sparrow
#

Bitte

frosty nexus
#

nach langer zeit melde ich mal wieder

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3277904470>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/py-cord/```
ruby sparrow
#

Was geht nicht?

frosty nexus
ruby sparrow
#

?

tawdry leaf
#

Hoppla

urban glen
#

moin jungs, mal eine frage:
weiß jmd wieso "Option" gelb markiert wird?

nutze die neuste pycord version und Python 3.11.9 64-bit

tired hearth
#

was mache ich hier falsch?

graceful fiber
#

Code^^

tired hearth
#
bot = ezcord.Bot(discord.Intents.all(), language="de",
                 default_command_contexts={
                     InteractionContextType.guild,
                     InteractionContextType.bot_dm,
                     InteractionContextType.private_channel
                 },
                 default_command_integration_types={
                     InteractionType.guild_install,
                     InteractionType.user_install```
#

@graceful fiber

tired hearth
urban glen
#

ist aber alles richtig

fierce dove
#

Ne Frage

Kann Mann ne API nutzen wenn die nur in ja ist aber ich will die python haben geht das

urban glen
#

Wenn du meinst ob du den wrapper von js benutzen kannst dann nein

#

Aber kannst selber die api calls machen

fierce dove
#

Aber wie

limpid wolf
fierce dove
#

Ah ok

tired hearth
fierce dove
#
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/discord/ui/view.py", line 426, in _scheduled_task
    await item.callback(interaction)
  File "/storage/emulated/0/Documents/Twitter/cogs/Shift.py", line 74, in onduty_time
    await interaction.response.send_message("Keine Schichten vorhanden.", ephemeral=True)
          ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Button' object has no attribute 'response'
#
    @discord.ui.button(label="On-Duty-Zeit", style=discord.ButtonStyle.gray)
    async def onduty_time(self, interaction: discord.Interaction, button: discord.ui.Button):
        async with aiosqlite.connect('schicht_bot.db') as db:
            async with db.execute(
                "SELECT eingeloggt_am, ausgeloggt_am, gesamt_zeit FROM schichten WHERE user_id = ?",
                (self.user_id,)
            ) as cursor:
                schicht_info = await cursor.fetchone()
                if schicht_info:
                    eingeloggt_am, ausgeloggt_am, gesamt_zeit = schicht_info
                    if eingeloggt_am and not ausgeloggt_am:
                        eingeloggt_am_dt = datetime.strptime(eingeloggt_am, '%Y-%m-%d %H:%M:%S')
                        onduty_time = (datetime.now() - eingeloggt_am_dt).total_seconds() / 60  # in Minuten
                        gesamt_zeit += onduty_time

                    await interaction.response.send_message(
                        f"Du warst insgesamt {int(gesamt_zeit // 1440)} Tage, {int((gesamt_zeit % 1440) // 60)} Stunden und {int(gesamt_zeit % 60)} Minuten im Dienst.",
                        ephemeral=True
                    )
                else:
                    await interaction.response.send_message("Keine Schichten vorhanden.", ephemeral=True)
fierce dove
#

@tawdry leaf hilffeee

urban glen
#

Bei den Parametern

fierce dove
#

Danke

tawdry leaf
tawdry leaf
fierce dove
#

Freese

indigo sleet
#

was ist hier los?

fierce dove
#

Nixnix

indigo sleet
#

seinbar doch

urban glen
graceful fiber
cloud cedar
frosty nexus
#
import discord
from discord.ext import commands
import random

class Personalausweis(commands.Cog):
    def __init__(self, bot: discord.Bot):
        self.bot = bot
        self.persos = {}

    def generiere_perso_id(self):
        return ''.join([str(random.randint(0, 9)) for _ in range(4)])

    @commands.command(name='erstelle_perso')
    async def erstelle_perso(self, ctx):
        def check(m):
            return m.author == ctx.author and m.channel == ctx.channel

        await ctx.send("Bitte gib deinen Vornamen ein:")
        vorname_msg = await self.bot.wait_for('message', check=check)
        vorname = vorname_msg.content

        await ctx.send("Bitte gib deinen Nachnamen ein:")
        nachname_msg = await self.bot.wait_for('message', check=check)
        nachname = nachname_msg.content

        await ctx.send("Bitte gib dein Geburtsdatum ein (TT.MM.JJJJ):")
        geburtsdatum_msg = await self.bot.wait_for('message', check=check)
        geburtsdatum = geburtsdatum_msg.content

        await ctx.send("Bitte gib deinen Geburtsort ein:")
        geburtsort_msg = await self.bot.wait_for('message', check=check)
        geburtsort = geburtsort_msg.content

        # Generiere eine zufällige 4-stellige Zahl als ID
        perso_id = self.generiere_perso_id()

        # Speichere den Personalausweis
        if ctx.author.id not in self.persos:
            self.persos[ctx.author.id] = []
        
        perso_data = {
            "vorname": vorname,
            "nachname": nachname,
            "geburtsdatum": geburtsdatum,
            "geburtsort": geburtsort,
            "perso_id": perso_id
        }
        self.persos[ctx.author.id].append(perso_data)

        embed = discord.Embed(title="Dein Personalausweis", color=discord.Color.blue())
        embed.add_field(name="Name", value=f"{vorname} {nachname}", inline=False)
        embed.add_field(name="Geburtsdatum", value=geburtsdatum, inline=False)
        embed.add_field(name="Geburtsort", value=geburtsort, inline=False)
        embed.add_field(name="Perso-ID", value=perso_id, inline=False)

        await ctx.send(embed=embed)
        await ctx.author.send(embed=embed)

    @commands.command(name='id')
    async def perso_id(self, ctx, perso_id: str = None):
        if not perso_id:
            if ctx.author.id in self.persos and self.persos[ctx.author.id]:
                ids = [perso["perso_id"] for perso in self.persos[ctx.author.id]]
                await ctx.send(f"Deine Personalausweis-IDs: {', '.join(ids)}")
            else:
                await ctx.send("Du hast noch keine Personalausweise erstellt.")
            return

        found = False
        for user_id, persos in self.persos.items():
            for perso in persos:
                if perso["perso_id"] == perso_id:
                    found = True
                    embed = discord.Embed(title="Personalausweis-ID", color=discord.Color.green())
                    embed.add_field(name="Perso-ID", value=perso['perso_id'], inline=False)
                    await ctx.send(embed=embed)
                    break
            if found:
                break
        if not found:
            await ctx.send("Personalausweis mit dieser ID wurde nicht gefunden.")

def setup(bot: discord.Bot):
    bot.add_cog(Personalausweis(bot))```
#

ERROR:

  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 790, in _load_from_module_spec
    setup(self)
  File "/home/container/DMV/personalausweis.py", line 84, in setup
    bot.add_cog(Personalausweis(bot))
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 660, in add_cog
    cog = cog._inject(self)
          ^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 568, in _inject
    raise e
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 562, in _inject
    bot.add_command(command)
    ^^^^^^^^^^^^^^^
AttributeError: 'Bot' object has no attribute 'add_command'. Did you mean: 'all_commands'?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 25, in <module>
    bot.load_extension(f"DMV.{filename[:-3]}")
  File "/home/container/.local/lib/python3.12/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/l```
#

kann mir das mal jemand erklären warum da der error kommt habe ihrgents add_command

vast cradle
#

wer kennt sich hier etwas mit java und graddle aus?

#
PS C:\Users\leonf\Downloads\PlotSquared-7.3.8> .\gradlew build
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.For more details on the daemon, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html in the Gradle documentation.
Process command line: C:\Program Files (x86)\Java\jre-1.8\bin\java.exe -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=DE -Duser.language=de -Duser.variant -cp C:\Users\leonf\.gradle\wrapper\dists\gradle-8.7-bin\bhs2wmbdwecv87pi65oeuq5iu\gradle-8.7\lib\gradle-launcher-8.7.jar -javaagent:C:\Users\leonf\.gradle\wrapper\dists\gradle-8.7-bin\bhs2wmbdwecv87pi65oeuq5iu\gradle-8.7\lib\agents\gradle-instrumentation-agent-8.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.7
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
PS C:\Users\leonf\Downloads\PlotSquared-7.3.8> 
ruby sparrow
silk gulch
frosty nexus
#

Habe py-cord

silk gulch
frosty nexus
silk gulch
#

Bist umgestiegen?

frosty nexus
silk gulch
frosty nexus
silk gulch
frosty nexus
silk gulch
frosty nexus
#

danke für eure hilfe

urban glen
#

habe nur custom background

cloud cedar
#

hab pycharm version gelesen

urban glen
#

💀💀

cloud cedar
#

dann mach einfach hinter die linie # type: ignore

urban glen
#

ja ik aber auch kein bock 7000x das zu machen tbh😂

cloud cedar
urban glen
#

das glaub ich auch aber ka wo oder wie mehr😂

vast cradle