Giter VIP home page Giter VIP logo

Comments (5)

kaanalp28 avatar kaanalp28 commented on July 18, 2024 1

Thank you! I will get to work and make a bot with my friends to enjoy (and troll) with them! Thank you for your super-fast responses, I didn't expect it to be this fast tbh, but it's truly awesome. I'll make sure I send my ideas to you too, see you later! :)

from dingolingo.

solaluset avatar solaluset commented on July 18, 2024

Library version mismatch may've caused this. Try downgrading py-cord to version 1.7.3.
Alternatively, you can try my fork which is more up-to-date.

from dingolingo.

kaanalp28 avatar kaanalp28 commented on July 18, 2024

Thank you so much! I finally got it to work. I'm new to this whole coding thing, can you tell me if there's a way to add new commands (mostly misc. ones) and get them to work with this music bot as one? Or if I need to make a new cog, can you tell me how to make one? Thank you!

from dingolingo.

DerP4si avatar DerP4si commented on July 18, 2024

You can add new commands in BotFolder.musicbot.commands.music (or general) by using
@bridge.bridge_command(
name="commandName",
description="description but not a must have",
help="not a must have",
aliases=["this_works_too"],
)
async def _comandfunction(self, ctx: Context,):
your code

or you make a new file BotFolder.musicbot.commands.test

import discord

from config import config
from discord.ext import commands, bridge
from musicbot import linkutils, utils
from musicbot.bot import MusicBot, Context

class Test(commands.Cog):

def __init__(self, bot: MusicBot):
self.bot = bot

# logic is split to uconnect() for wide usage

@bridge.bridge_command(
name="commandName",
description="description but not a must have",
help="not a must have",
aliases=["this_works_too"],
)
async def _comandfunction(self, ctx: Context,):
your code

def setup(bot: MusicBot):
bot.add_cog(Test(bot))

and add

"musicbot.commands.test",

to initial_extensions in run.py

try to do the second approach so you can easily go back to the default untouched bot by just commenting out the "musicbot.commands.test", line ^^

*edit: this applies only to the DandelionMusic fork

from dingolingo.

solaluset avatar solaluset commented on July 18, 2024

Thank you so much! I finally got it to work. I'm new to this whole coding thing, can you tell me if there's a way to add new commands (mostly misc. ones)...

You're welcome. To make new commands you can inspect existing ones and create something similar. There are plenty of guides/examples online, like the one above.
If you think that these commands are useful to have in the bot, you can share your ideas by submitting an issue to my fork.

from dingolingo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.