#Allgemeine Hilfe

1 messages · Page 51 of 1

raven lotus
#

der bot

urban glen
#

Schick screenshot

lofty rock
#

so wie wenn man die library nicht hat

urban glen
lofty rock
#

kann win shift und s nicht nutzen

raven lotus
lofty rock
urban glen
urban glen
lofty rock
urban glen
#

Die windows suchleiste ._.
Welche sonst?

lofty rock
#

achso

#

jo und jetzt?

urban glen
#

Wo nutzt du in deinem Code denn "load_dotenv"

lofty rock
urban glen
lofty rock
urban glen
# lofty rock

Ja du benutzt ja noch nirgendwo "load_dotenv", deshalb ist es grau

lofty rock
#

jo danke

raven lotus
#

Omg bin ich doof XD

#

Ich probiere es später aus

#

@urban glen kannst du es kurz für mich testen?

#

Bitte

urban glen
#

Wieso sollte ich etwas für dich testen??

raven lotus
#

Weil du nett bist

urban glen
#

Machs selber

#

Ich teste doch nicht für andere die Codes

raven lotus
#

☹️

raven lotus
#

XD

#

Warum bist du so sauer mir gegenüber ☹️

urban glen
#

Bin ich nicht, du stellst nur eine sehr komische frage ._.

raven lotus
#

XD

#

Sry

#

Aktuell hab ich so viel zu tun, deswegen

urban glen
#

Ich etwa nicht?

raven lotus
#

Kurze Frage: darf ich theoretisch auch anderen Usern helfen?

raven lotus
urban glen
raven lotus
#

Ok

raven lotus
#

Ganz kurz: was sagst du zu meinem komischen Code?

#

Ist der OK oder schlecht

urban glen
#

Naja, sah jetzt nicht so gut aus, als wäre das von ChatGPT oder so

lofty rock
#
activity = discord.Activity(type=ActivityType.watching, name="Code")```

```Traceback (most recent call last):
  File "C:\Users\1444\Desktop\Python - Project\main.py", line 10, in <module>
    activity = discord.Activity(type=ActivityType.watching, name="Code")
                                     ^^^^^^^^^^^^
NameError: name 'ActivityType' is not defined```
#

kann mir das jemand fixen bitte

urban glen
#

docs

raven lotus
#

Wie kann man einstellen, dass nur bestimmte Rollen und User einen Command sehen?

urban glen
lofty rock
#

was hab ich falsch gemacht

urban glen
#

ActivityType ist nicht definiert

opal basin
#

hier

urban glen
#

discord.ActivityType

lofty rock
raven lotus
urban glen
#

Und googlen geht schneller

raven lotus
#

XD

urban glen
lofty rock
#

ich mach auch immer die dümmsten fehler

raven lotus
lofty rock
urban glen
raven lotus
raven lotus
#

Ich probiere es später mal aus mit Rollen, aber ich glaube, dass ich das schonmal getestet habe und es nicht ging

opal basin
#

und dann auf deinen bot

raven lotus
#

Ich meinte beim Command selber

#

Also Public und so

opal basin
#

aso

#

dann idk sry

burnt prairieBOT
#
Ghost Ping

@raven lotus hat @midnight sage gepingt.

raven lotus
#

Geht doch auch beim @burnt prairie

raven lotus
#

Timo, weißt du wie das geht?

midnight sage
fierce dove
urban glen
fierce dove
#

Nix

urban glen
#

Dann schreib nicht (~.~)

fierce dove
#

OK °_°

urban glen
#

(°v°)

fierce dove
#

•-•

raven lotus
#

XD

solid ingot
#

hey @raven lotus, da kann ich dir ein super video zu empfehlen

limber crow
#

Was muss ich in meiner .env beachten, wenn ich einen Public Bot mache ? (z.b. Server ID oder so )

urban glen
#

hm?
Inwiefern?

#

In eine .env kommen einfach nur sachen, wie Tokens und so
Halt dinge, die geheim bleiben sollen

limber crow
# urban glen In eine .env kommen einfach nur sachen, wie Tokens und so Halt dinge, die geheim...

import discord
import ezcord
import os
import random
from discord.ext import tasks
from dotenv import load_dotenv
from itertools import cycle

status = [
    discord.Activity(type=discord.ActivityType.playing, name="By MecryTv"),
    discord.Activity(type=discord.ActivityType.watching, name="Discord Bots"),
    discord.Activity(type=discord.ActivityType.streaming, name="Test", url="https://www.twitch.tv/officialmecrytv")
]

class Bot(ezcord.Bot):
    def __init__(self):
        intents = discord.Intents.all()
        super().__init__(intents=intents,  debug_guilds=os.getenv("SERVER_ID"), language="de")
        
        self.load_cogs("cogs", subdirectories=True)
        self.status_cycle = cycle(status)
        
    @tasks.loop(seconds=10)
    async def change_activity(self):
        new_activity = next(self.status_cycle)
        await self.change_presence(activity=new_activity)
        
    async def on_ready(self):
        self.change_activity.start()


        
    def run(self):
        load_dotenv()
        super().run(os.getenv("TOKEN"))
    
``` Wie mache ich das dann hier ? Weil für die debug_guilds muss eine Server ID angebenen werden. Kann ich die Server ID's nicht in einer anderen Datei Speichern, wenn der Bot einem Server Joint ?
tawdry leaf
#

man braucht keine debug_guilds

limber crow
urban glen
blissful vale
#

Heho Freunde.
Ich weiß nicht ob sich jemand damit auskennt, aber mein Freund "google" konnte mir auch nicht Helfen 🙂
Auf jeden Fall bin ich gerade dabei ein Dashboard zu machen (nicht nach Timo's Tutorial) und soße nach dem Einloggen auf einen Fehler:
ConnectionRefusedError: [WinError 1225] The remote computer refused the network connection
Wie bereits gesagt finde ich dazu im Internet leider nichts. Code folgt ^^
https://hastebin.skyra.pw/cequfuvawu.py

#

Habe schon die Vermutung aufgestellt, dass es mit meinem Localhost nicht ganz funktioniert und auf einen Server umsteigen sollte.
Bin mir nicht ganz sicher 🙂

blissful vale
#

Glaube ich eher weniger. Das callback musst du ja im Developer Portal eintragen ^^

tawdry leaf
#

trz muss dein pc drauf lokal zugreifen

fierce dove
#

Warum hast du dort keine Strings

app.config["DISCORD_CLIENT_ID"] =

blissful vale
#

Weil das die Bot Daten sind 🙂

fierce dove
#

Bei alle anderen sind strings

blissful vale
tawdry leaf
blissful vale
fierce dove
#

Ok

blissful vale
tawdry leaf
#

hm okay

fierce dove
#

Hmmm

blissful vale
#

Vielleicht liegts wirklich einfach an meiner Connection

blissful vale
#

Dann probier ichs mal kurz auf einem Server 🙂

tawdry leaf
#

könnte am proxy liegen

blissful vale
#

Habe keine Proxy aktiv

fierce dove
#

Hmmm

blissful vale
#

Nope funktioniert auch nicht

tawdry leaf
blissful vale
#

Naja, dann werde ich mich mal mit der API, die Timo benutzt hat, auseinandersetzen

solid ingot
blissful vale
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @blissful vale, du bist jetzt Level 7 🎉

Du hast insgesamt 188 Nachrichten geschrieben.

blissful vale
raven lotus
raven lotus
urban glen
#

@strange juniper Mein Output von pip list:

aiodns 3.0.0
aiohttp 3.8.5
aiosignal 1.3.1
aiosqlite 0.19.0
annotated-types 0.5.0
anyio 3.7.1
async-timeout 4.0.3
attrs 23.1.0
better-ipc 2.0.3
Brotli 1.1.0
cffi 1.15.1
charset-normalizer 3.2.0
click 8.1.7
colorama 0.4.6
discord.py 2.3.2
ezcord 0.3.6
fastapi 0.103.1
ffmpeg-python 0.2.0
frozenlist 1.4.0
future 0.18.3
h11 0.14.0
idna 3.4
Jinja2 3.1.2
MarkupSafe 2.1.3
multidict 6.0.4
orjson 3.9.7
pip 23.2.1
py-cord 2.4.1
pycares 4.3.0
pycparser 2.21
pydantic 2.3.0
pydantic_core 2.6.3
PyNaCl 1.5.0
python-dotenv 1.0.0
setuptools 65.5.0
sniffio 1.3.0
starlette 0.27.0
typing_extensions 4.8.0
uvicorn 0.23.2
websockets 11.0.3
yarl 1.9.2

strange juniper
#

Du verwendest discord.py und py-cord.
Die beiden vertragen sich nicht.

#

es ist entweder das eine oder das andere

urban glen
#

Oh ich hatte die ganze Zeit versucht Discord zu deinstallieren aber nur discord nicht discord.py xD

raven lotus
#

ich nutze py-cord

#

uninstall

#

so jetzt

strange juniper
raven lotus
#

help pls

strange juniper
#

und installiere danach die pakete die du davon brauchst neu

raven lotus
#

und danach pip install py-cord, ezcord

strange juniper
raven lotus
#

ich werde besser 😊

#

merke ich

strange juniper
#

schönes Gefühl, ne? 😄

raven lotus
#

ja

strange juniper
raven lotus
#

ich will nicht immer der ahnungslose sein

raven lotus
#

ich brauche hilfe wegen dem event

strange juniper
#

ich fange sicher nicht an jedes mal was down zu loaden wenn jemand ne frage hat

raven lotus
#

mit dem hinzufügen channel und so

raven lotus
#

nur die seite öffnen bruh

raven lotus
#

geht es jetzt Fab1anDev?

strange juniper
urban glen
#

Aber wie funktioniert das jetzt mit den ctx? Entweder wird normal ctx nicht gefunden oder wenn ich ctx: Context mache, dann wieder wie gerade ebend.

raven lotus
# strange juniper

junge das ist bei dieser seite so, wait ich zeige dir wie sie aussieht

strange juniper
raven lotus
#

mehr nicht

#

ist nur code auf der webseite

tawdry leaf
#

Es kracht

raven lotus
#

hallo

raven lotus
tawdry leaf
#

Zeile 12 und 11 sind des selbe 😂

raven lotus
#

bruh

#

egal

#

kannst du mir helfen beim event?

tawdry leaf
#

Ne muss schlafen 😴

raven lotus
#

ich will, dass der Channel und das Emoji, dass gespeichert wurde in der Datenbank, im event zusammen kommen

strange juniper
raven lotus
#

also besser gesagt, in dem ausgewählten channel soll eine reaction hinzugefügt werden, die ausgewählt wurde

urban glen
# strange juniper zeig mal den code um den es geht
from discord.commands import Option
from discord.ext import commands
import discord
from threading import Thread
import dash

GUILDS=[
    1147686922739785780, # Developer Server (Fab1anDev)
]



intents = discord.Intents.all()

bot = discord.Bot(
    intents=intents,
    debug_guilds=GUILDS
)

@bot.event
async def on_ready():
    print(f"Connected on {len(GUILDS)} servers:")
    print(f"Bot logged in as {bot.user}")


@bot.slash_command(name="hello", description="Let me say you Hello")
async def hello(ctx: Context):
    await ctx.send(f"Hello, {ctx.author}")

raven lotus
#

jo

#

selbst gecodet????

urban glen
#

Ja aber bisschen Stackoverflow wusste nicht wie man die Slashcommands macht. War an ! gewöhnt

burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @fickle anchor, du bist jetzt Level 2 🎉

Du hast insgesamt 8 Nachrichten geschrieben.

Du hast <@&1042123300970696705> erhalten!

raven lotus
#

mmmh

#

was hast du denn vor?

strange juniper
tawdry leaf
# urban glen Ja aber bisschen Stackoverflow wusste nicht wie man die Slashcommands macht. War...
from discord.commands import Option
from discord.ext import commands
import discord
from threading import Thread
import dash
intents = discord.Intents.all()

bot = discord.Bot(
    intents=intents,
)

@bot.event
async def on_ready():
    print(f"Connected on {len(GUILDS)} servers:")
    print(f"Bot logged in as {bot.user}")


@bot.slash_command(name="hello", description="Let me say you Hello")
async def hello(ctx: discord.Interaction):
    await ctx.response.send_message(f"Hello, {ctx.author}")

raven lotus
#

lol

#

ich wäre anderst vorgegangen

tawdry leaf
#

Glaube viele Importe sind in deinen Code unnötig

urban glen
strange juniper
tawdry leaf
strange juniper
urban glen
tawdry leaf
urban glen
#

Achso

raven lotus
#

@bot.slash_command...
async def hello (ctx)
await ctx.respond(f"Hello, {ctx.auhor}")

#

hätte ich gemacht

#

kann aber falsch sein

raven lotus
#

mist XD

strange juniper
#

bekommste keine autocomplete und keine weiteren infos von der IDE, wenn du nur "ctx" rein schreibst

raven lotus
#

achso lol

#

ok, wieder mal was gelernt

#

endlich geht ping reaction datenbank

#

ich bin glücklich 🙂

strange juniper
#

freut mich 🙂

#

magst noch n kleinen tipp für deinen code?

raven lotus
#

ich habe noch ein Bann System (bannt user bei den Commands) geplant usw.

raven lotus
strange juniper
raven lotus
#

hau raus

#

@strange juniper

#

ich geh gleich pennen XD

strange juniper
#

Z.27 kannste leicht eleganter haben:

if message.author.bot:
  return

das gibt von selbst n bool zurück

#

docs dazu:

strange juniper
strange juniper
# raven lotus hau raus

und wenn du wieder rein schaust, ich würde die conn/cursor geschichte nicht global sondern bei bedarf durch eine funktion handhaben. die verbindung natürlich auch beenden, wenn ein datenbankzugriff abgeschlossen ist.

#

ein weiteres problem am import/der wahl von sqlite direkt ist, dass dir das um die ohren fliegen wird, sobald verschiedene sachen darauf zugreifen wollen bzw. wenns arbeitsintensiv wird. du brauchst eine asynchrone version von sqlite. sonst schmiert dir der bot unter höherer last ab, wenn er sich weiter verbreitet hat.

#

also du hättest in dem fall keinen datenverlust, funktionieren tut das schon.
dein bot kann nur im hintergrund nicht mehr mit discord reden, discord denkt der bot sei off/defekt und schaltet den zugang weg, weils x sekunden keine antwort mehr gibt.
dann startet der bot neu... und das immer wieder.
Tritt allerdings erst bei höheren Nutzerzahlen auf.

native plume
#

Ein mysql-Pool ist eine Möglichkeit, dass nicht jedes Mal eine neue Verbindung eröffnet werden muss sondern eine aus dem Pool rausgezogen wird. Das ist 1. Resourcensparender & 2. präventiert das den Fall das du zuviele offene Verbindungen hast. Tbh. Das ist eine Zeile Code und damit hast du es so viel Leichter mit MySql

native plume
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @opal basin, du bist jetzt Level 6 🎉

Du hast insgesamt 162 Nachrichten geschrieben.

opal basin
raven lotus
raven lotus
strange juniper
#

Die bibliothek ist mit deinen bisherigen sqlite datein kompatibel, du kannst also nach umstellung einfach mit deinem bisherigen datensatz weiter arbeiten.

#

über dein anderes problem werde ich trotzdem erst drüber sehen wenn es normal geposteten code dazu gibt. ich lade dafür nix runter und es lässt sich nicht einfach im browser öffnen. vllt. verhält sich das bei dir anders weil du ihn erstellt hast.

du kannst den code entweder mit
```py
#code
```
Einstellen, auf github verlinken oder https://pastebin.com/ dafür nutzen.

raven lotus
#

Ich weiß schon wie man einen Code hochlädt, aber der war halt zu lang

strange juniper
solid ingot
solid ingot
#

jo

odd kiteBOT
raven lotus
#

Ich benutze SQlite, ich schaue weiter

fierce dove
#

Bitte nicht alles kommentieren

raven lotus
#

sry

fierce dove
#

Ist nicht schlimm

raven lotus
#

ich brauche eigentlich nur hilfe hier:

        channel_id = message.channel.id
        if channel_id in autoreactions:
            emoji = self.autoreaction_add(channel_id)
            if emoji:
                await message.add_reaction(emoji)

dass hier ist dann der teil zum hinzufügen:

 def add_autoreaction(self, channel_id, emoji):
        sql = "INSERT INTO autoreaction (channel_id, emoji) VALUES (?, ?) ON CONFLICT(channel_id) DO UPDATE SET emoji = excluded.emoji"
        values = (channel_id, emoji)
        cursor.execute(sql, values)
        conn.commit()

    def remove_autoreaction(self, channel_id):
        sql = "DELETE FROM autoreaction WHERE channel_id = ?"
        values = (channel_id,)
        cursor.execute(sql, values)
        conn.commit()
#

ich will eigentlich nur das bei dem ausgewählten channel, die ausgewählte reaction hinzugefügt wird

#

wait

blissful vale
#

Und wofür benötigst du da die Datenbank?

raven lotus
#

damit die autoreaction gespeichert wird

#

ist doch logisch, weil wenn ich den Bot neustarte oder hochfahre, ist alles weg

raven lotus
#

kann mir jemand helfen?

    @commands.Cog.listener()
    async def on_message(self, message):
        channel_id = self.add_autoreaction()
        emoji = self.add_autoreaction()
        if message in self.DB:
            emoji = self.autoreaction_add(channel_id, emoji)
            if emoji:
                await message.add_reaction(emoji)
#

was muss ich hinter self.add_autoreaction machen?

#

ich komme nämlich nicht voran

blissful vale
#

Also ich bin dir ehrlich, dein Code macht 0,0% sinn. Ich verstehe weder was du erreichen willst, noch was du da versuchst in deinen Code reinzuquetschen...

Schreib bitte einmal Detailiert und in einem fließendem Text, was du machen möchtest, sonst wird das hier nichts...

raven lotus
vernal rampart
#

weiß jemand warum das gelb ist?

dreamy bobcat
#

Welche IDE?

vernal rampart
dreamy bobcat
#

Eigentlich nichts wildes

blissful vale
#

Kannst du ignorieren soweit ich weiß.

dreamy bobcat
#

Meistens wegen Satzbau oder Rechtschreibung so etwas

blissful vale
#

Ist wegen der IDE

vernal rampart
#

also ignore?

blissful vale
#

Du kannst den Code ja mal ausführen. Sollte kein Fehler auftreten 🙂

vernal rampart
#

ok, danke

solid ingot
# vernal rampart

wenn du mit der maus drüber gehst, steht immer dabei wieso es gelb ist. in dem fall möchte pycharm, dass dort ein string hingeschrieben wird, bei dir steht aber ein integer da. das ist aber nicht schlimm, da pycord das dann automatisch in einen string umwandelt

raven lotus
blissful vale
#

Kannst du mir bitte nochmal deinen bisherigen Code schicken?

#

Weiß jemand wie das Theme heißt? - Verzweifle hier schon fast vor Suchen 😦

dreamy bobcat
#

Glaube GitHub DARK

raven lotus
blissful vale
raven lotus
dreamy bobcat
#

@raven lotus warum sendest du deinen Code nicht als Codeblock oder Datei?

burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @raven lotus, du bist jetzt Level 8 🎉

Du hast insgesamt 406 Nachrichten geschrieben.

blissful vale
dreamy bobcat
#

Musst du Mal die du klem Designs durchschauen

blissful vale
raven lotus
raven lotus
blissful vale
raven lotus
dreamy bobcat
raven lotus
#

ok

#

@blissful vale pingst du mich dann und sagst Bescheid?

#

Ich geh jetzt mal off

lofty rock
#
from discord.ext import commands, tasks


class Task(commands.Cog)
    def __int__(self, bot):
        self.bot = bot


    @commands.Cog.listener()
    async def on_ready(self):
        self.keks.start()

        @tasks.loop(seconds=2)
        async def keks(self):
            print("Keks")


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

Moin seht ihr da ein Fehler?
solid ingot
#

schau mal genau auf die einrückung

lofty rock
lofty rock
# solid ingot schau mal genau auf die einrückung
from discord.ext import commands, tasks


class Task(commands.Cog)
    def __int__(self, bot):
        self.bot = bot


    @commands.Cog.listener()
    async def on_ready(self):
        self.keks.start()

    @tasks.loop(seconds=2)
    async def keks(self):
            print("Keks")


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

sonst noch was?

#

oh

solid ingot
#

probiers aus, dann siehst du ob es funktioniert

lofty rock
#

@solid ingot kann man @lusty plaza in eigenen servern nutzen?

solid ingot
#

ja

lofty rock
#

ist der über spotify oder youtube

odd kiteBOT
#

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

Links aus diesem Video
FFMPEG ► https://ffmpeg.org/download.html
I Love Radio ► https://ilovemusic.de/streams

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

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

▶ Play video
solid ingot
#

das ist radio, kein youtube und kein spotify

lofty rock
#

kann man sein eigenes radio machen xD?

solid ingot
#

theoretisch schon

dreamy bobcat
#

Wie würde das gehen ?

dreamy bobcat
lofty rock
solid ingot
#

lofty rock
dreamy bobcat
#

Kannst du ungefähr sagen wo und wie so etwas geht?

lofty rock
# solid ingot das ist radio, kein youtube und kein spotify
import discord
import os
from dotenv import load_dotenv


intents = discord.Intents.all()


status = discord.Status.dnd
activity = discord.Activity(type=discord.ActivityType.streaming, name="Radio")


bot = discord.Bot(intents=intents, debug_guilds=[guild], status=status, activity=activity)

@bot.event
async def on_ready():
    print(f"{bot.user} is Ready")



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

das geht als main file für radio oder?
solid ingot
#

probiers aus, dann siehst du ob es funktioniert

lofty rock
dreamy bobcat
#

Wozu dient debug_guilds

lofty rock
#

also schneller lädt

#

oder eher gesagt nur auf bestimmte guilds

lofty rock
solid ingot
#

kommt aufs hosting an

lofty rock
solid ingot
#

da ist es vorinstalliert

lofty rock
lofty rock
lofty rock
solid ingot
#

ja

lofty rock
#
Traceback (most recent call last):
  File "/home/container/main.py", line 3, in <module>
    from dotenv import load_dotenv
ImportError: cannot import name 'load_dotenv' from 'dotenv' (/home/container/.local/lib/python3.10/site-packages/dotenv/__init__.py)```

```py
import discord
import os
from dotenv import load_dotenv


intents = discord.Intents.all()


status = discord.Status.dnd
activity = discord.Activity(type=discord.ActivityType.streaming, name="Radio")


bot = discord.Bot(intents=intents, debug_guilds=[guild], status=status, activity=activity)

@bot.event
async def on_ready():
    print(f"{bot.user} is Ready")



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

was ist das problem?

solid ingot
#

wahrscheinlich das falsche dotenv installiert

lofty rock
#

discord
dotenv-python
PyNaCL
py-cord

solid ingot
#

python-dotenv

lofty rock
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @lofty rock, du bist jetzt Level 11 🎉

Du hast insgesamt 914 Nachrichten geschrieben.

lofty rock
#
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 774, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/container/cogs/base.py", line 10
    @slash_command(description="Start the German Radio")
TabError: inconsistent use of tabs and spaces in indentation
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 24, in <module>
    bot.load_extension(f"cogs.{filename[:-3]}")
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 910, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 777, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.base' raised an error: TabError: inconsistent use of tabs and spaces in indentation (base.py, line 10)```



```py
import discord
from discord.ext import commands
from discord.commands import slash_command 


class Radio(commands.Cog):
    def __init__(self, bot: discord.bot):
        self.bot = bot
        
    @slash_command(description="Start the German Radio")
    async def play(self, ctx):
        await ctx.author.voice.channel.connect()
        
        
def setup(bot: discord.Bot):
    bot.add_cog(Radio(bot))```
#

habs gefixt

tawdry leaf
#

🤨😂

burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @tawdry leaf, du bist jetzt Level 48 🎉

Du hast insgesamt 14,375 Nachrichten geschrieben.

lofty rock
#
Ignoring exception in on_connect
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/client.py", line 378, in _run_event
    await coro(*args, **kwargs)
  File "/home/container/.local/lib/python3.10/site-packages/discord/bot.py", line 1164, in on_connect
    await self.sync_commands()
  File "/home/container/.local/lib/python3.10/site-packages/discord/bot.py", line 738, in sync_commands
    app_cmds = await self.register_commands(
  File "/home/container/.local/lib/python3.10/site-packages/discord/bot.py", line 531, in register_commands
    prefetched_commands = await self._bot.http.get_guild_commands(
  File "/home/container/.local/lib/python3.10/site-packages/discord/http.py", line 365, in request
    raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access```

```py
import discord
from discord.ext import commands
from discord.commands import slash_command


class Radio(commands.Cog):
    def __int__(self, bot: discord.Bot):
        self.bot = bot


    @slash_command(description="Start the german Radio")
    async def play(self, ctx):
        await ctx.author.voice.channel.connect()

def setup(bot: discord.Bot):
    bot.add_cog(Radio(bot))```
lofty rock
#

gefixt?

tawdry leaf
lofty rock
tawdry leaf
lofty rock
#

mach ich nicht nochmal 💀

tawdry leaf
#

Ja über Panel ist dumm 😅

lofty rock
tawdry leaf
#

Sieht man am Handy wohl schlecht aber ist falsch eingerückt würde ich behaupten 😅

solid ingot
lofty rock
lofty rock
#

nur den server den ich nutze ist drinne

solid ingot
lofty rock
solid ingot
#

debug_guilds korrigieren

lofty rock
#

aber auch keinen error muss ich warten?

#

so

#

egal geht

lofty rock
solid ingot
#

ja, wie zb bei @lusty plaza

lofty rock
#

gibts noch eine 2te folge?

#

wegen errors

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
blissful vale
vernal rampart
#

was soll ich da machen

lofty rock
#

Weiß jemand wie man ein eigenes Web Radio macht (privates)

fierce dove
#

Ja

fierce dove
lofty rock
#

Legal?

lofty rock
fierce dove
#

Ja

#

Schau dm

dreamy bobcat
#

Wie kann man für den Radio bot, ein eigenes Radio erstellen?

dreamy bobcat
#

Für den RadioBot von CodingKeks ein eigenes Radio

tawdry leaf
#

verstehe es immer noch nd

lofty rock
#

Wie man ein eigenes web radio macht

dreamy bobcat
#

Wie installiert man eigentlich Ffmpeg auf einem Hostel ?

solid ingot
#

kommt drauf an wo du den bot hostest

burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @solid ingot, du bist jetzt Level 70 🎉

Du hast insgesamt 24,940 Nachrichten geschrieben.

lofty rock
dreamy bobcat
#

Ich habe meinen bot nicht auf KeksHost

lofty rock
dreamy bobcat
#

Game energy

lofty rock
dreamy bobcat
#

Wie teste ich das?

lofty rock
#

Wirst dann ja sehen ob der play command klappt

dreamy bobcat
#

Okay.

limber crow
viscid lake
#

@solid ingot ist github copilot in githuub pro dabei?

dreamy bobcat
#

Jap

urban glen
#

Wie checke ich eine Nachricht ob es ein embed ist

solid ingot
#

if len(message.embeds) == 0 zum beispiel

urban glen
#

danke :)

tall gorge
#

kann man, wenn man in einer command group angibt, dass die commands nur leute mit admin benutzen dürfen, auch einstellen, dass ein command jeder benutzen darf

tall gorge
#

schade

fierce dove
#

Wie viele Sekunden hat ein jahr

tawdry leaf
#

es geht nicht xD

fierce dove
#

🚀 :: Important Informations

❌ :: Error: py Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In communication_disabled_until: Invalid communication disabled timestamp

tawdry leaf
#

code?

fierce dove
#
async def timeout_duration(ctx: discord.AutocompleteContext):
    options = []
    if ctx.value == "":
        options.append(discord.OptionChoice(name="5 Minuten", value="300"))
        options.append(discord.OptionChoice(name="10 Minuten", value="600"))
        options.append(discord.OptionChoice(name="1 Stunde", value="3600"))
        options.append(discord.OptionChoice(name="1 Tag", value="86400"))
        options.append(discord.OptionChoice(name="7 Tage", value="604800"))
        options.append(discord.OptionChoice(name="1 Woche", value="604800"))
        options.append(discord.OptionChoice(name="1 Monat", value="262800288"))
        options.append(discord.OptionChoice(name="1 Jahr", value="31536000"))
    else:
        duration_seconds = convert_to_seconds(ctx.value)
        time_output = convert_time(duration_seconds, relative=False)
        options.append(discord.OptionChoice(name=f"{time_output}", value=f"{duration_seconds}"))
    return options
tawdry leaf
fierce dove
#

Du hast nicht gesagt welcher code

tawdry leaf
tawdry leaf
fierce dove
#

Nur code

#

Definiere code

#
@admin.command()
    async def timeout(
        self, 
        ctx, 
        member: Option(discord.Member),
        dauer: Option(str, autocomplete=timeout_duration),
        grund: Option(str = "Es wurde kein geund für dein timeout angegeben") = None, 
    ):
        if await admin(ctx):
            return
        await ctx.defer(ephemeral=True)
        if member.communication_disabled_until:
            return await ctx.respond("Der user hat bereits ein Timeout")
        timeouted_until = dc_timestamp(int(dauer), "f")
        await member.timeout_for(timedelta(seconds=int(dauer)), reason=grund)
tawdry leaf
#

es kracht

fierce dove
#

Warum

tawdry leaf
#

kennst du den unterschied zwischen timed_out und communication_disabled_until?

fierce dove
#

tawdry leaf
#

timed_out ist eine abfrage ob einer getimeoutet ist

#

communication ist für die zeit

#

wie lange er noch getimeoutet ist

#

if member.timed_out

native plume
# raven lotus Mein Problem ist 3.

Nein dein Problem sind alle drei. Niemand kann dir bei so einem Gewusel im Code helfen. Code bitte einmal sauber und ordentlich und dann kann man dir helfen

limber crow
raven lotus
#

wo titel?

tawdry leaf
#

ka

limber crow
# raven lotus wo titel?

Wenn ich ein Emebd Erstelle. Kann ich eine Custom beschreibung hinzufügen, dass macht der Code in Zeiel 161 möglich, aber der Titel geht nicht. (Zeile 141)

tawdry leaf
#

und error?

limber crow
tawdry leaf
limber crow
solid ingot
limber crow
raven lotus
native plume
raven lotus
#

?

tawdry leaf
raven lotus
#

ist das nicht Visual Studio Code?

tawdry leaf
raven lotus
#

achso

native plume
#

Wie gesagt du hast 100 If Abfragen. Sowas macht man mit EINER Zeile

#

Abgesehen davon hast du nichts kommentiert

tawdry leaf
blissful vale
raven lotus
#

eig hab ich nur mit dem Event Probleme XD

raven lotus
#

ich brauche eig nur beim Event hilfe

#

dann würde eig der Code gehen

blissful vale
#

Ich sag ja auch nicht, dass du das sein musst. Habe nur behauptet, dass die Zeile keinen Sinn ergibt.

lofty rock
#

Mir kann man nicjt mehr helfen 💀

raven lotus
raven lotus
#

bei was brauchst du denn hilfe?

lofty rock
raven lotus
#

._.

tawdry leaf
raven lotus
lofty rock
#

Ihr könnt mir liebend gerne morgen helfen wenn ich py cord weiter lerne jeden tag 1 folge

blissful vale
raven lotus
#

._.

blissful vale
#

Achso.

tawdry leaf
#

das versucht er da doch nd damit 🤔

lofty rock
raven lotus
#

-_-

tawdry leaf
raven lotus
lofty rock
#

Kriege Albträume von dieser stimme vom codingkeks

raven lotus
#

so, jetzt habe ich dich unterstützt

lofty rock
lofty rock
tawdry leaf
raven lotus
lofty rock
raven lotus
#

XD

lofty rock
raven lotus
#

aaaaah

#

ich brauche doch nur hilfe beim Event XD

blissful vale
raven lotus
#

mehr nicht XD

lofty rock
solid ingot
#

ban

raven lotus
#

Ehm

lofty rock
#

Hallo?!

raven lotus
lofty rock
#

Das geht gornicht

lofty rock
#

Weil ich einfach scheisse in coden bin

raven lotus
tawdry leaf
blissful vale
lofty rock
#

Ich kann gornix

tawdry leaf
lofty rock
#

@slash_command
async def play(self, ctx)
ctx.respond("ich kann kein Python ")

#

Wetten wir nicht mal richtig

raven lotus
#

ihr diskutiert ernsthaft über meinem Code XD

urban glen
#

Über was anderes kann man hier nicht diskutieren xD

raven lotus
#

XD

#

ich brauche doch nur beim Event hilfe, mehr nicht

lofty rock
#

Ich brauche auch hilfe bei sehr vielen sachen

raven lotus
#

das ist alles was ich will 😢

raven lotus
solid ingot
tawdry leaf
#
import discord
import ezcord
class Musik(ezcord.Cog):
  @slash_command()
  async def play(self, ctx:discord.Interaction):
      await interaction.response.send_message("Hier kommt keine Musik")




def setup(bot:discord.Bot):
    bot.add_cog(Musik(bot))```
lofty rock
#

Ich will ein Spotify bot

blissful vale
lofty rock
tawdry leaf
lofty rock
#

Deine Worte sind zwar motivierend kann es trotzdem nicht

lofty rock
raven lotus
#

ich will beim Event, dass die Reaction, die man ausgewählt hat, und den Channel, den man auch ausgewählt hat, hinzugefügt wird

tawdry leaf
raven lotus
#

und ich habe probleme mit dem verbinden

lofty rock
lofty rock
raven lotus
tawdry leaf
#

dann mach des mal 🙂

lofty rock
#

junge ich hab ja ein rassistischen sticker oder wie man das schreibt

#

Ich kann auch nicht mehr schreiben

tawdry leaf
lofty rock
#

Junge was das 💀

tawdry leaf
lofty rock
#

Warum sind selfbots nicht erlaubt man hat doch nicht wirklich Vorteile

urban glen
raven lotus
#

XD

lofty rock
#

Discord ist ziemlich streng

raven lotus
#

naja

#

es gibt viele leute die sch**ße machen

lofty rock
#

Aber wenn jemand n word spammt juckt es sie garnicht

tawdry leaf
#

doch 🇹🇯

#

es reportet nur keiner?

lofty rock
tawdry leaf
#

ja das dauert 😄

lofty rock
#

Nicht mal Ticket antwort

lofty rock
tawdry leaf
lofty rock
raven lotus
#

muss man nicht auch reports im internet machen?

tawdry leaf
lofty rock
#

Wenns um mein Account geht kommt immer antwort

#

Oder nitro

raven lotus
#

ja

lofty rock
#

Naja egal

upper adder
#

Seit neulich nicht mehr

lofty rock
#

Discord ohne regeln wäre ziemlich schlimm vermute ich

upper adder
#

Die haben Trust&Safety komplett auf In-App verlagert.

upper adder
#

Ja. Aber wo TnS ? 👀

tawdry leaf
upper adder
#

Naja, hat gute aber auch schlechte Seiten.

lofty rock
#

Hab mal nen bug gefunden aber kein badge bekommen

#

Finde ich voll unfair

upper adder
# tawdry leaf ?

Wo willst du da auf der Website was an TnS melden?? Gibt's nicht mehr.

tawdry leaf
lofty rock
raven lotus
#

nicht nur 1

tawdry leaf
lofty rock
#

Wie viele

raven lotus
#

sondern so 5, keine ahnung

tawdry leaf
#

du musst erklären wann er kam was du getan hast etc.

lofty rock
lofty rock
raven lotus
tawdry leaf
raven lotus
upper adder
#

Die Seite ist noch da.

#

Nur die Option etwas an Trust & Safety (TnS) zu melden gibt's nicht mehr dort.

raven lotus
#

hä wie dumm

upper adder
#

Naja. Wie gesagt, gibt Vor- und Nachteile.
Die da wären....

#

+

  • Nachrichten werden gesichert, falls sie gelöscht werden

-

  • Man kann keine Profile von underaged Usern mehr melden.
tawdry leaf
#

kann man

upper adder
#

Gab da noch auf dem YT Channel 'NTTS'.

upper adder
tawdry leaf
upper adder
#

Oh, achso.

tawdry leaf
#

unter sonstiges bei nachricht melden

tawdry leaf
#

müssen sie alleine rechtlich schon

upper adder
#

Naja, ist halt dumm

upper adder
#

Weil, wenn eine Person noch keine Nachricht geschrieben hat?

#

Aus dem Grund Bau ich bei meinem Bot ne Funktion ein, wo man auch mit einem /-Command Nutzer reporten kann.

tawdry leaf
#

für was willst du den reporten denn wenn er nix schreibt ist doch logisch xD

upper adder
#

Ähm. Wenn man zufällig beim Join-Log drauf stößt? rly

tawdry leaf
upper adder
#

Die vom Bot? Na sicher doch facepalm

tawdry leaf
timid dew
#

Hallo, ich habe mein Bot mit discord.py programmiert und möchte auf pycord wechseln. Ist das viel anders.

fierce dove
#

@timid dew

solid ingot
#

es gibt schon einige unterschiede, vor allem bei den neueren features, also buttons, slash commands, etc

timid dew
#

Ah okey wollte halt nicht alles umbauen.
Slash und Buttons habe ich noch nicht

solid ingot
#

in dem fall sollte sich der aufwand in grenzen halten

timid dew
#

Danke werde es Mal probieren.

urban glen
#

kann mir jemand erklären wieso ich diesen Error bekomme?
hab 1-1 den gleichen code bei einem anderen system genutzt und da funktioniert es. Aber hier ist es anders?
dazu; es wird IMMER die guild ID bei ausführen des Commands inserted obwohl es INSERT OR IGNORE INTO gibt

wie gesagt; bei nem anderen system funktioniert es und es ist 1-1 das gleiche [auser die DB beschriftung natürlich]

solid ingot
#

dieselbe guild ID wird mehrmals inserted?

#

dann hast du den primary key falsch gesetzt

solid ingot
timid dew
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @timid dew, du bist jetzt Level 2 🎉

Du hast insgesamt 7 Nachrichten geschrieben.

Du hast <@&1042123300970696705> erhalten!

timid dew
#

Hab erst vor paar Monaten angefangen 🙈

solid ingot
solid ingot
urban glen
#

ja

#

warte

#

ich checks glaub

#

1 sek

#

omg

#

ja

#

ich checks

#

💀

#

brain dead gewesen

tawdry leaf
#

Supi

solid ingot
urban glen
#

no shit

#

😂

solid ingot
raven lotus
jaunty jasper
#

** Weiß jemand von euch, wie ich auf einem Linux Server ein Directory angebe ?**
Ich habe es so

/server/python/cogs
den findet er aber nicht, könnt ihr mir helfen ?

limber crow
fierce dove
#

Aber wo

limber crow
limber crow
jaunty jasper
native plume
jaunty jasper
raven lotus
#

Mir wurde gestern immernoch nicht wirklich geholfen XD

native plume
limber crow
native plume
native plume
jaunty jasper
# native plume Was für eine Datei ist es denn?

eine .py Datei
Also es ist dafür meine Cogs zuladen

maxcogs = 0
loadedcogs = 0

cogs_directory = '/server/python/cogs'

# Check if the directory exists
if os.path.exists(cogs_directory):
    for file in os.listdir(cogs_directory):
        if file.endswith(".py"):
            maxcogs += 1
            print("Added Maxcogs")

    for file in os.listdir(cogs_directory):
        if file.endswith(".py"):
            bot.load_extension(f"cogs.{file[:-3]}")
            loadedcogs += 1
            print(f"✅ Successfully loaded Cog {file[:-3]} ({loadedcogs}/{maxcogs})")
else:
    print(f"The directory '{cogs_directory}' does not exist.")

limber crow
limber crow
native plume
raven lotus
native plume
jaunty jasper
limber crow
native plume
limber crow
jaunty jasper
limber crow
raven lotus
#

Autoreaction

#

Mit Channel festlegen und Emoji

limber crow
native plume
raven lotus
limber crow
raven lotus
#

Dass wenn jemand in dem Channel eine Nachricht sendet, dann dir ausgewählte Reaktion hinzugefügt wird

limber crow
jaunty jasper
#

Also

Ich habe meine main.py Datei welche ich mit, pythno3 python/main.py starte
Dann gibt es allerdings noch die sogennaten "Cogs", welche ich mit bot.load_exstensions lade
Und ich muss jetzt wissen, wie ich den Dateipfad so angeben kann, das Pycord sie als Cogs laden
kann.

weil:

/server/python/cogs

nicht funkioniert

raven lotus
#

Oh sorry falsche Zeile

#

😬

limber crow
native plume
raven lotus
jaunty jasper
raven lotus
#

Sry falsche Zeile

#

Zeile 27

native plume
#

Kein Problem

limber crow
raven lotus
#

?

#

Prints?

blissful vale
native plume
#

Das ist alles was du brauchst

#

Um Cogs in pycord zu laden

limber crow
raven lotus
#

Wait Print ist doch, dass im Log was gesendet wird

#

Also bei Pycharm bei run

solid ingot
blissful vale
raven lotus
#

Ok

limber crow
# raven lotus Ok

Dann mach es auch, denn dann wirst du dein Problem selber lösen können

jaunty jasper
#

@native plume Sry für den Ping, aber

blissful vale
native plume
jaunty jasper
fierce dove
jaunty jasper
#

Oder bin ich gerade extrem dumm

native plume
blissful vale
blissful vale
limber crow
raven lotus
#

Ok

jaunty jasper
#

Fixed es auch nicht

limber crow
blissful vale
#

Kannst du nochmal zeigen, wie dein code gerade aussieht?

jaunty jasper
blissful vale
# limber crow Ein Marathon mit sehr viel Höhen und tiefen

Aber sowas von. Wobei ich sagen muss, dass python einer der Sprachen ist, womit (ich persönlich) keinen bezug zur richtigen "Programmierung" finden konnte. Habe damals immer versucht alles zu verstehen etc. Das Verständnis kam dann bei Sprachen wie z.B. C oder C++ dazu.

blissful vale
limber crow
jaunty jasper
blissful vale
#

Jop

jaunty jasper
#

Weil dann

  File "/home/server/python/lamain.py", line 611, in <module>
    for filename in os.listdir("./cogs"):
FileNotFoundError: [Errno 2] No such file or directory: './cogs'```
blissful vale
#

Warte ich muss gleich mal an meinen PC, bei dem kleinen Display ding erkenn ich nix.

blissful vale
limber crow
blissful vale
#
from os import listdir
from os.path import realpath, split, join, splitext
for item in listdir(join(split(realpath(__file__))[0], "cogs")):
    client.load_extension("cogs." + splitext(item)[0])

Siehe: https://stackoverflow.com/questions/61880957/discord-py-cogs-error-filenotfounderror-errno-2-no-such-file-or-directory

limber crow
blissful vale
limber crow
blissful vale
#

Immer wieder schön peepohype

jaunty jasper
# blissful vale ```py from os import listdir from os.path import realpath, split, join, splitext...


Traceback (most recent call last):
  File "/home/fabian/.local/lib/python3.10/site-packages/discord/cog.py", line 774, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/fabian/python/cogs/warnsystem.py", line 8, in <module>
    conn = sqlite3.connect('/fabian/actions.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 "/home/fabian/python/lamain.py", line 613, in <module>
    bot.load_extension("cogs." + splitext(item)[0])
  File "/home/fabian/.local/lib/python3.10/site-packages/discord/cog.py", line 910, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/fabian/.local/lib/python3.10/site-packages/discord/cog.py", line 777, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.warnsystem' raised an error: OperationalError: unable to open database file


blissful vale
#

Cogs sind connected 🙂

jaunty jasper
#

Weißt du das ?

blissful vale
#

Laut deinem Code

#

in cogs/fabian/

jaunty jasper
blissful vale
#

Ja, richtig.

#

Also, so hast du es zumindest geschrieben.

jaunty jasper
#

ja
wait

solid ingot
blissful vale
jaunty jasper
tawdry leaf
fierce dove
#

Verstehe nur Bahnhof

solid ingot
fierce dove
solid ingot
tawdry leaf
jaunty jasper
#

Info: Ich habe oben beim server. blabla .de
nur zensiert, da ich sonst meinen Namen leaken würde

#

@solid ingot @native plume

cloud cedar
#
import discord
from discord.commands import Option
from dotenv import load_dotenv
intents = discord.Intents.default()
intents.members = True


status = discord.Status.streaming
activity = discord.Activity(type=discord.ActivityType.playing, name = "Xp counter")
bot = discord.Bot()
class Bot():
    def __init__(self):
        super().__init__(intents = intents, status = status, activity = activity)

    async def on_ready(self):

        print(f"{bot.user} ist bereit.")



bot.load_extension("cogs.levelsystem")


bot.run("armin187")``` Der Bot startet nicht.. kein Error ![sussypeepo](https://cdn.discordapp.com/emojis/1035243378759176334.webp?size=128 "sussypeepo")
blissful vale
cloud cedar
native plume
cloud cedar
blissful vale
jaunty jasper
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @jaunty jasper, du bist jetzt Level 5 🎉

Du hast insgesamt 121 Nachrichten geschrieben.

Du hast <@&1024276691205496872> erhalten!

jaunty jasper
#

da ist kein Cog ?

native plume
solid ingot
blissful vale
blissful vale
#

@jaunty jasper in dem Fall mach einfach folgendes:
../../actions.db

blissful vale
native plume
cloud cedar
native plume
#

Warum fragst du nach Hilfe? Was funktioniert nicht?

solid ingot
cloud cedar
jaunty jasper
blissful vale
blissful vale
#

Sie kann auch auserhalb liegen. Er muss nur richtig drauf zu greifen

tawdry leaf
cloud cedar
#

Glaube ich bin einfach nur dumm oder so aber ich seh den Fehler hier nicht. Scheint aber in der init zu sein. ```import discord
from discord.commands import Option
from dotenv import load_dotenv

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

status = discord.Status.streaming
activity = discord.Activity(type=discord.ActivityType.playing, name = "Xp counter")

class Bot():

def __init__(self):
    super().__init__(intents = intents, status = status, activity = activity)

async def on_ready(self):

    print(f"{bot.user} ist bereit.")

bot = Bot()
bot.load_extension("cogs.levelsystem")
bot.run("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH")```bruh

blissful vale
#

Das Stimmt. Aber wenn er die Struktur so hat, wie oben, dann muss es nicht im Projekt sein!

tawdry leaf
#

ja stimmt schon aber vom Prinzip her kann er es gleich so machen das er es nd mehrmals ändern müsse

#

das meine ich

blissful vale
#

Ja, gebe ich dir völlig recht. (Habe ich eher im Chat auch schon vorgeschlagen ^^)

jaunty jasper
tawdry leaf
#

😄

solid ingot
limber crow
#

Gibt es eigentlich eine Möglichkeit, dass wenn man nicht mehr am PC sein möchte, aber trotzdem Coden möchte es übers Handy oder so zu machen ?

solid ingot
#

theoretisch schon

limber crow
solid ingot
#

@cloud cedar die klasse sollte jedenfalls so aussehen

class Bot(discord.Bot):
cloud cedar
#
TypeError: module() takes at most 2 arguments (3 given)  ```
solid ingot
#

ups, großes B

blissful vale
cloud cedar
#

Ah jetzt gehts. Dankeschööööööööön

blissful vale
blissful vale
jaunty jasper
blissful vale
#

Mach jetzt mal folgendes.
Zieh die actions.db File in den cogs Folder.
Ändere ```py
conn = sqlite3.connect('/fabian/actions.db')

Zu
```py
conn = sqlite3.connect('actions.db')
last depot
#
Traceback (most recent call last):
  File "c:\Users\felix\Desktop\Dashboard discord Bot\bot.py", line 2, in <module>
    import ezcord
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\ezcord\__init__.py", line 6, in <module>
    from . import components, emb, logs, sql, times, utils
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\ezcord\utils.py", line 9, in <module>
    from discord.utils import AutocompleteFunc, V, Values
ImportError: cannot import name 'AutocompleteFunc' from 'discord.utils' (C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\utils.py)

Code

import discord
import ezcord

from discord.ext.ipc import Server

class Bot(ezcord.Bot):
    def __init__(self):
        super().__init__(intents=discord.Intents.default())
        self.ipc = Server(self, secret_key="felix")

    async def on_ready(self):
        await self.ipc.start()
        print(f"{self.user} ist online")

    @Server.route()
    async def guild_count(self, _):
        return str(len(self.guilds))

    async def on_ipc_error(self, endpoint: str, exc: Exception):
        raise exc


bot = Bot()

was habe ich falsc hgemacht

cloud cedar
#

och mann Error 375 Wörter lang, glaub aber da steht einfach nur "guild_count referenced before assignment" bei main.py ```from fastapi import FastAPI, Request
import uvicorn
from starlette.templating import Jinja2Templates
from discord.ext.ipc import Client

app = FastAPI()
templates = Jinja2Templates(directory="frontend")

ipc = Client(secret_key="AA")

@app.get("/")
async def home(request: Request):
guild_count = await ipc.request(guild_count)
return templates.TemplateResponse(
"index.html",
{
"request" : request,
"count": guild_count.response
}
)
if name == "main":
uvicorn.run("main:app", host="localhost", port=8000, reload=True)```

blissful vale
cloud cedar
blissful vale
solid ingot
blissful vale
solid ingot
#

nein, du kannst ezcord installieren, auch wenn du discord.py oder nextcord nutzt

blissful vale
#

Okay gut, dann bin ich auf dem Falschen stand 🤦‍♂️

#

Dachte es wäre immer noch abhängig 🙂

solid ingot
cloud cedar
last depot
# solid ingot versuch mal deine ezcord version auf den neusten stand zu bringen

jetzt kommt das ```
PS C:\Users\felix\Desktop\Dashboard discord Bot> python bot.py
Traceback (most recent call last):
File "C:\Users\felix\Desktop\Dashboard discord Bot\bot.py", line 6, in <module>
class Bot(ezcord.Bot):
File "C:\Users\felix\Desktop\Dashboard discord Bot\bot.py", line 15, in Bot
@Server.route()
^^^^^^^^^^^^^^
TypeError: Server.route() missing 1 required positional argument: 'self'

cloud cedar
limber crow
last depot
# limber crow Steht doch unten. `missing 1 required positional argument: self`

ja aber es ist eigentlich alles richtig:

import discord
import ezcord
from discord.ext.ipc import Server


class Bot(ezcord.Bot):
    def __init__(self):
        super().__init__(intents=discord.Intents.default())
        self.ipc = Server(self, secret_key="felix")

    async def on_ready(self):
        await self.ipc.start()
        print(f"{self.user} ist online")

    @Server.route()
    async def guild_count(self, _):
        return str(len(self.guilds))

    async def on_ipc_error(self, endpoint: str, exc: Exception):
        raise exc


bot = Bot()
bot.run("Mein Token sage ich nicht")
limber crow
#

Kann ich das Dashboard auch in einem Bot rein Coden, wo es schon eine Main Datei gibt ?

restive herald
burnt prairieBOT
#
Level Up!

Herzlichen Glückwunsch @blissful vale, du bist jetzt Level 8 🎉

Du hast insgesamt 258 Nachrichten geschrieben.

blissful vale
#

jetzt

#

War in der Falschen File 🤦

last depot
last depot
blissful vale
#

Aber doch, ich glaube bei der Route musst du einen Pfad angeben

#

Sprich mach mal in die Klammern ```py
@Server.route('/')

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
solid ingot
#

schick mal den ganzen error dann können wir damit vlt was anfangen peepothink

tawdry leaf
cloud cedar
tawdry leaf
cloud cedar
last depot
#

bei mir kommt die ganze zeit das obwohl ich das gleiche was timo gesagt hat gemachtz hab

solid ingot
#

dann ist in deiner konsole ein error

last depot
# solid ingot dann ist in deiner konsole ein error
Traceback (most recent call last):
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
    raise exc
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
    raise exc
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in __call__
    raise e
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\starlette\routing.py", line 66, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 273, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 190, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\Desktop\Dashboard discord Bot\main.py", line 47, in callback
    result = await api.get_token_response(data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\Desktop\Dashboard discord Bot\backend\api.py", line 9, in get_token_response
    response = await session.post(API_ENDPOINT + "/oauth2/token", data=data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client.py", line 467, in _request
    with timer:
  File "C:\Users\felix\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\helpers.py", line 701, in __enter__
    raise RuntimeError(
RuntimeError: Timeout context manager should be used inside a task
#

ein sehr langer

tawdry leaf
last depot
solid ingot
#

code?

tawdry leaf
#

RuntimeError: Timeout context manager should be used inside a task

last depot
# solid ingot code?
import uvicorn
from discord.ext.ipc import Client
from fastapi import FastAPI, HTTPException, Request
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
from starlette.templating import Jinja2Templates

from backend import api


CLIENT_ID = ----
CLIENT_SECRET = ----
REDIRECT_URI = "http://localhost:8000/callback"
LOGIN_URL = "https://discord.com/api/oauth2/authorize?client_id=1154777420268843080&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fcallback&response_type=code&scope=identify%20guilds"


app = FastAPI()
app.mount("/static", StaticFiles(directory="frontend/static"), name="static")
templates = Jinja2Templates(directory="frontend")

ipc = Client(secret_key="felix")


@app.get("/")
async def home(request: Request):
    guild_count = await ipc.request("guild_count")
    return templates.TemplateResponse(

        "index.html",
        {
            "request": request,
            "count": guild_count.response,
            "login_url": LOGIN_URL
        },
    )


@app.get("/callback")
async def callback(code: str):
    data = {
        "client_id": CLIENT_ID,
        "client_secret": CLIENT_SECRET,
        "grant_type": "authorization_code",
        "code": code,
        "redirect_uri": REDIRECT_URI,
    }

    result = await api.get_token_response(data)
    if result is None:
        raise HTTPException(status_code=401, detail="Invalid Auth Code")

    return RedirectResponse(url="/guilds")


@app.get("/guilds")
async def guilds():
    return {"success": "Erfolgreich eingeloggt"}



if __name__ == "__main__":
    uvicorn.run("main:app", host="localhost", port=8000, reload=True)
solid ingot
#

ich meinte den code von der datei wo der error aufgetreten ist, also der code von der api datei

limber crow
#

@solid ingot kann ich in meinem Cogs ordner ein Ornder namens DashBoard machen und da alles für das Dashboard reinmachen ?

solid ingot
#

wo du deine ordner hintust kannst du dir aussuchen

last depot
# solid ingot ich meinte den code von der datei wo der error aufgetreten ist, also der code vo...
import aiohttp

API_ENDPOINT = "https://discord.com/api"

session = aiohttp.ClientSession()


async def get_token_response(data):
    response = await session.post(API_ENDPOINT + "/oauth2/token", data=data)
    json_response = await response.json()

    access_token = json_response.get("access_token")
    refresh_token = json_response.get("refresh_token")
    expires_in = json_response.get("expires_in")

    if not access_token or not refresh_token:
        return None

    return access_token, refresh_token, expires_in
#

ist eig alles richtig

urban glen
last depot
urban glen
#

hm ok

last depot
#

dann komm das

solid ingot
#

tritt der fehler auch auf wenn du es so machst?

import aiohttp

API_ENDPOINT = "https://discord.com/api"

async def get_token_response(data):
    async with aiohttp.ClientSession() as session:
        response = await session.post(API_ENDPOINT + "/oauth2/token", data=data)
        json_response = await response.json()

    access_token = json_response.get("access_token")
    refresh_token = json_response.get("refresh_token")
    expires_in = json_response.get("expires_in")

    if not access_token or not refresh_token:
        return None

    return access_token, refresh_token, expires_in
last depot
#

jetzt geht ess

#

was war falsch

solid ingot
#

weiß ich nicht

ruby sparrow
#

was hab ich flach

fierce dove
ruby sparrow
#

also bin dumm

fierce dove
#

Hast du es

ruby sparrow
#

jerzt komm das

urban glen
#

du hast in deinem frontend ordner kein static ordner

odd kiteBOT
#

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

Code auf Github ► https://github.com/tibue99/tutorial-dashboard/tree/04fcd203519f1c5c23330d0ac1713b9d087a98a2

Danke an Nikos für die Unterstützung beim coden und an Pascal für das Thumbnail ❤️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Inhalt 📚
Es ist soweit, heute kommt das lang ersehnte Dashboard Tutorial. Wir...

▶ Play video
urban glen
#

nein

#

da ist kein static ordner

urban glen
ruby sparrow
#

sry vergassen

urban glen
#

dann checkst du es

tawdry leaf
fierce dove
#

:F_

urban glen
solid ingot
#

bot gestartet?

urban glen
#

ehm

#

hehe

#

wird das dashboard automatisch auch angemacht?

tawdry leaf
urban glen
#

tmm

ruby sparrow
limber crow
#

Warum ist templates unterstrichen ?

urban glen
limber crow
solid ingot
ruby sparrow
#

@solid ingot

solid ingot
#

@ruby sparrow

fierce dove
#

┬─┬ノ( º _ ºノ)

limber crow
odd kiteBOT
#
import uvicorn
from discord.ext.ipc import Client
from fastapi import FastAPI, HTTPException, Request
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
from starlette.templating import Jinja2Templates

from backend import api

# Hier die Daten aus dem Developer-Portal einfügen
CLIENT_ID = 123456789
CLIENT_SECRET = ""
REDIRECT_URI = "http://localhost:8000/callback"
LOGIN_URL = ""


app = FastAPI()
app.mount("/static", StaticFiles(directory="frontend/static"), name="static")
templates = Jinja2Templates(directory="frontend")

ipc = Client(secret_key="keks")


@app.get("/")
async def home(request: Request):
    guild_count = await ipc.request("guild_count")
    return templates.TemplateResponse(
        "index.html",
        {
            "request": request,
            "count": guild_count.response,
            "login_url": LOGIN_URL
        },
    )


@app.get("/callback")
async def callback(code: str):
    data = {
        "client_id": CLIENT_ID,
        "client_secret": CLIENT_SECRET,
        "grant_type": "authorization_code",
        "code": code,
        "redirect_uri": REDIRECT_URI,
    }

    result = await api.get_token_response(data)
    if result is None:
        raise HTTPException(status_code=401, detail="Invalid Auth Code")

    return RedirectResponse(url="/guilds")


@app.get("/guilds")
async def guilds():
    return {"success": "Erfolgreich eingeloggt"}


if __name__ == "__main__":
    uvicorn.run(app, host="localhost", port=8000)
    # uvicorn.run("main:app", host="localhost", port=8000, reload=True)
tawdry leaf
fierce dove
solid ingot
limber crow
tawdry leaf
#

oha

dusk hollow
#

👀 uvicorn ist installiert aber sagt ModuleNotFoundError: No module named 'uvicorn'

fierce dove
#

pip freeze

tawdry leaf
#

na dann mag es dich wohl nicht 😄

solid ingot
dusk hollow
fierce dove
#

Mach pip freeze

dusk hollow
tawdry leaf
fierce dove
tawdry leaf
#

pip uninstall -t requirements.txt

tawdry leaf
dusk hollow
#

👀 müsste alles einzel installieren

tawdry leaf
dusk hollow
#

ne bei wurde diese nicht gefunden

tawdry leaf
dusk hollow
#

y

tawdry leaf
#

hm

ruby sparrow
ruby sparrow
#
Traceback (most recent call last):
  File "C:\Users\nicor\OneDrive\Desktop\Flux Dashboard\bot.py", line 2, in <module>
    import ezcord
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\ezcord\__init__.py", line 7, in <module>
    from .bot import *
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\ezcord\bot.py", line 12, in <module>
    from discord.ext import bridge, commands
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\bridge\__init__.py", line 26, in <module>
    from .bot import *
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\bridge\bot.py", line 30, in <module>
    from discord.commands import ApplicationContext
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\__init__.py", line 26, in <module>
    from .context import *
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\context.py", line 68, in <module>
    class ApplicationContext(discord.abc.Messageable):
  File "C:\Users\nicor\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\context.py", line 270, in ApplicationContext
    @discord.utils.copy_doc(Interaction.respond)
AttributeError: type object 'Interaction' has no attribute 'respond'. Did you mean: 'response'?```
ruby sparrow
#
import discord
import ezcord
from discord.ext.ipc import Server


class Bot(ezcord.Bot):
    def __init__(self):
        super().__init__(intents=discord.Intents.default())
        self.ipc = Server(self, secret_key="Flux")

    async def on_ready(self):
        await self.ipc.start()
        print(f"{self.user} ist online")

    @Server.route()
    async def guild_count(self, _):
        return str(len(self.guilds))

    async def on_ipc_error(self, endpoint: str, exc: Exception):
        raise exc


bot = Bot()
bot.run(" hoff net")  ```
solid ingot
ruby sparrow
tawdry leaf
#

der code hat mit dem error nix am Hut

solid ingot
#

welche ezcord version hast du? schick mal pip freeze

ruby sparrow
#
aiocache==0.12.1
aiofiles==0.8.0
aiohttp==3.8.5
aiosignal==1.3.1
aiosqlite==0.17.0
annotated-types==0.5.0
anyio==3.7.1
async-timeout==4.0.2
asyncpraw==7.7.1
asyncprawcore==2.3.0
attrs==23.1.0
better-ipc==2.0.3
certifi==2023.7.22
charset-normalizer==3.2.0
chat-exporter==2.6.1
click==8.1.7
colorama==0.4.6
discord-ext-ipc==2.1.1
discord.py==2.3.2
easy-pil==0.3.0
emoji==2.7.0
exceptiongroup==1.1.3
ezcord==0.3.4
fastapi==0.103.1
frozenlist==1.4.0
grapheme==0.6.0
h11==0.14.0
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.3
multidict==6.0.4
Pillow==9.5.0
py-cord-dev==2.5.0rc5
pydantic==2.3.0
pydantic_core==2.6.3
pyjokes==0.6.0
python-dotenv==1.0.0
pytube==15.0.0
pytz==2023.3
requests==2.31.0
sniffio==1.3.0
starlette==0.27.0
typing_extensions==4.7.1
update-checker==0.18.0
urllib3==2.0.4
uvicorn==0.23.2
watchdog==3.0.0
websockets==11.0.3
yarl==1.9.2```
solid ingot
#

discord-ext-ipc ist das falsche package, stattdessen sollte better-ipc installiert werden. zudem solltest du pycord und discord.py auf keinen fall gleichzeitig installiert haben

odd kiteBOT
#

@ruby sparrow

Requirements-Check

⚠️ Es sollte nur eine Discord Library installiert sein

discord-ext-ipc==2.1.1
discord.py==2.3.2
py-cord-dev==2.5.0rc5```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
urban glen
#

@solid ingot discord-ext-ipc wird als discord api wrapper erkannt xD

fierce dove
#

fastapi install error

#
aiocache==0.12.2
aiofile==3.8.7
aiofiles==0.8.0
aiohttp==3.8.5
aiopath==0.6.11
aiosignal==1.3.1
aiosqlite==0.17.0
any==0.0.1
anyio==3.7.1
async-timeout==4.0.2
asyncpraw==7.7.1
asyncprawcore==2.3.0
atlastk==0.13.2
attrs==23.1.0
Base-69==0.2.1
beautifulsoup4==4.12.2
better-ipc==2.0.3
black==23.7.0
caio==0.9.12
certifi==2023.7.22
cffi==1.15.1
chardet==5.2.0
charset-normalizer==3.2.0
click==8.1.7
color-pprint==0.0.3
colorama==0.4.6
craiyon.py==1.0.0
dict==2020.12.3
dispie==0.0.11
easy-pil==0.3.0
embed==0.1.0
ezcord==0.3.6
frozenlist==1.4.0
google==3.0.0
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
humanfriendly==10.0
humanize==4.8.0
idna==3.4
multidict==6.0.4
mypy-extensions==1.0.0
openai==0.27.8
optional==0.0.1
packaging==23.1
pathspec==0.11.2
Pillow==9.5.0
platformdirs==3.10.0
pprinter==0.0.1
py-cord @ git+https://github.com/Pycord-Development/pycord.git@b4b109c380f9bf179bb999ada5d30f01421a3e73
py-cord-dev==2.5.0rc5
pycparser==2.21
PyNaCl==1.5.0
pypresence==4.3.0
python-dotenv==1.0.0
regex==2023.6.3
requests==2.31.0
simpcalci==0.0.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
tabulate==0.9.0
timedelta==2020.12.3
tortoise==0.1.1
tqdm==4.65.1
typer==0.9.0
typing==3.7.4.3
typing_extensions==4.7.1
union==0.1.10
update-checker==0.18.0
urllib3==2.0.4
uvicorn==0.23.2
values==2020.12.3
websocket-client==1.6.1
websockets==11.0.3
yarl==1.9.2
fierce dove
#

fastapi Install error

solid ingot
#

wieso 2 mal pycord?

fierce dove
#

Keine Ahnung

#

Welches soll weg

solid ingot
#

mir egal

tawdry leaf
fierce dove
#

Ok

tawdry leaf
#

des andere ist der master branch xD

fierce dove
#
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/dc/__init__.py", line 7, in <module>
    from discord.cog import CogMeta
ModuleNotFoundError: No module named 'discord.cog'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/storage/emulated/0/Timo/Dev/Discord/Bot/Dashboard/bot.py", line 2, in <module>
    import ezcord
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/__init__.py", line 6, in <module>
    from . import components, emb, logs, sql, times, utils
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/components.py", line 27, in <module>
    from .internal import get_error_text
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/__init__.py", line 2, in <module>
    from .embed_templates import *
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/embed_templates.py", line 10, in <module>
    from ..internal.dc import discord
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/dc/__init__.py", line 14, in <module>
    from discord.ext.commands import CogMeta
ModuleNotFoundError: No module named 'discord.ext.commands'
#
import discord
import ezcord
from discord.ext.ipc import Server

class Bot(ezcord.Bot):
    def __init__(self):
        super().__init__(intents=discord.Intents.default())
        self.ipc = Server(self, secret_key="timo")
    
    async def on_ready(self):
        await self.ipc.start()
        print(f"{self.user} ist Online")
    
    @Server.route()
    async def guild_count(self, _):
        return str(len(self.guilds))
    
    async def on_ipc_error(self, endpoints: str, ecx: Exception):
        raise exc
        
bot = Bot()
bot.run("MTA4NDAyNzgxSiYgPfZ3qLxIJq6Y")
tawdry leaf
#

ModuleNotFoundError: No module named 'discord.cog'

fierce dove
#

Ja

#

Was ist damit

odd kiteBOT
#

@fierce dove

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

typing==3.7.4.3```
⚠️ Es sollte nur eine Discord Library installiert sein
```yml
py-cord @ git+https://github.com/Pycord-Development/pycord.git@b4b109c380f9bf179bb999ada5d30f01421a3e73
py-cord-dev==2.5.0rc5```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
fierce dove
#
aiocache==0.12.2
aiofile==3.8.7
aiofiles==0.8.0
aiohttp==3.8.5
aiopath==0.6.11
aiosignal==1.3.1
aiosqlite==0.17.0
any==0.0.1
anyio==3.7.1
async-timeout==4.0.2
asyncpraw==7.7.1
asyncprawcore==2.3.0
atlastk==0.13.2
attrs==23.1.0
Base-69==0.2.1
beautifulsoup4==4.12.2
better-ipc==2.0.3
black==23.7.0
caio==0.9.12
certifi==2023.7.22
cffi==1.15.1
chardet==5.2.0
charset-normalizer==3.2.0
click==8.1.7
color-pprint==0.0.3
colorama==0.4.6
craiyon.py==1.0.0
dict==2020.12.3
dispie==0.0.11
easy-pil==0.3.0
embed==0.1.0
ezcord==0.3.6
frozenlist==1.4.0
google==3.0.0
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
humanfriendly==10.0
humanize==4.8.0
idna==3.4
multidict==6.0.4
mypy-extensions==1.0.0
openai==0.27.8
optional==0.0.1
packaging==23.1
pathspec==0.11.2
Pillow==9.5.0
platformdirs==3.10.0
pprinter==0.0.1
py-cord @ git+https://github.com/Pycord-Development/pycord.git@b4b109c380f9bf179bb999ada5d30f01421a3e73
pycparser==2.21
PyNaCl==1.5.0
pypresence==4.3.0
python-dotenv==1.0.0
regex==2023.6.3
requests==2.31.0
simpcalci==0.0.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
tabulate==0.9.0
timedelta==2020.12.3
tortoise==0.1.1
tqdm==4.65.1
typer==0.9.0
typing_extensions==4.7.1
union==0.1.10
update-checker==0.18.0
urllib3==2.0.4
uvicorn==0.23.2
values==2020.12.3
websocket-client==1.6.1
websockets==11.0.3
yarl==1.9.2
tawdry leaf
#

#💬・chat message

ruby sparrow
# solid ingot `discord-ext-ipc` ist das falsche package, stattdessen sollte `better-ipc` insta...
PS C:\Users\nicor\OneDrive\Desktop\Flux Dashboard> & C:/Users/nicor/AppData/Local/Programs/Python/Python310/python.exe "c:/Users/nicor/OneDrive/Desktop/Flux Dashboard/main.py"
Traceback (most recent call last):
  File "c:\Users\nicor\OneDrive\Desktop\Flux Dashboard\main.py", line 2, in <module>
    from discord.ext.ipc import Client
ImportError: cannot import name 'Client' from 'discord.ext.ipc' (unknown location)```
urban glen
ruby sparrow
# urban glen Mach mal "pip freeze" und zeig mal ob "better-ipc" installiert ist
aiocache==0.12.1
aiofiles==0.8.0
aiohttp==3.8.5
aiosignal==1.3.1
aiosqlite==0.17.0
annotated-types==0.5.0
anyio==3.7.1
async-timeout==4.0.2
asyncpraw==7.7.1
asyncprawcore==2.3.0
attrs==23.1.0
better-ipc==2.0.3
certifi==2023.7.22
charset-normalizer==3.2.0
chat-exporter==2.6.1
click==8.1.7
colorama==0.4.6
easy-pil==0.3.0
emoji==2.7.0
exceptiongroup==1.1.3
ezcord==0.3.4
fastapi==0.103.1
frozenlist==1.4.0
grapheme==0.6.0
h11==0.14.0
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.3
multidict==6.0.4
Pillow==9.5.0
py-cord-dev==2.5.0rc5
pydantic==2.3.0
pydantic_core==2.6.3
pyjokes==0.6.0
python-dotenv==1.0.0
pytube==15.0.0
requests==2.31.0
sniffio==1.3.0
starlette==0.27.0
typing_extensions==4.7.1
update-checker==0.18.0
urllib3==2.0.4
uvicorn==0.23.2
watchdog==3.0.0
websockets==11.0.3
yarl==1.9.2```
urban glen
#

hm

solid ingot
#

installier better-ipc mal neu

fierce dove
#
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/dc/__init__.py", line 7, in <module>
    from discord.cog import CogMeta
ModuleNotFoundError: No module named 'discord.cog'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/storage/emulated/0/Timo/Dev/Discord/Bot/Dashboard/bot.py", line 2, in <module>
    import ezcord
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/__init__.py", line 6, in <module>
    from . import components, emb, logs, sql, times, utils
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/components.py", line 27, in <module>
    from .internal import get_error_text
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/__init__.py", line 2, in <module>
    from .embed_templates import *
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/embed_templates.py", line 10, in <module>
    from ..internal.dc import discord
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/ezcord/internal/dc/__init__.py", line 14, in <module>
    from discord.ext.commands import CogMeta
ModuleNotFoundError: No module named 'discord.ext.commands'
ruby sparrow
solid ingot
#

so wie alle anderen packages auch, erst pip uninstall und dann wieder pip install

fierce dove
#

Help

ruby sparrow
#

es komm kein error

fierce dove
#

Wie hast du es hinbekommen

ruby sparrow