Code Monkey home page Code Monkey logo

sanya-nya's Introduction


This is a repo with source code for Sanya-nya Discord bot. It plays music from YouTube and works both on slash and prefixed commands. You can invite the official version of Sanya-nya here. Or host your own instance of Sanya-nya with the button below:

Deploy on Railway

Overview

Screenshots

Commands

List of all bot's commands and their description.

  • ping - Current Sanya's ping
  • help - List of all bot commands and it's prefix
  • play - Play/Add song to the queue
  • stop - Stop player, disconnect from VC
  • loop - Loop current track
  • skip - Skip current track
  • queue - View current track queue
  • pause - Pause player playback
  • status - Info about current Bot status
  • volume - Change player volume
  • resume - Resume playback
  • replay - Replay current track
  • previous - Play previous track
  • language - Change Bot's language for yourself

Hosting bot by yourself

This bot is completely ready to be hosted on Railway:

  1. Click Deploy on Railway button above.
  2. Follow instructions to deploy the bot to Railway.
  3. Remember to set environmental variables like BOT_TOKEN, LAVALINK_URI to yours.
  4. If you don't have a Discord bot you can create it on Discord Developer Portal.
  5. Remember to add your bot to your server. Invite url can be generated on application settings page.
  6. Now, when your bot is deployed and all variables are set, you need to set custom build command (here is why):
  • Go to your railway project Settings.
  • Find field named Build command.
  • Paste the following text there:
pip uninstall -y discord.py && pip uninstall -y py-cord && pip install py-cord
  1. That's all! Your bot should now be up and running.

Important: If you are going to host this bot by yourself, I highly recommend to use your lavalink server hosted by you or on a hosting. I'm too lazy to look for ways of doing it but you should definitely come up with something.

Additional info

  • Remember that bots that play music from YouTube violate discord rules and will never be verified by Discord, and may even be banned.

  • This bot is just a fun project, it contains the code from one of my other bot's old modules, which was abandoned due to an update to the Discord rules.

  • If you found a bug you can create an issue and if I have time I will look through it. Pull requests are also welcome.

Links

sanya-nya's People

Contributors

dependabot[bot] avatar jokelbaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sanya-nya's Issues

Bot is failing to start

Can't start the bot after deployed to Railway.

Here is the error:

Traceback (most recent call last):
  File "bot.py", line 9, in <module>
    from Utils.Bot import Logger, Functions
  File "Utils\Bot\Functions.py", line 13, in <module>
    def slash_command_log(ctx: discord.ApplicationContext, command: str) -> None:
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'discord' has no attribute 'ApplicationContext'

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.