Code Monkey home page Code Monkey logo

discord-neofetch's Introduction

discord-neofetch

View your Discord information, neofetch style!

Add to your server

Add Neofetch Bot

Please note that this bot might be unstable at times. If you do find any problems, feel free to open a new issue

Demo

Here's a demo of the bot

Demo

FAQs

  • Hmm. What's this?

This is the Neofetch bot, a really cool bot that allows you to view your Discord information, right in Discord, neofetch style. Complete with fully customizable prompts and ascii distros, this is every developer's dream come true.

  • Why would I even need this?

Because everybody absolutely loves Neofetch, a command-line tool that displays your system information. This bot is a hobby project of mine, and I, inspired by the orginal CLI tool, wanted to make a visual Discord version of it.

Also you get to show off your favorite distro (looking at you arch btw users).

  • How does it even work?

Alright, so Discord recently added ANSI escape codes to codeblock messages, which means that you can 'colorize' your output an style it whichever way you want. This bot takes advantage of this feature, and works around with the color codes using chalk to produce a neofetch-like colored output.

Unfortunately, mobile support for ANSI codes haven't been added yet, but fear not! There's a button called --mobile that outputs a mobile friendly view of the information. Alternatively, you can use the /neomobile command too!

  • What sort of information is displayed?

Here's a list of the information that is displayed:

Name Description
Username The author/user's tag (eg: Wumpus#0001)
ID The author/user's unique Discord ID
Created The date on which the user/author's account was created
Is Bot Checks if the user/author is a bot
CPU Usage* CPU Usage count, similar to neofetch
Shell* Distro specific shell
Packages* Package count, with the appropriate distro specific package manager

Fields marked with a * are randomized values and do not directly depend on the Discord API

  • What distros are supported?

Here's a list of distros that this bot supports. Choose any one you'd like:

Name Value
Discord (Default) discord
Arch Linux arch
Fedora fedora
Manjaro manjaro
Mint mint
Pop!_OS popos
Ubuntu ubuntu
Android android
CentOS centos
Debian debian
Elementary elementary
Gentoo gentoo
MacOS macos
Windows windows

All the above distros and their ascii arts have been ported from dylanaraps/neofetch.

  • What prompts are supported?

Here's a list of prompts that this bot supports. Choose any one you'd like:

Name Value
Default (Default) default
Pristine pristine
AFMagic afmagic
Candy candy
Zap zap
Percent percent
Wuffers wuffers

All the above prompts have been ported from ohmyzsh/ohmyzsh.

  • What commands are available?

Here's a list of commands that are available:

Command Description
/neofetch The main neofetch command.
Used to display the neofetch-ed information of the author
or the user mentioned, in accordance with their set distro and prompt.
Also displays a set of neofetch-like, non-Discord related info,
such as the number of packages, shell, etc.
/neomobile A mobile version of the neofetch command.
/neoconf distro Customize your distro from a list of options.
/neoconf prompt Customize your prompt from a list of options.
/info Display relevant information about the bot.
/help View a list of bot commands.
/invite Display an invite link to add your bot to your server.
  • Are there slash commands?

Absolutely! Check them out by typing in /help. Legacy commands aren't supported though, as they have been deprecated.

  • Cool bot, can I add it to my server?

Of course you can! Just click this link and select the server of your choice.

  • Why is the code so bad?

Because we need you! A number of contributors are helping to expand and improve the code base. Why don't you join us?

  • How can I contribute?

Just check out the Issues pane for potential issues and submit a PR to solve them. Of course, you can always contribute to the inprovement of the code, and I'd be happy to accept your PRs!

Support

You can support further development of this bot by giving it a ๐ŸŒŸ and help me make even better stuff in the future by buying me a โ˜•


Also, if you liked this repo, consider checking out my other projects, that would be real cool!

Attributions and special thanks

discord-neofetch's People

Contributors

savioxavier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alxb421 itzderock

discord-neofetch's Issues

Known issues and required features

Bot is currently kinda unstable (due to bad code) and needs a few fixes

  • Better interaction handling. Bot usually crashes due to an "Unknown Message" error (and usually restarts, thanks to Railway) but that's a problem that needs to be fixed
  • Better error handling, due to errors like "Unknown Interaction" and "Unknown Message" crashing the bot, I had to pass empty catch statements all over the code, which is bad practice really
  • Button interaction error: interactions usually fail sometimes. Not good.
  • Better slash command deployment handling. Currently the bot registers slash command on every run in production and I'm not really sure if that's a good idea. For some reason, I couldn't execute two scripts in succession in Railway, even with a process.exit() in the code to move on to the next script
  • A proper logger (eg: pino)
  • Command cleanup and refactoring
  • A few bug fixes. A lot of bug fixes

If you do know how to fix these issues, please submit a PR, that would be much appreciated.

ANSI color codes don't work when in production

Currently, the bot uses chalk-template for the ANSI escape codes, and node:fs for rendering the ascii arts right, but apparently, after the bot was hosted on Railway, none of the above stuff worked.

The ascii arts aren't aligned correctly too, here's a picture for demo purposes:
image

Not sure what the issue is, might be because I used node:fs instead of fs, but should not affect anything, I guess. Or maybe chalk-template's colors are somehow stripped and don't show up for some reason in production.

Edit: no change as of commit 0294780
Edit 2: no change as of commit 1cf120e

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.