Coder Social home page Coder Social logo

navi's Introduction

NAVI

Features

  • Join/leave messages.
  • Moderation commands (ban, kick, purge).
  • Color roles.
  • Simple music playback in a voice channel.

Setting up

  1. Make a new discord application with a bot user account.
  2. In Privileged Gateway Intents turn on:
    • Message Content Intent
    • Server Members Intent
  3. Go to OAuth2, make an URL invite for scope bot. The permissions should be: &permissions=46486663507
  4. Clone and navigate into the repository.
  5. Make a new file named .env with contents:
    TOKEN=<your discord token>
    DEFAULT_CHANNEL=<channel id to output welcome messages>
    SPAM_CHANNEL=<channel id for fun commands>
    VOICE_CHANNEL=<voice channel id for music commands>
    
  6. Install:
    • Using docker:
      • docker build -t navi .
      • docker run -d --name=navi navi
    • Locally (needs dependacies):
      • mvn -f pom.xml clean compile assembly:single
      • java -jar navi-1.0-jar-with-dependencies.jar

Additional Configuration

Setting up the muted role

Make a new role named +muted with disabled permissions to send messages.

Adding color roles

Make new roles with the name scheme -color for example -green with a green color. NAVI will autoindex those roles and automatically list them when issuing the help command.

navi's People

Contributors

ad044 avatar lelenium avatar subreemfirewall avatar supposd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

navi's Issues

some bugs/feature requests

bugs

  • navi, help is truncated and doesn't show all the commands

feature requests

  • relative seek
  • auto disconnect after 5m if nothing is queued
  • youtube playlist support with list/index
  • extract timestamps description/comment so "what song is playing rn" is more ez
  • ???
  • profit

navi, help is truncated and doesn't show all the commands

test code

public class TestHelpCommand {
    public static void main(String[] args) {
        HelpCommand h = new HelpCommand();
        MessageEmbed m = h.constructHelpMessage();

        System.out.println("max length bot"+ m.EMBED_MAX_LENGTH_BOT);
        System.out.println("max length client"+ m.EMBED_MAX_LENGTH_CLIENT);


        m.getFields().forEach(f -> System.out.println(f.getName() + "," + f.getValue()));
        System.out.println("Total length " + m.getLength());

        System.out.println("===");
        //String s = m.toData();
        //System.out.println(s.substring(0,999) + "***" + s.substring((1000)));
    }
}

Aside from the dumb code's formatting, the embed should end with something like this

,PLAYER COMMANDS:
play,Adds a track to the queue.
showq,Shows the current playlist.
clearq,Clears the current queue.
continue,Unpauses the player.
mvhere,Moves the player to the caller's current vc.
currenttrack,Shows the current track.
rmrange,Removes tracks in a specified range.
skip,Skips a track.
rm,Removes a track from the playlist.
seek,Changes the current track to a specified time.
pause,Pauses the player.
โ€Ž,โ€Ž
Source code:,https://github.com/ad044/navi
Total length 1130

But the output from the bot is actually

image

Questions:

Implement or depract Soundcloud Search

If user issues a navi, play sc <query> the command will be ignored, despite still being a valid search result,
Correct solution is to still forward that query to youtube or actually implement Soundcloud.
If the first one is chosen, also revise completely removing the yt/sc distinction, since navi, play yt <query> should result in a youtube search yt <query> and not <query>

image

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.