#Allgemeine Hilfe

1 messages · Page 79 of 1

cloud cedar
#

oki

frosty nexus
#
    client_id: str
    client_secret: str
    redirect_uri: str
    session: aiohttp.ClientSession | None

    def __init__(self, client_id, client_secret, redirect_uri):
        self.client_id = client_id
        self.client_secret = client_secret
        self.redirect_uri = redirect_uri```
rancid raven
#

Das kannste aber auch einfach per arg bzw kwarg an deine Button class übergeben und dann in der def __init__ abfragen
also als arg discord.ButtonsStyle... übergeben und in der super().__init mit angeben etc

restive herald
frosty nexus
restive herald
#

Ahh

#

hast mal vsc restartet

#

bei mir hats auch manchmal nd gewollt

#

und alle dateien gespeichert?

cloud cedar
#

Guten Mooooooooooooooooooooooooooooooooooorgen
ich hab problem
wenn ich meinen bot neustarte funktioniert mein button noch
aber vergibt ne rolle anstatt die nachricht zu verschicken
sagt bitte was ich schicken soll

restive herald
#

den button code xd

#

und die on_ready

cloud cedar
#

@commands.Cog.listener()
async def on_ready(self):
self.bot.add_view(msgBtn())
self.bot.add_view(roleBtn())
await db.add_button_role_column()
await db.add_senf()

cloud cedar
cloud cedar
#

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

    @discord.ui.button(
        label="Akzeptieren", style = discord.ButtonStyle.green, emoji="👍", custom_id="accept_embed"
    )
    async def button_callback(self, button, interaction):
        role_id = await db.get_embed_role(interaction.guild.id)
        role = interaction.guild.get_role(role_id)
        if role is not None:
            await interaction.user.add_roles(role)
            embed = discord.Embed(title = "🎉 Dir wurde eine Rolle zugewiesen!", description=f"Du hast jetzt die Rolle {role.mention}", color=discord.Color.red())
            await interaction.response.send_message(embed = embed, ephemeral = True)
        else:
            await interaction.guild.owner.send(f"Bitte stelle auf {interaction.guild.name} mit /setup eine Embed Rolle ein :)")
            embed = discord.Embed(title = "Ich konte die Rolle nicht finden :(", description="Ich habe das dem Servereigentümer mitgeteilt.", color=discord.Color.red())
            await interaction.response.send_message(embed = embed, ephemeral = True)

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

    @discord.ui.button(
        label="Okay", style = discord.ButtonStyle.green, emoji="👍", custom_id="accept_embed"
    )
    async def button_callback(self, button, interaction):
        embedmsg_title = await db.get_embed_message_title(interaction.guild.id)
        embedmsg = await db.get_embed_message_content(interaction.guild.id)
        if embedmsg and embedmsg_title is not None:
            embed = discord.Embed(title = embedmsg_title, description=embedmsg, color=discord.Color.red())
            await interaction.response.send_message(embed = embed, ephemeral = True)

#
        else:
            embed = discord.Embed(title = "Upsi", description="Ich finde die Nachricht, die ich jetzt senden sollte nicht :(", color=discord.Color.red())
            await interaction.response.send_message(embed = embed, ephemeral = True)
restive herald
#

und wenn du auf msg btn klickst wird ne rolle vergeben oder wie

#

nach restart

frosty nexus
restive herald
restive herald
cloud cedar
frosty nexus
cloud cedar
restive herald
cloud cedar
rancid raven
#

@brisk dove ja dann implementiere da deine welcome channels mit z.B. guild und userid das du das dann abfragst im on_member_join event.
Timo hat du db´s ja schon vids gemacht und wenn du spezielle hilfe brauchst kannste code zeigen und was du für fehler hast

frosty nexus
brisk dove
rancid raven
# brisk dove also welcome channels ersetzen mit guild und userid?

Also wenn du es sowieso nur für einen Server machst, dann eifnach im code oben in der abfrage mit der serverid deine serverid rein machen
und unten dann die channelid wo der channel abgefragt wird
Und ansonsten mach dir commands die sowas in deine db eintragen falls du es für mehrere server machst etc

brisk dove
rancid raven
#

Ja dann mach dir commands die das abspeichern, und im on_member_join rufste die daten ab für die channels anhand der guild id etc

brisk dove
#

ah ok aber für die db brauche ich DB Brower (SQLite)?

cloud cedar
rancid raven
# brisk dove ah ok aber für die db brauche ich DB Brower (SQLite)?

Schau dir am besten mal https://www.youtube.com/watch?v=_lRq_RqxX3E& an
und ja wenn du dir die db anschauen willst darüber und sachen grafisch mit verändern willst dann ja.
Vom prinzip her kannste alles im code mit sql commands machen

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
cloud cedar
brisk dove
#

Traceback (most recent call last):
File "C:\Users\Msche\Desktop\marian\main.py", line 8, in <module>
from discord.commands import Option
ImportError: cannot import name 'Option' from 'discord.commands' (C:\Users\Marian\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands_init_.py)

#

das kommt bei mir bei der fehler meldung

ruby sparrow
restive herald
cloud cedar
restive herald
cloud cedar
#

hat der 🧙‍♂️ @solid ingot eine idee?

frosty nexus
#

@restive herald denkst du das es damit zusammen hängen könnte ???

restive herald
frosty nexus
restive herald
#

für das on_startup?

frosty nexus
restive herald
odd kiteBOT
#
from datetime import datetime

import discord
import ezcord
import uvicorn
from discord.ext.ipc import Client
from fastapi import Cookie, FastAPI, HTTPException, Request
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
from starlette.templating import Jinja2Templates
from contextlib import asynccontextmanager
from backend import DiscordAuth, db, feature_db

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

@asynccontextmanager
async def on_startup(app: FastAPI):
    await api.setup()
    await db.setup()
    await feature_db.setup()

    yield

    await api.close()
    # Hier kann noch selbst eine Methode, die je nach Datenbank variiert, hinzugefügt werden, um die Datenbank zu "schließen"

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

ipc = Client(secret_key="keks")
api = DiscordAuth(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI)


@app.get("/")
async def home(request: Request):
    session_id = request.cookies.get("session_id")
    if session_id and await db.get_session(session_id):
        return RedirectResponse(url="/guilds")

    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")

    token, refresh_...
ruby sparrow
#

die Optionen werden auf alle Server angezeigt aber es sollte nicht so sein

@ticket.command(description="Setup the ticket system")
    @option("category", description="Select a category", type=discord.CategoryChannel)
    @option("ticket_channel", description="Select a ticket channel", type=discord.TextChannel)
    @option("logs", description="Select a logs Channel", type=discord.TextChannel)
    async def setup(self, ctx, category: discord.CategoryChannel, ticket_channel: discord.TextChannel,
                    logs: discord.TextChannel):
        guild_id = ctx.guild.id
        await ctx.defer(ephemeral=True)

        category_id = category.id
        logs_channel_id = logs.id
        channel_id = ticket_channel.id

        await db.set_channel(guild_id, channel_id)
        await db.set_logs_channel(guild_id, logs_channel_id)
        await db.set_category(guild_id, category_id)

        category_name = category.name
        logs_channel_name = logs.name
        channel_name = ticket_channel.name

        # Get options for this guild from the database
        options = await db.get_options(guild_id)
        t_options = [discord.SelectOption(label=option, emoji="🎫") for option in options]

        embed = discord.Embed(
            title="🎫 Ticket System Setup",
            description="Welcome to the ticket system setup.",
            color=discord.Color.dark_green()
        )
        embed.add_field(name="🔘 Open Tickets", value=f"``{category_name}``", inline=False)
        embed.add_field(name="🎫 Ticket Channel", value=f"``{channel_name}``", inline=False)
        embed.add_field(name="📜 Log Channel", value=f"``{logs_channel_name}``", inline=False)
        embed.add_field(name="Great! Now you can select roles that should have access to tickets.",
                        value="Click on Continue afterward.", inline=False)

        setup_message = await ctx.send(embed=embed, view=TicketRole(channel_name, logs_channel_name, category_name))

        channel_id = await db.get_channel(guild_id)
        if channel_id:
            ticket_channel = ctx.guild.get_channel(channel_id)
            if ticket_channel:
                embed = discord.Embed(
                    title="Ticket System",
                    description="Choose a category to contact support.",
                    color=discord.Color.blue()
                )
                select = TutorialSelect()
                view = discord.ui.View(timeout=None)
                view.add_item(select)
                message = await ticket_channel.send(embed=embed, view=view)
                await db.set_message(guild_id, message.id)
            else:
                print(f"Channel with ID {channel_id} not found.")
        else:
            print(f"No channel ID found for server {guild_id}.")

        await ctx.respond("The setup was completed successfully", ephemeral=True, delete_after=10)
        print(f"Setting up ticket system for guild: {guild_id}")``` auf die Bilder sind zwei verschiedenen Server
frosty nexus
#
    result = await api.get_token_response(data)
AttributeError: 'DiscordAuth' object has no attribute 'get_token_response'
^CINFO:     Shutting down```






Moin der findet meine get_token_response nicht kann mir da jemand weiterhelfen ????
#

main.py

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")```



api.py



```import aiohttp

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




class DiscordAuth:
    client_id: str
    client_secret: str
    redirect_uri: str
    session: aiohttp.ClientSession | None

    def __init__(self, client_id, client_secret, redirect_uri):
        self.client_id = client_id
        self.client_secret = client_secret
        self.redirect_uri = redirect_uri

    async def setup(self):
        self.session = aiohttp.ClientSession()

async def get_token_response(self, 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```




__init__.py




```from .  import DiscordAuth```
restive herald
fresh flint
#

Ist es möglich eine .exe datei auf Ubunto 22.04 24/7 zu hosten?

mental hamlet
#

.exe ist windows

fresh flint
mental hamlet
fresh flint
#

Warum?

frosty nexus
restive herald
#

Hab mich jezt mal an PostgreSQL rangemacht und wollte die für mein Dashboard übernehmen, jedoch kommt die ganze Zeit folgender Error:

Hat jemand eine Idee, warum dieser Error kommt?

frosty nexus
#
  """INSERT OR REPLACE INTO sessions (session_id, token, refresh_token, token_expires_at, user_id)
Traceback (most recent call last):
  File "/workspaces/dashbord/main.py", line 9, in <module>
    from backend import DiscordAuth, db
  File "/workspaces/dashbord/backend/__init__.py", line 2, in <module>
    from .database import db
  File "/workspaces/dashbord/backend/database.py", line 48, in <module>
    db = DashbordDB()
TypeError: DashbordDB.__init__() takes 0 positional arguments but 1 was given```



ich checke nicht was der will es ist meiner Ansicht nach alles richtig habe auch mit dem GitHub code verglichen
tawdry leaf
#

@frosty nexus nach user_id ein komma

#

/workspaces/dashbord/backend/database.py:31: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?

frosty nexus
tawdry leaf
#

bräuchte schon einen code xD

frosty nexus
# tawdry leaf bräuchte schon einen code xD
from datetime import  datetime, timedelta
import ezcord


class DashbordDB(ezcord.DBHandler):
   def __init__():
    super().__init__("dashbord.db")



    async def setup(self):
     await self.exec(
            """CREATE TABLE IF NOT EXISTS sessions (
            session_id TEXT UNIQUE,
            token TEXT,
            refresh_token TEXT,
            token_expires_at TIMESTAMP,
            user_id INTEGER PRIMARY KEY
            )"""
        )
     
    async def add_session(self, token, refresh_token, expires_in, user_id):
        session_id = str(uuid.uuid4())
        expires = datetime.now() + timedelta(seconds=expires_in)




        await self.exec(
            """INSERT OR REPLACE INTO sessions (session_id, token, refresh_token, token_expires_at, user_id)
            VALUES (?, ?, ?, ?, ?)""",
            (session_id, token, refresh_token, expires, user_id),
        )
        return session_id




   async def get_session(self, session_id):
        return await self.one(
            "SELECT token, refresh_token, token_expires_at, user_id FROM sessions WHERE session_id = ?",
            session_id,
            detect_types=1
        )
   


db = DashbordDB()```
#

habe das behoben hatte ein Rechtschreibfehler, aber danke 🙂

frosty nexus
#
  File "/workspaces/dashbord/backend/__init__.py", line 1, in <module>
    from .api import DiscordAuth
ImportError: attempted relative import with no known parent package```




Habe immer noch ein problem mt dem import 




code;


```from .api import DiscordAuth
from .database import db```
west valley
#

Wie kirege ich in discord.py den servernamen in einem command

cloud cedar
#

wie könnte ich in easy pil verhindern, dass der text über den rand geht?

ruby sparrow
solid ingot
cloud cedar
cloud cedar
last depot
#

weiß einer wieso das rot ist obwohl ich alles installiert habe

#

eh gelb meine ich

restive herald
#

gelb is nd schlimm

last depot
#

Ja aber da kommt immer wegen dem Discord ein Problem

#

Also error das er es nicht finden kann

cloud cedar
last depot
#

Py-Cord ist aber installiert

last depot
ruby sparrow
cloud cedar
cloud cedar
fierce dove
last depot
fierce dove
#

Ok

cloud cedar
last depot
#

ich brauche auch hilfe😥

native helm
#

[ERROR] Error while executing /help 
Traceback (most recent call last):
  File "C:\Users\vison\Desktop\LNKY\.venv\lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
  File "C:\Users\vison\Desktop\LNKY\.venv\lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Users\vison\Desktop\LNKY\commands\Help.py", line 24, in help
    await ctx.respond(embed=embed, view=HelpView, ephemeral=True)
  File "C:\Users\vison\Desktop\LNKY\.venv\lib\site-packages\discord\interactions.py", line 585, in respond
    return await self.response.send_message(*args, **kwargs)
  File "C:\Users\vison\Desktop\LNKY\.venv\lib\site-packages\discord\interactions.py", line 882, in send_message
    payload["components"] = view.to_components()
TypeError: View.to_components() missing 1 required positional argument: 'self'```
#

ich auch

native helm
#

und wo

#

wait schicke code

cloud cedar
#

¯_(ツ)_/¯

native helm
cloud cedar
native helm
#

?

cloud cedar
#

musst view = HelpView() schreiben
und wenn das nicht geht view = HelpView(self)

native helm
#

okay danke

#

@cloud cedar Geht

cloud cedar
#

ich hab keine ahnung warum mein bot so vercrackt ist
der führt einfach nach dem neustart ein falsches callback aus

#

der cringy

native helm
cloud cedar
native helm
#
Ignoring exception in view <HelpView timeout=900.0 children=1> for item <HelpSelect type=<ComponentType.string_select: 3> placeholder='Which category would you like to see' min_values=1 max_values=1 options=[<SelectOption label='Commands' value='commands' description=None emoji=<PartialEmoji animated=False name='slashcommand' id=1241720797232496671> default=False>, <SelectOption label='Information' value='info' description=None emoji=<PartialEmoji animated=False name='ℹ' id=None> default=False>] channel_types=[] disabled=False>:
Traceback (most recent call last):
  File "C:\Users\vison\Desktop\LNKY\.venv\lib\site-packages\discord\ui\view.py", line 426, in _scheduled_task
    await item.callback(interaction)
  File "C:\Users\vison\Desktop\LNKY\commands\Help.py", line 67, in callback
    await interaction.response.send_message(embed=embed, ephemeral=True)
UnboundLocalError: local variable 'embed' referenced before assignment
#

deswegen

cloud cedar
#

selber code?

native helm
#

jap

cloud cedar
#

ah du hast wieder gelöscht

native helm
#

wegen logo

#

und website

cloud cedar
#

oki
oki

native helm
#

Hier Lösche gleich wieder

cloud cedar
#

kann's sein, dass die letzte zeile weiter nach rechts muss?

native helm
#

das icon dibn

#

oder await

cloud cedar
native helm
#

geht beides jetzt nicht mehr

cloud cedar
#

der error kommt halt immer wenn du embed.irgendwaswieadd_img(saft) machst obwohl du noch kein embed = discord.embed definiert hast

native helm
#

ok

#

was kann ich dann machen ??

cloud cedar
#

deine if statements verderben bestimmt den salat ¯_(ツ)_/¯

last depot
#

import re
from datetime import timedelta

import discord
from discord.ext import commands


async def timeout_user(minutes: float, user: discord.Member | discord.User, reason: str) -> str:
    if isinstance(user, discord.User):
        return 'Author is not a Member'
    try:
        await user.timeout_for(timedelta(minutes=minutes), reason=reason)
        return f'{minutes} minutes'
    except (discord.Forbidden, discord.HTTPException) as e:
        return e.text


class AntiInvite(commands.Cog):
    invites_re = re.compile(r'(?:discord\.gg|discord\.com\/invite|\.gg)\/(\S+)')
    whitelisted_vanities = ['myInvite', 'myOtherInvite']
    whitelisted_channels = [1027677692730036294, 1019974414487535736]
    reason = 'Discord invite link in public channel'

    def __init__(self, bot: discord.Bot) -> None:
        self.bot = bot

    @commands.Cog.listener()
    async def on_message(self, message: discord.Message):
        if not message.guild:
            return

        if message.author.guild_permissions.administrator:
            return

        if message.channel.id in self.whitelisted_channels:
            return

        if not self.contains_invite(message.content.replace(' ', '')):
            return

        await message.delete(reason=self.reason)
        await timeout_user(5, message.author, self.reason)

    def contains_invite(self, content: str):
        matches = self.invites_re.findall(content)
        if not matches:
            return

        if all(match in self.whitelisted_vanities for match in matches):
            return False

        return True


def setup(bot: discord.Bot):
    bot.add_cog(AntiInvite(bot))
#

was ist falsch

native helm
#

Hey leute habe ein Kleines Problem beim dashboard kann mir da einer helfen ?

fierce dove
#

Ohne Code nix Hilfe

tawdry leaf
frosty nexus
#

Also das er die datei nicht will?

urban glen
frosty nexus
#
  File "/workspaces/dashbord/backend/__init__.py", line 1, in <module>
    from .database import db
ImportError: attempted relative import with no known parent package```


Kann mir da jemand weiterhelfen???
tawdry leaf
frosty nexus
last depot
urban glen
#

Wo wird die Nachricht reingeschickt?

urban glen
last depot
#

der error

urban glen
#

Ne in discord

last depot
# urban glen Ne in discord

ne nur mein error log im discord da passiert nix ich starte mein bot und es kommt
AttributeError: 'User' object has no attribute 'guild_permissions'

durchgespammt

quasi frost
#

weiß jemand warum das so lange lädt also glaube es lädt idk

#

scheint das es geht

solid ingot
#

solange kein Error da ist ist alles gut

quasi frost
#

hab das auch nicht verstanden

#

und keine url obwohl ich eine domain habe

frosty nexus
#

könnte sich mal jemand HIER
umschauen ???

urban glen
#

@silk gulch #1231649959070404628

#

hab ich bei mir mit so einer is_staff Funktion aber hat hierfür kein sinn gemacht

urban glen
#

Wo wird die msg geschickt

placid trellis
#

@ivory cipher es geht um die pycord Version in der neuen ist vieles anders daher ist der Code auch nicht kompatibel

ivory cipher
turbid oasis
#

Ich möchte. dass wenn eine Nachricht gesendet wird, dass kurz gewartet wird, bis der Bot wieder die Nachrichten zählt, um spam zu vermeiden

last depot
#

Gleich schon beim starten kommt das

cloud cedar
placid trellis
#

Musst du leider selber rausfinden

frosty nexus
#

könnte sich mal jemand HIER
umschauen ???

ivory cipher
frosty nexus
#

?

fierce dove
#

🙂

urban glen
#

wie kann ich yaml installieren

ruby sparrow
urban glen
fierce dove
ruby sparrow
#

Oh stimmt

fierce dove
urban glen
fierce dove
#

Bitte

urban glen
#

es geht

fierce dove
#

🙂

#

👍

urban glen
urban glen
#
import discord
from discord.ext import commands
import datetime
import yaml


with open('log_config.yaml', 'r') as file:
    data = yaml.safe_load(file)
    log_channel_id = data['log_channel_id']

fehler:

Traceback (most recent call last):
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\.venv\Lib\site-packages\discord\cog.py", line 778, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\cogs\LOG\log_create_channel.py", line 7, in <module>
    with open('log_config.yaml', 'r') as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'log_config.yaml'

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

Traceback (most recent call last):
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\main.py", line 13, in <module>
    bot.load_cogs("cogs", subdirectories=True)
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\.venv\Lib\site-packages\ezcord\bot.py", line 327, in load_cogs
    self.load_extension(cog)
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\.venv\Lib\site-packages\discord\cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\melvi\PycharmProjects\vindijk_4-bots\.venv\Lib\site-packages\discord\cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.LOG.log_create_channel' raised an error: FileNotFoundError: [Errno 2] No such file or directory: 'log_config.yaml'

fierce dove
#

Ordner structure

urban glen
fierce dove
#

Danke

urban glen
fierce dove
#

Ich schaue gerade ich bin schon alt des dauert

urban glen
#

haha

fierce dove
#

👴🏻

urban glen
fierce dove
#

Ja

urban glen
# last depot Nein ich schreibe ja Nix

import re
from datetime import timedelta

import discord
from discord.ext import commands


async def timeout_user(minutes: float, user: discord.Member | discord.User, reason: str) -> str:
    if isinstance(user, discord.User):
        return 'Author is not a Member'
    try:
        await user.timeout_for(timedelta(minutes=minutes), reason=reason)
        return f'{minutes} minutes'
    except (discord.Forbidden, discord.HTTPException) as e:
        return e.text


class AntiInvite(commands.Cog):
    invites_re = re.compile(r'(?:discord\.gg|discord\.com\/invite|\.gg)\/(\S+)')
    whitelisted_vanities = ['myInvite', 'myOtherInvite']
    whitelisted_channels = [1027677692730036294, 1019974414487535736]
    reason = 'Discord invite link in public channel'

    def __init__(self, bot: discord.Bot) -> None:
        self.bot = bot

    @commands.Cog.listener()
    async def on_message(self, message: discord.Message):
        if not message.guild:
            return

        if isinstance(message.author, discord.Member) and message.author.guild_permissions.administrator:
            return

        if message.channel.id in self.whitelisted_channels:
            return

        if not self.contains_invite(message.content.replace(' ', '')):
            return

        await message.delete(reason=self.reason)
        await timeout_user(5, message.author, self.reason)

    def contains_invite(self, content: str):
        matches = self.invites_re.findall(content)
        if not matches:
            return

        if all(match in self.whitelisted_vanities for match in matches):
            return False

        return True


def setup(bot: discord.Bot):
    bot.add_cog(AntiInvite(bot))
#

Dann mach so, ist bestimmt wegen webhook Message irgendwo

fresh flint
#

Ich will mich mit meinem VPS Windows Server 2019 in RD client einloggen, aber bekomme immer den selber error und komme nicht mehr weiter

quasi frost
#

wie fix ich das?
hab bei cloudflare eig alles an

cloud cedar
dusty tiger
#

dein server halt neustarten

restive herald
#

Lohnt es sich bei einem Dashboard eher PostgreSQL zu nehmen?

#

Oder is es leichter weiter aiosqlite zu nehmen

#

Und kann man mehrere Datenbanken usen?

ruby sparrow
#

mein bot start nicht mit Pelican Panel

#

er error kommt py **/usr/local/bin/python: can't find '__main__' module in '/home/container/' container@panel~ Server marked as offline... [pelican Daemon]: ---------- Detected server process in a crashed state! ---------- [pelican Daemon]: Exit code: 1 [pelican Daemon]: Out of memory: false [pelican Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago. **

restive herald
restive herald
#

gibts da irgendwo panel settings?

ruby sparrow
quasi frost
#

ich hab das mit ihn aufgesetzt und ich hab das python egg umgestellt bei ihn das beim starten die main.py verwendet
sonst fällt mir selber nichts ein

restive herald
quasi frost
#

ich hab eig alles gleich wie ihn und mein server geht

ruby sparrow
# restive herald zeig mal die main.py
import discord
import os
from dotenv import load_dotenv
from ezcord import i18n
import asyncio
import re
import colorama
from discord.commands import Option
from colorama import Fore
import ezcord
from discord import Color
import random
import logging

intents = discord.Intents.all()

bot = ezcord.Bot(

    intents=intents,
    error_handler=(os.getenv("ERROR_WEBHOOK_URL")),
)
bot.add_blacklist([1236648708431675432], owner_only=True)



logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)

handler = logging.FileHandler(
    filename='logs/discord.log',
    encoding='utf-8'
)
dt_fmt = '%Y-%m-%d %H:%M:%S'
formatter = logging.Formatter('[{asctime}] [{levelname:<8}] {name}: {message}', dt_fmt, style='{')
handler.setFormatter(formatter)
logger.addHandler(handler)

if __name__ == "__main__":
    bot.load_cogs()


    bot.run()```
quasi frost
#

liegt nicht am code eig
weil er hat das template grad von timo versucht und der gleiche error

#

ich hab das gefühl das ich beim erklären was verkackt habe :(

ruby sparrow
quasi frost
#

uhhh

#

idk

ruby sparrow
tawdry leaf
#

ich kenne es nd so

pulsar sundial
#

Wenn ich das so in .env mache werden dann beide rollen genommen?

tawdry leaf
#

ne

pulsar sundial
#

wie mache ich es das der User beide Rollen bekommt

tawdry leaf
#

mach doch eine liste mit beiden aber .env ist eher für was privates was man nicht zeigen soll da musst du nicht die AUTOROLES rein schreiben

pulsar sundial
#

ok danke

tawdry leaf
#

gerne

pulsar sundial
#
[ERROR] Error in event on_member_join 
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.11/site-packages/discord/client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "/home/container/cogs/welcome.py", line 48, in on_member_join
    background.save(file_path)
  File "/home/container/.local/lib/python3.11/site-packages/easy_pil/editor.py", line 659, in save
    self.image.save(fp, file_format, **params)
  File "/home/container/.local/lib/python3.11/site-packages/PIL/Image.py", line 2435, in save
    fp = builtins.open(filename, "w+b")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'img/welcome.png'

Error von Welcome Card

quasi frost
#

code zeigen :

#

:)*

tawdry leaf
#

wozu xD

quasi frost
#

weiß ja nicht was er da geschrieben hat

tawdry leaf
#

der bot hat keine Rechte die datei zu überschreiben 🙂

quasi frost
#

oh lol nicht gecheckt hab das errno nicht gesehen

#

" File "/home/container/cogs/welcome.py", line 48, in on_member_join
background.save(file_path)"
hab das betrachtet lol

pulsar sundial
pulsar sundial
pulsar sundial
#

danke ❤️

pulsar sundial
#

Wie bekomme ich den User gepingt der den Command ausführt

tawdry leaf
pulsar sundial
#

code: @slash_command(description="Add eine Rolle zu einem User") @commands.has_permissions(manage_roles=True) async def einstellung(self, ctx,einstellungsperson: Option(discord.Member, "Who should i add a Role?", required=True), ): await einstellungsperson.add_roles(1225120486388793505)

#

wie funktoniert es das der ausgesuchte member die Rolle bekommt wenn ich den command abschicke

#

ok

#

kann ich es irgendwie trtzdm bei einer int lassen was müsste ich ändern

ruby sparrow
# pulsar sundial kann ich es irgendwie trtzdm bei einer int lassen was müsste ich ändern
@slash_command(description="Add eine Rolle zu einem User")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True)):
        role = ctx.guild.get_role(1225120486388793505)
        if role:
            await einstellungsperson.add_roles(role)
            await ctx.respond(f"Role {role.name} has been added to {einstellungsperson.display_name}.")
        else:
            await ctx.respond("Role not found.")```
#

test mal so

pulsar sundial
#

es funktioniert

#

danke

ruby sparrow
#

bitte

pulsar sundial
# ruby sparrow bitte
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True)):
        role = ctx.guild.get_role(1225120486388793505)
        if role:
            await einstellungsperson.add_roles(role)
            await ctx.respond(f"Role {role.name} has been added to {einstellungsperson.display_name}.")
        else:
            await ctx.respond("Role not found.")

        embed = discord.Embed(
        title="Einstellung",
        color=discord.Color.red(),
        )
        embed.set_footer(text=f"Einstellung von: {ctx.autor.display_name}")
        embed.set_author(name="SRT Motors")
    
        await ctx.send_message(embed=embed)``` Mein Embed sendet es immer so:

Ich möchte es so haben das es nicht antwortet auf die nachricht davor
ruby sparrow
pulsar sundial
pulsar sundial
dusty tiger
#

Wenn du nh variable hast einfach await channel.send machen sonst musst du den Channel noch hetzen

#

Getten*

pulsar sundial
#

ok

pulsar sundial
# dusty tiger Wenn du nh variable hast einfach await channel.send machen sonst musst du den Ch...
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True, ephemeral=True)):
        role = ctx.guild.get_role(1225120486388793505)
        if role:
            await einstellungsperson.add_roles(role)
            await ctx.respond(f"Role {role.name} has been added to {einstellungsperson.display_name}.")
        else:
            await ctx.respond("Role not found.")```

Wie vergebe ich mehrere Rollen?
dusty tiger
#

Liste

pulsar sundial
fierce dove
#

Code

pulsar sundial
#
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True, ephemeral=True)):
        roles = [1225120486388793505,1225120947380686918]
        role = ctx.guild.get_role(roles)
        if role:
            await einstellungsperson.add_roles(role)
            await ctx.respond(f"Role {role.name} has been added to {einstellungsperson.display_name}.")
        else:
            await ctx.respond("Role not found.")```
fierce dove
#

Error der ganze bitte

pulsar sundial
#
[ERROR] Error while executing /einstellung 
Traceback (most recent call last):
  File "/home/runner/SRT-Motors/.pythonlibs/lib/python3.10/site-packages/discord/commands/core.py", line 131, in wrapped
    ret = await coro(arg)
  File "/home/runner/SRT-Motors/.pythonlibs/lib/python3.10/site-packages/discord/commands/core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "/home/runner/SRT-Motors/cogs/einstellung.py", line 14, in einstellung
    role = ctx.guild.get_role(roles)
  File "/home/runner/SRT-Motors/.pythonlibs/lib/python3.10/site-packages/discord/guild.py", line 887, in get_role
    return self._roles.get(role_id)
TypeError: unhashable type: 'list'
cloud cedar
cloud cedar
dusty tiger
#

dafür brauchst du mehrere inputs

cloud cedar
#

ja

dusty tiger
#

oder parser

cloud cedar
#

darfst keine liste getten

pulsar sundial
dusty tiger
cloud cedar
#

einfach 2 roles getten

pulsar sundial
cloud cedar
pulsar sundial
cloud cedar
#

ja wenn das nicht geht
2x await einstellungsperson.add_roles(role) also einzeln für die beiden

pulsar sundial
#

ok

#

danke

dusty tiger
cloud cedar
#

replit ist böse

pulsar sundial
#

habe kein anderes for free

cloud cedar
#

ist free 🔥
und supi

#

und dann kannst du dir irgendwann, wenn du's alleine hosten willst

  1. Einen hoster mieten
  2. Dir einen coolen 30€ raspberry pi kaufen
dusty tiger
#

replit ist nichtmal ein hoster das ist eine IDE bruH

dusty tiger
cloud cedar
#

🤨 wrong

dusty tiger
#

Deswegen machst du instant #💻・cookie-hosting blue_wacky ||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​|| https://voided.host/bHVROfZheMqAUtOG

cloud cedar
#

trotzdem hostet replit auch

#

und ja, wenn er 'ne IDE will kann er VSC nutzen

dusty tiger
#

nein

cloud cedar
pulsar sundial
cloud cedar
#

brauchst eigentlich nix davon

pulsar sundial
#

ok danke

fierce dove
cloud cedar
#

wenn du noch fragen hast kannst du mich gerne pingen

fierce dove
#

@cloud cedar

#

🙂

cloud cedar
cloud cedar
fierce dove
fierce dove
pulsar sundial
cloud cedar
fierce dove
fierce dove
cloud cedar
#

Also wo du keins for free gefunden hast

pulsar sundial
#

Danke für beides xD

cloud cedar
#

oki

#

:)

tawdry leaf
#

Gerne

pulsar sundial
fierce dove
pulsar sundial
fierce dove
#

Hmmm

old ore
# pulsar sundial

ja das obejekt Member hat kein author versuch mal statt author .mention

pulsar sundial
#

danke

cloud cedar
pulsar sundial
cloud cedar
pulsar sundial
#

ja

cloud cedar
#

Sicher?

ruby sparrow
cloud cedar
#

Vsc oder Vs code oder visual Studio code
Aber doch nicht dieser buchstabenbrei

ruby sparrow
#

Sry

pulsar sundial
cloud cedar
cloud cedar
ruby sparrow
pulsar sundial
ruby sparrow
#

Send denn bild?

pulsar sundial
ruby sparrow
pulsar sundial
#

heißt neu installieren?

ruby sparrow
#

Ju

#

Und denn send von allen Bilder

#

@pulsar sundial

pulsar sundial
#

lade es jetzt über microsoft store runter

ruby sparrow
pulsar sundial
#

ok

ruby sparrow
#

Denn auf Download

pulsar sundial
#

hab

ruby sparrow
#

Zeig?

pulsar sundial
ruby sparrow
#

Denn auf add python

#

und das erste auch sn

pulsar sundial
#

hab

ruby sparrow
#

an

#

Zeig

pulsar sundial
ruby sparrow
#

Jz install new

#

*now

pulsar sundial
#

ok fertig

ruby sparrow
#

Jz dein vs code neu starten

pulsar sundial
#

hab

ruby sparrow
#

zeig

pulsar sundial
ruby sparrow
#

Geh mal unten rechts auf Python 3.12

pulsar sundial
#

es geht

ruby sparrow
#

Ok das freut mich(:

pulsar sundial
#

danke 🙂

ruby sparrow
#

bitte

pulsar sundial
ruby sparrow
pulsar sundial
#

wie kann es sein ist der richtige

ruby sparrow
pulsar sundial
#
import discord
import os
from dotenv import load_dotenv
import ezcord
from discord.commands import Option

activity = discord.Activity(type=discord.ActivityType.playing, name="Eigener Bot von JaKova01"
)
status = discord.Status.online


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


bot = ezcord.Bot(
    activity=activity,
    status=status,
    language="de",
    intents=intents,
debug_guilds = [1225116383033954436]  # hier server id einfügen
)
bot.add_help_command()


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


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"))
ruby sparrow
#

Zeig mal deine .env ohne Token

pulsar sundial
ruby sparrow
#

mach mal einfach ein neuen token

pulsar sundial
#

ok

#

immernoch

ruby sparrow
#

Versuch mal ohne deine .env deine bot startet

#

@pulsar sundial

pulsar sundial
#

geht

ruby sparrow
pulsar sundial
#

pycord

ruby sparrow
#

Mach mal pip freeze

#

@pulsar sundial

pulsar sundial
ruby sparrow
#

#🔍・pycord-help @pulsar sundial

#

Zwei library darf Man nicht

pulsar sundial
#

weiß selber grad nicht wieso da discord.py steht es geht danke

ruby sparrow
pulsar sundial
pulsar sundial
#

error beim starten

ruby sparrow
#

Wofür brauchst du discord.abc?

ruby sparrow
cloud cedar
#

Oder einfach auf den Pfeil oben rechts

cloud cedar
ruby sparrow
pulsar sundial
# ruby sparrow <@795974765709230120>
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Add eine Rolle zu einem User")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True, ephemeral=True)): # type: ignore
        role = ctx.guild.get_role(1225120486388793505)
        role2 = ctx.guild.get_role(1225120947380686918)
        if role:
            await einstellungsperson.add_roles(role, role2)
            await ctx.channel.send(f"test")
        else:
            await ctx.respond("Role not found.")

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
        title="Einstellung",
        color=discord.Color.red(),
        )
        embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")
        
        await channel.send(embed=embed)

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

Mein Command soll werden /einstellung user dann sendet er ein embed in einen channel und der user bekommt bestimmte rollen

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
cytoolz==0.12.3
DateTime==5.5
discord.py==2.3.2
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.14.0
hexbytes==0.3.1
httpcore==1.0.5
httpx==0.27.0
idna==3.4
imageio-ffmpeg==0.4.9
importlib-metadata==6.0.0
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
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
pydantic==2.7.1
pydantic_core==2.18.2
PyGetWindow==0.0.9
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
PyMsgBox==1.0.9
pynput==1.7.7
pyperclip==1.8.2
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
terminut==0.0.0.940
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

#
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
cytoolz==0.12.3
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.14.0
hexbytes==0.3.1
httpcore==1.0.5
httpx==0.27.0
idna==3.4
imageio-ffmpeg==0.4.9
importlib-metadata==6.0.0
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
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
pydantic==2.7.1
pydantic_core==2.18.2
PyGetWindow==0.0.9
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
PyMsgBox==1.0.9
pynput==1.7.7
pyperclip==1.8.2
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
terminut==0.0.0.940
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
#

?

#

Kann mir das einer erklären ?

odd kiteBOT
#

@native helm

Requirements-Check

⚠️ Schreibe nur die Package-Namen in deine Datei

importlib-metadata==6.0.0```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
#

@native helm

Requirements-Check

⚠️ Entferne alle Module aus der Python Standardbibliothek

DateTime==5.5```
⚠️ Es sollte nur eine Discord Library installiert sein
```yml
discord.py==2.3.2
py-cord==2.5.0```
⚠️ Schreibe **nur** die Package-Namen in deine Datei
```yml
importlib-metadata==6.0.0```
*Ich habe [diese Nachricht](#1019974414487535736 message) geprüft.*
urban glen
#

weiß jemand wieso bei mir seit kurzem alle embeds zweimal gesendet werden? also wenn ich den command ausführ wird alles doppelt gesendet bei jedem meiner codes

#

hab nix geändert

solid ingot
#

dein bot läuft wahrscheinlich doppelt

urban glen
#

hatte ihn noch auf meinem rootserver drauf

#

habs wohl vergessen

#

danke

native plume
last depot
ruby sparrow
last depot
ruby sparrow
#

No

last depot
native helm
#
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
cytoolz==0.12.3
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.14.0
hexbytes==0.3.1
httpcore==1.0.5
httpx==0.27.0
idna==3.4
imageio-ffmpeg==0.4.9
importlib-metadata==6.0.0
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
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
pydantic==2.7.1
pydantic_core==2.18.2
PyGetWindow==0.0.9
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
PyMsgBox==1.0.9
pynput==1.7.7
pyperclip==1.8.2
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
terminut==0.0.0.940
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
ruby sparrow
native helm
#

ist egal schon

ruby sparrow
#

native helm
#

habe grade dieses @odd kite Ding gefragt

#
  File "C:\Users\vison\Desktop\Arsona\main.py", line 2, in <module>
    import discord
ModuleNotFoundError: No module named 'discord'```
ruby sparrow
#

Lösch nochmal py-cord und wieder runter laden

#

@native helm

native helm
#

py-cord war nicht mal installt

ruby sparrow
#

Jz gehst?

native helm
#

jap danke

pulsar sundial
#

Error Code beim Starten des Bots

ruby sparrow
pulsar sundial
native helm
#
Traceback (most recent call last):
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Users\vison\Desktop\Arsona\cogs\Mod.py", line 182, in warn
    async with aiosqlite.connect("db/mod_sys.db") as db:
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 154, in __aenter__
    return await self
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 141, in _connect
    self._connection = await future
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 106, in run
    result = function()
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 401, in connector
    return sqlite3.connect(loc, **kwargs)
sqlite3.OperationalError: unable to open database file```
ruby sparrow
ruby sparrow
native helm
#

hab schon

pulsar sundial
#

ja

ruby sparrow
#

zeig deine main @pulsar sundial

pulsar sundial
#
import discord
import os
from dotenv import load_dotenv
import ezcord
from discord.commands import Option

activity = discord.Activity(type=discord.ActivityType.playing, name="-----"
)
status = discord.Status.online


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


bot = ezcord.Bot(
    activity=activity,
    status=status,
    language="de",
    intents=intents,
debug_guilds = [1225116383033954436]  
)
bot.add_help_command()


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


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"))
pulsar sundial
#

ka

#

eig true why haha

ruby sparrow
#

Lass das all nur da

pulsar sundial
#

ich weiß

ruby sparrow
#

Und hast du?

pulsar sundial
#

ja habe das problem gelöst

ruby sparrow
#

Und was war das Problem?

pulsar sundial
#

habe pycord uninstall und install und jetzt geht es

ruby sparrow
#

Okay

pulsar sundial
#

Wenn ich mein Command eingebe kommt das aber er sendet trtzdem den text ab
Code:

import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Add eine Rolle zu einem User")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Who should I add a Role?", required=True, ephemeral=True)):
        role = ctx.guild.get_role(1225120486388793505)
        role2 = ctx.guild.get_role(1225120947380686918)
        if role:
            await einstellungsperson.add_roles(role, role2)
            await ctx.channel.send(f"test")
        else:
            await ctx.respond("Role not found.")

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
        title="Einstellung",
        color=discord.Color.red(),
        )
        embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")
        
        await channel.send(embed=embed)

def setup(bot):
            bot.add_cog(einstellung1(bot))
pulsar sundial
#

Wie mache ich die Respond nachricht nur für mich sichtbar

pulsar sundial
#

wie mache ich ein thumbnail mit custom link?

native plume
pulsar sundial
#

embed

#
     embed.set_thumbnail(url="https://shorturl.at/fOsQ")

So wird nichts im Embed angezeigt

tired hearth
#

Weiß wer warum das nd geht?

#

@solid ingot bitte hilf mir

#

bekommst auch Kekse

solid ingot
#

ok erst die kekse

tired hearth
#

bekommst mehr wenn es geht

solid ingot
#

was funktioniert denn nicht?

tired hearth
#

im vidio sieht das anders aus

#

<@&1020464591584641044>

solid ingot
native helm
#
[ERROR] Error while executing /gamble 
Traceback (most recent call last):
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Users\vison\Desktop\Arsona\cogs\games\casino.py", line 202, in gamble
    await db.execute("UPDATE users SET balance = ? WHERE id = ?", (new_balance, ctx.author.id))
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 190, in execute
    cursor = await self._execute(self._conn.execute, sql, parameters)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 133, in _execute
    return await future
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 106, in run
    result = function()
sqlite3.OperationalError: no such column: balance
solid ingot
#

schreib immer dazu was nicht geht, sonst kann dir niemand helfen

#

ah ok

#

deine datenbank hat keine "balance" spalte

tired hearth
# solid ingot solange kein error da ist, ist alles gut
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
87 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
root@24fire:/var/www/pelican# ^C
root@24fire:/var/www/pelican# `
native helm
solid ingot
#

was geht daran nicht?

tired hearth
#

du hast da nen setup

#

ich nd

native helm
# native helm ```PY [ERROR] Error while executing /gamble Traceback (most recent call last): ...
[ERROR] Error while executing /gamble 
Traceback (most recent call last):
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Users\vison\Desktop\Arsona\cogs\games\casino.py", line 202, in gamble
    await db.execute("UPDATE users SET bank = ? WHERE id = ?", (new_balance, ctx.author.id))
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 190, in execute
    cursor = await self._execute(self._conn.execute, sql, parameters)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 133, in _execute
    return await future
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 106, in run
    result = function()
sqlite3.OperationalError: no such column: id

``` Neuer Error
tired hearth
native helm
#

@solid ingot Danke Für deine Hilfe

tired hearth
#

@solid ingot

solid ingot
tired hearth
solid ingot
#

ich weiß es halt einfach nicht

#

und du pingst zu oft

tired hearth
tired hearth
solid ingot
#

👍🏽

#

das waren übrigens wieder 2 pings :D

tired hearth
native helm
tired hearth
# solid ingot 👍🏽

habe jetzt nochmal alles von neu gemacht, nur kommt bei mir nichts wenn ich php artisan p:environment:setup ausführe (doch jetzt)

native helm
#


[ERROR] Error while executing /pay 
Traceback (most recent call last):
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 131, in wrapped
    ret = await coro(arg)
  File "C:\Users\vison\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Users\vison\Desktop\Arsona\cogs\games\casino.py", line 252, in pay
    await self.update_bank(sender_id, sender_bank - amount)
AttributeError: 'Casino' object has no attribute 'update_bank'```
#
@slash_command()
    async def pay(self, ctx, user: discord.User, amount: int):
        if amount <= 0:
            error_embed = discord.Embed(
                title="ERROR #188",
                description="Der Betrag muss größer als 0 sein.",
                color=discord.Color.red()
            )
            await ctx.respond(embed=error_embed)
            return

        sender_id = ctx.author.id
        receiver_id = user.id

        sender_bank = await self.get_bank(sender_id)
        if sender_bank < amount:
            error_embed = discord.Embed(
                title="ERROR #189",
                description="Du hast leider nicht genug Geld, um diesen Betrag zu überweisen.",
                color=discord.Color.red()
            )
            await ctx.respond(embed=error_embed)
            return

        receiver_bank = await self.get_bank(receiver_id)

        await self.update_bank(sender_id, sender_bank - amount)
        await self.update_bank(receiver_id, receiver_bank + amount)

        success_embed = discord.Embed(
            title="Überweisung erfolgreich",
            description=f"Du hast erfolgreich {amount} an {user.display_name} überwiesen.",
            color=discord.Color.green()
        )
        await ctx.respond(embed=success_embed)
pulsar sundial
#

wie mache ich ein thumbnail mit custom link bei einem embed?

     embed.set_thumbnail(url="https://shorturl.at/fOsQ")

So wird nichts im Embed angezeigt

ruby sparrow
#

Gibt es überhaupt ein url? In thumbnail

pulsar sundial
#

ja

cloud cedar
cloud cedar
#

Was ist denn dein Ziel damit

ruby sparrow
pulsar sundial
cloud cedar
#

Ist free

solid ingot
ruby sparrow
# native helm ```PY [ERROR] Error while executing /pay Traceback (most recent call last): ...
@slash_command()
    async def pay(self, ctx, user: discord.User, amount: int):
        if amount <= 0:
            error_embed = discord.Embed(
                title="ERROR #188",
                description="Der Betrag muss größer als 0 sein.",
                color=discord.Color.red()
            )
            await ctx.respond(embed=error_embed)
            return

        sender_id = ctx.author.id
        receiver_id = user.id

        sender_bank = await self.get_bank(sender_id)
        if sender_bank < amount:
            error_embed = discord.Embed(
                title="ERROR #189",
                description="Du hast leider nicht genug Geld, um diesen Betrag zu überweisen.",
                color=discord.Color.red()
            )
            await ctx.respond(embed=error_embed)
            return

        receiver_bank = await self.get_bank(receiver_id)

        await self.update_bank(sender_id, sender_bank - amount)
        await self.update_bank(receiver_id, receiver_bank + amount)

        success_embed = discord.Embed(
            title="Überweisung erfolgreich",
            description=f"Du hast erfolgreich {amount} an {user.display_name} überwiesen.",
            color=discord.Color.green()
        )
        await ctx.respond(embed=success_embed)```
pulsar sundial
solid ingot
#

weiß nicht, kannst es probieren

pulsar sundial
cloud cedar
pulsar sundial
pulsar sundial
cloud cedar
pulsar sundial
#
        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")


<a href="https://ibb.co/pbBxYdq"><img src="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png" alt="Design-ohne-Titel" border="0"></a><br /><a target='_blank' href='https://de.imgbb.com/'>bilder hochladen</a><br />

cloud cedar
pulsar sundial
pulsar sundial
#
embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
#

so?

pulsar sundial
pulsar sundial
# cloud cedar Zeig code
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Die Person die eingestellt wird!", required=True)): # type: ignore
        role = ctx.guild.get_role(1225120486388793505)
        role2 = ctx.guild.get_role(1225120947380686918)
        if role:
            await einstellungsperson.add_roles(role, role2)
            await ctx.respond(f"Einstellung erfolgreich!", ephemeral=True)
        else:
            await ctx.respond("Einstellung nicht möglich! Melde es Jan Takano", ephemeral=True)

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
        title="Einstellung",
        color=discord.Color.brand_red(),
        )
        embed.add_field(name='Wer', value=einstellungsperson.mention)
        embed.add_field(name='Von', value=ctx.user.mention)
        embed.add_field(name='Rang', value="<@&1225120486388793505>")
        embed.add_field(name="Grund",value="Bewerbungsgespräch bestanden!")
        
        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
        # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")
        
        
        await channel.send(embed=embed)

def setup(bot):
            bot.add_cog(einstellung1(bot))
cloud cedar
#

Mach das embed add field rang unter Grund und mach dann inline = True beim rang

cloud cedar
#

Dürfte richtig sein

pulsar sundial
cloud cedar
#

Mach Grund auch inline

pulsar sundial
cloud cedar
#

Da muss jemand klugeres als ich ran

pulsar sundial
cloud cedar
#

Finde das sogar besser

pulsar sundial
#

wie mache ich das xD

#

description?

cloud cedar
#

Ja

#

Und dann \n für jeden Zeilenumbruch

pulsar sundial
#

am anfang der zeile oder am ende

cloud cedar
pulsar sundial
# cloud cedar Ende
 description=f"
        Wer: {einstellungsperson.mention} /n
        Von: {ctx.user.mention} /n
        Rang: <@&1225120486388793505> /n
        Grund: Bewerbungsgespräch bestanden! /n",```i
cloud cedar
#

Jo

#

Ne

#

Falsches slash

#

\ statt /

pulsar sundial
restive herald
#

du hast nur nen einfachen

cloud cedar
#

Das auch

pulsar sundial
cloud cedar
#

Einfach oben und unten "" hinzufügen

restive herald
cloud cedar
#

f"""
[Dein Content]
"""

pulsar sundial
cloud cedar
#

Jap

pulsar sundial
#

Error

Traceback (most recent call last):
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 778, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 991, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1129, in get_code
  File "<frozen importlib._bootstrap_external>", line 1059, in source_to_code
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\SRT Motors\cogs\einstellung.py", line 25
    description=f"
                ^
SyntaxError: unterminated f-string literal (detected at line 25)

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

Traceback (most recent call last):
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\SRT Motors\main.py", line 32, in <module>
    bot.load_extension(f"cogs.{filename[:-3]}")
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.einstellung' raised an error: SyntaxError: unterminated f-string literal (detected at line 25) (einstellung.py, line 25) ```
restive herald
#

also ohne nochmal zeilenumbruch von dir aus

#

also alles in ne lange reihe schreiben

pulsar sundial
restive herald
#

einfach einem, wenn du es in eine zeile schreibst brauchst nur einen

urban glen
#

error code?

pulsar sundial
#

keiner

#

starte einfach den bot neu

#

Wie kann ich einen User vor einem embed pingen

urban glen
#
description = (
    f"Wer: {einstellungsperson.mention}/n"
    f"Von: {ctx.user.mention}/n"
    "Rang: <@&1225120486388793505>/n"
    "Grund: Bewerbungsgespräch bestanden!/n"
)
urban glen
#

den ping

pulsar sundial
#

ok

#

würde es auch so gehen?

urban glen
#

await channel.send("userping", embed=embed)

#

userping musst du dann halt den ping machen nh

pulsar sundial
#

ja

#

es funktioniert danke

pulsar sundial
#

Wie kann man mehrere options in einem slash Command haben?

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
restive herald
#
async def cmd(self, ctx, zahl1: Option(int), zahl2: Option(int), …)
frosty nexus
#

kann mir jemand sagen woran das liegt

ruby sparrow
frosty nexus
ruby sparrow
#

Du sollst darüber gehe mit deiner Maus und dann schalte da ein Fenster auftauchen dann schick davon ein Bild!

urban glen
#

ist so ne macke mit pylance

frosty nexus
cloud cedar
urban glen
#
"python.analysis.diagnosticSeverityOverrides": {
    "reportInvalidTypeForm": "none"
},
#

wenn du das in deine settings.json machst ist es standardmäßig weg

#

so hab ichs gemacht

frosty nexus
urban glen
#

und sieht scheiße aus

frosty nexus
pulsar sundial
#

Wie macht man hex color für embed also das ich die farbe mit hexcode ändern kann

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
ruby sparrow
#

hier @pulsar sundial

pulsar sundial
#

danke

ruby sparrow
#

Bitte

#

Kann mir net ansehen es ist ein txt das kann nicht über Handy ansehen

pulsar sundial
#
File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 778, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\SRT Motors\cogs\teamupdates.py", line 6, in <module>
    class teamupdates1(commands.Cog):
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\SRT Motors\cogs\teamupdates.py", line 10, in teamupdates1
    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 1870, in decorator
    return cls(func, **attrs)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 694, in __init__
    self._validate_parameters()
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 712, in _validate_parameters
    self.options = self._parse_options(params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 787, in _parse_options
    _validate_names(option)
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 164, in _validate_names
    validate_chat_input_name(obj.name)
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\commands\core.py", line 1957, in validate_chat_input_name
    raise error
discord.errors.ValidationError: Command names and options must be lowercase. Received "Uprankname_der_person"
#
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\Users\Jank0\OneDrive\Dokumente\Bots\SRT Motors\main.py", line 32, in <module>
    bot.load_extension(f"cogs.{filename[:-3]}")
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\Jank0\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.teamupdates' raised an error: ValidationError: Command names and options must be lowercase. Received "Uprankname_der_person"
dusty tiger
#

kleinschreiben

pulsar sundial
# dusty tiger kleinschreiben

ist Code:

import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def teamupdates(self, ctx, uprankname_der_person: Option(discord.Member, "Die Person die eine Beförderung/Degradierung bekommt!", required=True), neuer_rang: Option(discord.Role, "Neuer Rang der Mitarbeiters", required=True), alter_rang: Option(discord.Role, "Alter Rang des Mitarbeiters", required=True), grund: Option(discord.Message)): # type: ignore

        await ctx.respond(f"Die Beförderung/Degradierung war erfolgreich!", ephemeral=True)

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
        title="Beförderung/Degradierung",
        description=f"Wer: {uprankname_der_person.mention} \nVon: {ctx.user.mention} \nNeuer Rang: {neuer_rang} \nAlter Rang: {alter_rang}  \nGrund: {grund} \n",
        color=discord.Color.dark_red(),
        )
        
        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
        # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")
        
        await channel.send(f"{uprankname_der_person.mention}", embed=embed)

def setup(bot):
            bot.add_cog(teamupdates1(bot))
pulsar sundial
dusty tiger
#

so funktioniert es:

import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore


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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def teamupdates(self, ctx, uprankname_der_person: Option(discord.Member, "Die Person die eine Beförderung/Degradierung bekommt!", required=True), neuer_rang: Option(discord.Role, "Neuer Rang der Mitarbeiters", required=True), alter_rang: Option(discord.Role, "Alter Rang des Mitarbeiters", required=True), grund: Option(str)):  # type: ignore

        await ctx.respond(
            f"Die Beförderung/Degradierung war erfolgreich!", ephemeral=True
        )

        channel_id = "1229102639430766762"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
            title="Beförderung/Degradierung",
            description=f"Wer: {uprankname_der_person.mention} \nVon: {ctx.user.mention} \nNeuer Rang: {neuer_rang} \nAlter Rang: {alter_rang}  \nGrund: {grund} \n",
            color=discord.Color.dark_red(),
        )

        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
        # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")

        await channel.send(f"{uprankname_der_person.mention}", embed=embed)


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

musst deine channel_id noch ändern

pulsar sundial
#

danke

#

was war der fehler?

dusty tiger
#

kp

pulsar sundial
#

ok

#

wie kann ich es machen das die role gepingt wird

dusty tiger
#

role.mention

#

also variable.mention

tired hearth
devout orchidBOT
#
Ghost Ping

@tired hearth hat @solid ingot gepingt.

ruby sparrow
#

Wieso ping ihr er arme Timo

solid ingot
tired hearth
ruby sparrow
#

Ja ich gebe dir auch immer kekse🤷‍♂️

tired hearth
tired hearth
#

Danach darfst du weiter Dashboard codi codi machen

#

Oder @limpid wolf kannst du mir Helfen

#

Bitte

#

(Bekommst auch 20 Kekse wenn es geht

ruby sparrow
#

Ohje🤷‍♂️

limpid wolf
#

bro was versuchst du überhaubt

#

willst du wings starten?

#

systemctl start wings

tired hearth
#

Und ich bin zu dumm

limpid wolf
#

was geht denn daran nicht

devout orchidBOT
#
Ghost Ping

@fierce dove hat @ruby sparrow gepingt.

fierce dove
#

Hehehe

tired hearth
tired hearth
limpid wolf
#

bro du hast enable

#

und nicht start gemacht

#

das ist was anderes

limpid wolf
#

hast du ja anscheinend nicht

limpid wolf
#

würd mir stinken

#

google den error mal

tired hearth
tired hearth
fierce dove
#

warum wird der command nicht angezeigt

@slash_command()
async def add_money(self, ctx: discord.ApplicationContext, member: discord.Member, amount: Option(int)):
    async with aiosqlite.connect(self.db) as db:
        await db.execute(
            """
            UPDATE bank_accounts SET cash_balance = cash_balance + ? WHERE user_id = ?
            """,
            (amount, member.id)
        )
        await db.commit()
    embed = discord.Embed(
        title="Geld hinzugefügt",
        description=f"**{amount}** wurde zu {member.mention} hinzugefügt!",
        color=discord.Color.green()
    )
    await ctx.respond(embed=embed, ephemeral=True)
tired hearth
fierce dove
fierce dove
tired hearth
#

Guck mal ob du richtig eingerückt hast

fierce dove
#

aber in discord snd nur 4

pulsar sundial
#
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore


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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def teamupdates(self, ctx, uprankname_der_person: Option(discord.Member, "Die Person die eine Beförderung/Degradierung bekommt!", required=True), neuer_rang: Option(discord.Role, "Neuer Rang der Mitarbeiters", required=True), alter_rang: Option(discord.Role, "Alter Rang des Mitarbeiters", required=True), grund: Option(str)):  # type: ignore

        await ctx.respond(
            f"Die Beförderung/Degradierung war erfolgreich!", ephemeral=True
        )

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        channel_id1 = "1233337130382786570"
        channel1 = self.bot.get_channel(int(channel_id1))
        embed = discord.Embed(
            title="Beförderung/Degradierung",
            description=f"Wer: {uprankname_der_person.mention} \nVon: {ctx.user.mention} \nNeuer Rang: {neuer_rang.mention} \nAlter Rang: {alter_rang.mention}  \nGrund: {grund} \n",
            color=0xFF0000,
        )

        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
        # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")

        await channel.send(f"{uprankname_der_person.mention}", embed=embed)
        await channel1.send(f"<@&1225122835773653032>", embed=embed)


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

Kann mir einer sagen warum das embed nur in einen Channel geschickt wird und nicht in channel1

tired hearth
#

Und dann auf deinen Bot

#

Und suche nach dem command

#

Und dann wählst du bei Channel alle aus und klickst auf Speichern

#

@fierce dove

fierce dove
tired hearth
#

Is das erste mal das ich hier helfen konnte

fierce dove
tired hearth
fierce dove
#

bitte

tired hearth
ruby sparrow
pulsar sundial
tired hearth
fresh flint
#

Welche python 3.10 Version sol ich installieren??

#

Weil, wenn ich eine installiere kommt dasdiscord Module problem und bei den wo ich es geteste habe intents problem

fierce dove
#

Python 3.12

#

Ist die neuste Version

frosty nexus
#
    async def on_member_join(self, member):
        embed = discord.embed(
            titel= "Willkommen",
            discipton= f"""Hallo und Herzlich Willkomen auf unserem Server {user.mention}.
            Wir hoffen das du hier alles über unsre Bot's findest was du brauchst, solltest du dennoch fragen haben melde dich gerne unter https://discord.com/channels/1141465360198021190/1141465524098842624""",
            color=discord.Color.yellow()

        )


        channel = await self.bot.fetch_channel(1245816448656609293)
        await channel.send(embed=embed)

Weiß jemand warum die join messae nicht gesendet wird (Es gibt kein error)

tawdry leaf
frosty nexus
frosty nexus
tawdry leaf
frosty nexus
#

habs gefixxt

tawdry leaf
frosty nexus
# tawdry leaf ja random

Du weist nicht zufällig wie ich von einem user das Profilbild im embed aneignen lass kann oder

tawdry leaf
#

embed.set_thumbnail(url=member.display_avtar)

frosty nexus
frosty nexus
frosty nexus
# tawdry leaf embed.set_thumbnail(url=member.display_avtar)
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "/workspaces/sunnybot/cogs/greet.py", line 27, in on_member_join
    embed.set_thumbnail(url=member.display_avtar)
AttributeError: 'Member' object has no attribute 'display_avtar```
#

hmmmmm

frosty nexus
tawdry leaf
#

hast du des auch als discord.Member eig beim event

frosty nexus
# tawdry leaf hast du des auch als discord.Member eig beim event
    async def on_member_join(self, member):
        embed = discord.Embed(
            title="Willkommen",
            description=f"""Hallo und Herzlich Willkomen auf unserem Server {member.mention}.
            Wir hoffen das du hier alles über unsre Bot's findest was du brauchst, solltest du dennoch fragen haben melde dich gerne unter https://discord.com/channels/1141465360198021190/1141465524098842624""",
            color=discord.Color.orange(),
                    )


        channel = await self.bot.fetch_channel(1245816448656609293)  # hier channel id einfügen
        await channel.send(embed=embed)

        embed.set_thumbnail(url=member.display_avtar)```
tawdry leaf
#

oje

#

du musst schon das embed vor dem senden haben 😄

#

mach des embed mal über channel =

frosty nexus
#

Ufff, wenn dummheit wehn tun könnte HAHA

frosty nexus
tawdry leaf
#
 @commands.Cog.listener()
    async def on_member_join(self, member):
        embed = discord.Embed(
            title="Willkommen",
            description=f"""Hallo und Herzlich Willkomen auf unserem Server {member.mention}.
            Wir hoffen das du hier alles über unsre Bot's findest was du brauchst, solltest du dennoch fragen haben melde dich gerne unter https://discord.com/channels/1141465360198021190/1141465524098842624""",
            color=discord.Color.orange(),
                    )

        embed.set_thumbnail(url=member.display_avtar)
        channel = await self.bot.fetch_channel(1245816448656609293)  # hier channel id einfügen
        await channel.send(embed=embed)

native helm
#

hey weiß einer bei welchem Video @solid ingot Erklärt wie man bei den Options Eine PNG datei hinzufügt ?

||Danke im Vorraus||

native helm
frosty nexus
tawdry leaf
frosty nexus
#

Danke für deine hilfe und einen schönen abend

tawdry leaf
#

schönen Abend

native helm
#

evtl.

tawdry leaf
#

habe ka was du meinst xd

native helm
#

wo du /preview machst und dann du da ein Logo hinzufügen kannst

tawdry leaf
#

attachment:discord.Attachment einf hinzufügen

native helm
#

Okay danke

#

@tawdry leaf

tawdry leaf
#

wieso attachment.url xd

native helm
tawdry leaf
#

ka ist viel unterstrichen 🙂

native helm
#
import discord
from discord.ext import commands
from discord.commands import slash_command, Option


class Preview(commands.Cog):



    @slash_command()
    @discord.default_permissions(administrator=True)
    async def preview(self, ctx, attachment: discord.Attachment):
        embed = discord.Embed(
            title="Preview | Master Designs",
            description=f"Diese Preview dient nur zur Visualisierung. Bei Zweckentfremdungen, Aneignungen oder Verletzung des Urheberrechts, werden die betroffenen Personen permanent von unserer Community ausgeschlossen und in besonderen Fällen ist mit einer strafrechtlichen Anzeige zu rechnen.",
            color=discord.Color.blue()
        )
        embed.set_footer(text="© Copyright 2024 | Master Designs",icon_url="https://cdn.discordapp.com/attachments/1245709043444482118/1245813150175985734/Masterlogo.png")
        embed.set_image(url=attachment)

        await ctx.send(embed=embed)
        await ctx.respond("Dein Preview wurde jetzt Gesendet", ephemeral=True)



def setup(bot: discord.Bot):
    bot.add_cog(Preview(bot))
``` ist das so richtig @tawdry leaf Die commands werden halt nicht geladen
#

@ruby sparrow

native helm
tawdry leaf
#

sagte doch schon es ist richtig...

native helm
#

Aber warum werden die cmds nicht geladen ?

tawdry leaf
#

ist bei mir auch manchmal so das ein server den cmd nd anzeigt

frosty nexus
native helm
frosty nexus
ruby sparrow
native helm
#

Ne Pycharm

native helm
ruby sparrow
#

Wieso ?

native helm
#

will nicht alleine sein : (

silk gulch
native helm
silk gulch
native helm
#

kann mir einer bitte helfen ?

#

ich habe da so ein Problem

#

ich möchte in ein Ticket ein Select Menu machen wo man sachen auswählen kann und dann in einer liste Gemacht wird. Könnte mir einer dabei helfen ?

native helm
#

Aber der erklärt das nicht wie ich das meine

ruby sparrow
#

Was meinst du mit liste?

native helm
#

await ctx.send(embed=embed, view=ANView(), view=TicketView())

#

Kann mir einer dabei helfen ?

fierce dove
#

Du kannst nur 1 View übergeben

native helm
#

ich muss aber zwei haben

fierce dove
#

Du kannst aber nur eine angeben

native helm
#

: (

ruby sparrow
fierce dove
ruby sparrow
fierce dove
#

Ja

ruby sparrow
fierce dove
#

Ist nicht schlimm

native helm
#
[ERROR] Error while executing /ticket 
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 131, in wrapped
    ret = await coro(arg)
  File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "/home/container/commands/Kauf-Ticket.py", line 19, in ticket
    await ctx.send(embed=embed, view=TicketView())
  File "/home/container/.local/lib/python3.10/site-packages/discord/abc.py", line 1651, in send
    data = await state.http.send_message(
  File "/home/container/.local/lib/python3.10/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 components.0.components.0.options: Must be 25 or more in length.

ruby sparrow
#

Code ?

#

Nicht dem ganzen code

fierce dove
#

Du hast mehr als 25 Options

native helm
fierce dove
#

In dein select Menü

native helm
#
class TicketView(discord.ui.View):
    options = [
        discord.SelectOption(label="Static Logo", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Banner", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static User Banner", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Invite Banner", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Youtube Banner", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static ID-Card", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Tebex-Design", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static RoleIcon", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Helper", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Desktop-Hintergrund", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static Restartzeiten", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Static 40 Verschied. Farben", emoji="![photoshop](https://cdn.discordapp.com/emojis/1246010094240399411.webp?size=128 "photoshop")"),
        discord.SelectOption(label="Animiertes Logo", emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes Banner", emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes User Banner", emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes Name / Farbe Variation", emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes Embed Banner",emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes FiveM Banner",emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes ESX Banner",emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes Connecting Banner",emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")"),
        discord.SelectOption(label="Animiertes Loadingscreen",emoji="![aftereffects](https://cdn.discordapp.com/emojis/1246010111541903411.webp?size=128 "aftereffects")")
        
    ]
    
    @discord.ui.select(
        min_values=1,
        max_values=25,
        placeholder="Triffe eine Auswahl",
        options=options
    )
    async def Ticket_callback(self, select, interaction):
        s = ""
        for auswahl in select.values:
            s +=f"- {auswahl}\n"
            
        await interaction.response.send_message(f"Du hast folgendes ausgewählt:\n{s}")    
fierce dove
native helm
#

Ich habe genau 21

urban glen
#

Aber keine 25 Optionen hast

native helm
#

Ah

urban glen
#

max_values = len(options)

native helm
#

ik

#

Kann man

Await interaction.send_embed Machen ??

fierce dove
#

Nein

ruby sparrow
#

Ne ?

fierce dove
#

await interaction.response.send_modal

#

Um ein modal zu senden

native helm
#

Ich will aber kein Modal

fierce dove
#

Kann Mann nur

#

Willst du ein embed senden

native helm
#

ja

fierce dove
#

🙂

#

Das würde hilft dir

native helm
#

ich will daass ich Mit der Ínteraction Ein embed sende

fierce dove
#

Video

#

Ja geht genau so

#

Wie im Video

ruby sparrow
#

Du muss interaction.response.send_message(embed=embed)

#

@native helm

native helm
#

Dadrüber oder drunter ein embed machen ?

ruby sparrow
#

Ja

#

Natürlich

fierce dove
native helm
#

ok

turbid oasis
#

Wieso funktioniert publish nicht?

solid ingot
#

wo definierst du publish?

#

wenn es nicht existiert, kannst du es auch nicht verwenden

native helm
#

``` embed=discord.embed(
title="Kauf Liste | Master Designs",
descripton"Hier siehst du alles was du ausgewählt hast\n {s}",
)

    await interaction.response.send_message(embed=embed)    ```
ruby sparrow
#

Was geht nicht?

native helm
#

das embed

turbid oasis
#

vorher hat es funktioniert, jetzt geht garnix mehr

ruby sparrow
turbid oasis
#

gibt kein error

native helm
# ruby sparrow Was geht nicht?

Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 778, 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/commands/Kauf-Ticket.py", line 134
    )
    ^
SyntaxError: positional argument follows keyword argument
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 22, in <module>
    bot.load_cogs(
  File "/home/container/.local/lib/python3.10/site-packages/ezcord/bot.py", line 327, in load_cogs
    self.load_extension(cog)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'commands.Kauf-Ticket' raised an error: SyntaxError: positional argument follows keyword argument (Kauf-Ticket.py, line 134)
ruby sparrow
native helm
#
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 778, 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/commands/Kauf-Ticket.py", line 134
    )
    ^
SyntaxError: positional argument follows keyword argument
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 22, in <module>
    bot.load_cogs(
  File "/home/container/.local/lib/python3.10/site-packages/ezcord/bot.py", line 327, in load_cogs
    self.load_extension(cog)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'commands.Kauf-Ticket' raised an error: SyntaxError: positional argument follows keyword argument (Kauf-Ticket.py, line 134)
ruby sparrow
native helm
ruby sparrow
#

Bro kann keine txt sehen

native helm
#

@ruby sparrow

fierce dove
#

Code

#

@native helm

native helm
#
    @discord.ui.select(
        min_values=1,
        max_values=21,
        placeholder="Triffe eine Auswahl",
        options=options
    )
    async def Ticket_callback(self, select, interaction):
        s = ""
        for auswahl in select.values:
            s +=f"- {auswahl}\n"
            
            embed=discord.Embed(
                title="Kauf Liste | Master Designs",
                descripton="Hier siehst du alles was du ausgewählt hast\n {s}",
             )
            
        await interaction.response.send_message(embed=embed)    
``` @fierce dove
ruby sparrow
# native helm ```PY @discord.ui.select( min_values=1, max_values=21, ...
@discord.ui.select(
    min_values=1,
    max_values=21,
    placeholder="Triff eine Auswahl",
    options=options
)
async def Ticket_callback(self, select, interaction):
    s = ""
    for auswahl in select.values:
        s += f"- {auswahl}\n"
        
    embed = discord.Embed(
        title="Kaufliste | Master Designs",
        description=f"Hier siehst du alles, was du ausgewählt hast:\n{s}",
    )
    
    await interaction.response.send_message(embed=embed)
native helm
#

danke

#
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 778, 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/commands/Buy.py", line 9
    @slash_command()
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 22, in <module>
    bot.load_cogs(
  File "/home/container/.local/lib/python3.10/site-packages/ezcord/bot.py", line 327, in load_cogs
    self.load_extension(cog)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'commands.Buy' raised an error: TabError: inconsistent use of tabs and spaces in indentation (Buy.py, line 9)

#

@ruby sparrow

ruby sparrow
#

Bitte

native helm
#

geht schon wieder

twilit anvil
#

Hey, wie kann ich den Fehler am besten beheben?

#

Ist vom Python-Package Video von Timo.

native helm
#

Digest: sha256:627cb7e050cc3d5e68c15dd92d358938cdd5d69bf3bb7e6bd97fbe2b28cbebf2 
[Pterodactyl Daemon]: Finished pulling Docker container image
Python 3.10.14
:/home/container$ if [[ -d .git ]] && [[ "${AUTO_UPDATE}" == "1" ]]; then git pull; fi; if [[ ! -z "${PY_PACKAGES}" ]]; then pip install -U --prefix .local ${PY_PACKAGES}; fi; if [[ -f /home/container/${REQUIREMENTS_FILE} ]]; then pip install -U --prefix .local -r ${REQUIREMENTS_FILE}; fi; /usr/local/bin/python /home/container/${PY_FILE}
Requirement already satisfied: py-cord in ./.local/lib/python3.10/site-packages (from -r req.txt (line 1)) (2.5.0)
Requirement already satisfied: ezcord in ./.local/lib/python3.10/site-packages (from -r req.txt (line 2)) (0.6.4)
ERROR: Could not find a version that satisfies the requirement yaml (from versions: none)
ERROR: No matching distribution found for yaml

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
[MASTER] Loaded 9 cogs
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 778, 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/container/commands/waitlist.py", line 3, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/main.py", line 22, in <module>
    bot.load_cogs(
  File "/home/container/.local/lib/python3.10/site-packages/ezcord/bot.py", line 327, in load_cogs
    self.load_extension(cog)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 912, in load_extension
    self._load_from_module_spec(spec, name)
  File "/home/container/.local/lib/python3.10/site-packages/discord/cog.py", line 781, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'commands.waitlist' raised an error: ModuleNotFoundError: No module named 'yaml'
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 1
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
restive herald
native helm
#
PY-CORD
EZCORD
YAML

ruby sparrow
native helm
#

nein ich habe das aubgeschriben

ruby sparrow
#

Und yaml anders gedownloaded

ruby sparrow
frosty nexus
#
 for filename in os.listdir("backend"):
    if filename.endswith(".py"):
     bot.load_extension(f"backend.{filename[:-3]}")

Weiss jemand ob ich da bestimmte datein ignoriren kann

ruby sparrow
#

Das geht mit ezcord einfach😍

twilit anvil
#

oder du machst dir eine liste und checkst, ob die datei in der liste ist.

frosty nexus
pulsar sundial
#

Error:

[ERROR] Error while executing /einstellung 
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 131, in wrapped
    ret = await coro(arg)
          ^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.11/site-packages/discord/commands/core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "/home/container/cogs/einstellung.py", line 19, in einstellung
    await ctx.respond(f"Einstellung erfolgreich!", ephemeral=True)
  File "/home/container/.local/lib/python3.11/site-packages/discord/interactions.py", line 585, in respond
    return await self.response.send_message(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.11/site-packages/discord/interactions.py", line 918, in send_message
    await self._locked_response(
  File "/home/container/.local/lib/python3.11/site-packages/discord/interactions.py", line 1243, in _locked_response
    await coro
  File "/home/container/.local/lib/python3.11/site-packages/discord/webhook/async_.py", line 222, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 40060): Interaction has already been acknowledged.
#

Wieso kommt dieser error

ruby sparrow
#

Du antworten 2 Darauf

pulsar sundial
# ruby sparrow Du antworten 2 Darauf
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Die Person die eingestellt wird!", required=True)): # type: ignore
        role = ctx.guild.get_role(1225120486388793505)
        role2 = ctx.guild.get_role(1225120947380686918)
        role3 = ctx.guild.get_role(1225120307535286374)
        role4 = ctx.guild.get_role(1225120204711919677)
        if role:
            await einstellungsperson.add_roles(role, role2, role3, role4)
            await ctx.respond(f"Einstellung erfolgreich!", ephemeral=True)
        else:
            await ctx.respond("Einstellung nicht möglich! Melde es Jan Takano", ephemeral=True)

        channel_id = "1225475570402332733"
        channel = self.bot.get_channel(int(channel_id))
        embed = discord.Embed(
        title="Einstellung",
        description=f"Wer: {einstellungsperson.mention} \nVon: {ctx.user.mention} \nRang: <@&1225120486388793505> \nGrund: Bewerbungsgespräch bestanden! \n",
        color=0xFF0000,
        )
        
        embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
        # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
        embed.set_author(name="SRT Motors")
        
        await channel.send(f"{einstellungsperson.mention}", embed=embed)

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

Wo antworte ich da 2 mal darauf

ruby sparrow
#
import discord
from discord.ext import commands
from discord.commands import slash_command, Option
from colorama import Fore

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

    @slash_command(description="Hiermit stellst du neue Mitarbeiter ein!")
    @commands.has_permissions(manage_roles=True)
    async def einstellung(self, ctx, einstellungsperson: Option(discord.Member, "Die Person die eingestellt wird!", required=True)): # type: ignore
        # Retrieve roles
        role = ctx.guild.get_role(1225120486388793505)
        role2 = ctx.guild.get_role(1225120947380686918)
        role3 = ctx.guild.get_role(1225120307535286374)
        role4 = ctx.guild.get_role(1225120204711919677)

        # Check if all roles are present
        if role and role2 and role3 and role4:
            await einstellungsperson.add_roles(role, role2, role3, role4)
            await ctx.respond("Einstellung erfolgreich!", ephemeral=True)
        else:
            await ctx.respond("Einstellung nicht möglich! Melde es Jan Takano", ephemeral=True)
            return  # Exit the function to avoid further processing

        # Channel ID should be an integer
        channel_id = 1225475570402332733
        channel = self.bot.get_channel(channel_id)
        
        if channel:  # Check if the channel exists
            embed = discord.Embed(
                title="Einstellung",
                description=(
                    f"Wer: {einstellungsperson.mention}\n"
                    f"Von: {ctx.user.mention}\n"
                    f"Rang: <@&1225120486388793505>\n"
                    f"Grund: Bewerbungsgespräch bestanden!"
                ),
                color=0xFF0000,
            )

            embed.set_thumbnail(url="https://i.ibb.co/ZGpVqx9/Design-ohne-Titel.png")
            # embed.set_footer(text=f"Einstellung von {ctx.author.display_name}")
            embed.set_author(name="SRT Motors")

            await channel.send(f"{einstellungsperson.mention}", embed=embed)
        else:
            print(f"{Fore.RED}Channel with ID {channel_id} not found!")

def setup(bot):
    bot.add_cog(Einstellung1(bot))
``` Vllt so @pulsar sundial
jaunty jasper
frosty nexus
hard pivot
#
@tasks.loop(minutes=2)  # Intervall von 24 Stunden (einmal täglich)
async def edit_leaderbourd(bot):
    print("ready")
    leaderboard_settings = DatabaseCheck.check_leaderbourd_settings(guild_id = bot.guild.id)

    message_ids = {
        "1_days_old": leaderboard_settings[2],
        "1_week_old": leaderboard_settings[3],
        "1_month_old": leaderboard_settings[4]
    }

    if leaderboard_settings[1] == 1 and leaderboard_settings[5] != None:

        try:
            
            current_date = datetime.utcnow()

            for message_name, message_id in message_ids.items():

                message = await bot.guild.fetch_message(message_id)

                if leaderboard_settings[2]:
                    print(1)
                    if current_date - message.created_at > timedelta(minutes=5) and message_name == "1_days_old":
                        print(2)
                        emb = discord.Embed(description=f"""**Daily Messages Leaderboard**
                            {DatabaseCheck.check_leaderbourd(guild_id = bot.guild.id, interval = 0)}""", color=bot_colour)

                        await bot.response.edit_message(embed = emb)

Ich bekomme immer wennn ich den bot starte diesen error

TypeError: edit_leaderbourd() missing 1 required positional argument: 'bot'

rancid raven
#

Wäre schön wenn man das nicht direkt doppelt fragt, der eine gibt sich mühe zu antworten. Wenn es dann schon auf anderen Server gelöst ist, ist das bissl doof xD Bissl geduld muss man schon haben bis jemand antwortet

frosty nexus
#
/home/codespace/.python/current/bin/python3 /workspaces/sunnybot/main.py
Ignoring exception in command play:
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/commands/core.py", line 131, in wrapped
    ret = await coro(arg)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/commands/core.py", line 1009, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "/workspaces/sunnybot/cogs/base.py", line 14, in play
    ctx.voice_cleint.play(
AttributeError: 'ApplicationContext' object has no attribute 'voice_cleint'

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

Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/bot.py", line 1130, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/commands/core.py", line 376, in invoke
    await injected(ctx)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/discord/commands/core.py", line 139, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: AttributeError: 'ApplicationContext' object has no attribute 'voice_cleint'```
#

Wenn ich /play mache sollte der bot in meinem voice channel kommen und das radio abspielen genau das tut er aber nicht und haut mir dann den oben stehenden error rein.

Kann mir da jemand genauer weiterhelfen ???

frosty nexus
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
fallen nymph
#

Can anyone help me, I would like a command that can open a website in an embedded message?

restive herald
#

Or wdym

fallen nymph
frosty nexus
restive herald
tawdry leaf
fallen nymph
restive herald
#

and if you are german, just talk german here lol

frosty nexus
fallen nymph
restive herald
fallen nymph
tawdry leaf
#

ist eine bestimmte xD

restive herald
#

und dann den link mit [name](link) angeben, und die infos in nen embed feld oder die description

tawdry leaf
#

oder die website bietet webhooks an

restive herald
fallen nymph
#

@frosty nexus zur Übersicht, wenn du Code zeigen möchtest, dann nutze direkt py Code

Das sieht ordentlicher aus, du kannst statt py auch andere Codeabkürzungen nehmen.

Sieht dann z.b. so aus.

fallen nymph
restive herald
fallen nymph
#

Aber ich wollte auch keine Diskussion anfeuern, sondern nur den Hinweis geben

restive herald
#

auf dem handy wird nur keine farbe da angezeigt deshalb hab ich mich gewundert

fallen nymph
frosty nexus
#

Du kannst mir nicht zufällig helfen oder?

fallen nymph
restive herald
#

Bei Timos Cookie-bot ist ja nur die Email angegeben.
Ich hab jetzt eine Website für eine Geschäftsidee erstellt, müsste man da noch Telefonnummer angeben oder reicht da auch eine email? Weil im Internet finde ich jetzt nur, dass man beides haben muss, timo hat aber nur email

cloud cedar
cloud cedar
fallen nymph
cloud cedar
dusty tiger
restive herald
#

Deswegen hab ich ihn erstmal nd gepingt

dusty tiger
#

jetzt schon :)

restive herald
solid ingot
#

bin kein anwalt, informier dich lieber bei einer sichereren quelle :D

restive herald
#

weil man braucht ja 2 ansprechquellen sag ich mal

#

also email und dann noch was

frosty nexus
dusty tiger
frosty nexus
# dusty tiger code
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="Starte das Radio")
    async def play(self, ctx):
        ctx.voice_client.play(
            discord.FFmpegPCMAudio("https://streams.ilovemusic.de/iloveradio1.mp3")
        )
        await ctx.respond("Das Radio wurde gestartet")


def setup(bot: discord.Bot):
     bot.add_cog(Radio(bot))```
dusty tiger
#

hast du FFmpeg?

frosty nexus
fierce dove
#

:,

frosty nexus
tired hearth
#

weiß wer warum plötzlich wings bei mir nicht mehr geht seitdem ich den Nameserver zu den Cloudflare Nameservern geändert habe bei meiner Domain?

cloud cedar
#

Hi, hilfe:
Ich möchte über eine Interaction "voice_client.play()" aufrufen. Wie mache ich das?

#

@solid ingot sorry ich konnte nicht widerstehen dich zu pingen :(

ruby sparrow
#

kann man es machen in eine cog 2 SlashCommandGroup

cloud cedar
#

✂️

tawdry leaf
#

mein ich auch

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
cloud cedar
#

ja, das wird nicht über eine interaction gezeigt du noob

tawdry leaf
cloud cedar
tawdry leaf
#

schau das video

cloud cedar
tawdry leaf
cloud cedar
tawdry leaf
cloud cedar
tawdry leaf
#

ja logisch

cloud cedar
cloud cedar
#

ich check's nicht @tawdry leaf

tawdry leaf
cloud cedar
tawdry leaf
cloud cedar
tawdry leaf
#

na hör mal

tawdry leaf
cloud cedar
tawdry leaf
cloud cedar
#
    async def select_callback(self, select, interaction):
        if interaction.user.voice is not None:
            if(select.values[0] == "1"):
                    await interaction.user.voice.channel.connect()
                    interaction.voice_client.play(
                        discord.FFmpegPCMAudio("https://play.ilovemusic.de/ilm_iloveradio/")
                    )
                    playembed = discord.Embed(description="## Now playing:\n`I LOVE RADIO`", color=discord.Color.blue())
                    playembed.set_thumbnail(url = f"{self.bot.user.display_avatar.url}")
                    await interaction.response.send_message(embed = playembed, ephemeral = True, view = musicSelect())
#

jetzt auch auf discord :O

tawdry leaf
#

😮

tawdry leaf
# cloud cedar ```py async def select_callback(self, select, interaction): if inter...
    @discord.ui.select(custom_id="musicSelect", placeholder="Select a radio station",options=[discord.SelectOption(label="I LOVE RADIO",value="1")])
    async def select_callback(self, select, interaction:discord.Interaction):
        if interaction.user.voice is not None:
            if(select.values[0] == "1"):
                    await interaction.user.voice.channel.connect()
                    discord.VoiceClient.play(
                        discord.FFmpegPCMAudio("https://play.ilovemusic.de/ilm_iloveradio/")
                    )
                    playembed = discord.Embed(description="## Now playing:\n`I LOVE RADIO`", color=discord.Color.blue())
                    playembed.set_thumbnail(url = f"{self.bot.user.display_avatar.url}")
                    await interaction.response.send_message(embed = playembed)```
cloud cedar
# tawdry leaf ```py @discord.ui.select(custom_id="musicSelect", placeholder="Select a radi...
    async def select_callback(self, select, interaction):
        if interaction.user.voice is not None:
            if(select.values[0] == "1"):
                    await interaction.user.voice.channel.connect()
                    discord.VoiceClient.play(
                        self, source="https://play.ilovemusic.de/ilm_iloveradio/"
                    )
                    playembed = discord.Embed(description="## Now playing:\n`I LOVE RADIO`", color=discord.Color.blue())
                    playembed.set_thumbnail(url = f"{self.bot.user.display_avatar.url}")
                    await interaction.response.send_message(embed = playembed, ephemeral = True, view = musicSelect())
if not self.is_connected():

AttributeError: 'musicSelect' object has no attribute 'is_connected'