Coder Social home page Coder Social logo

cosmic's Introduction

Cosmic

Travis GitHub issues GitHub pull requests license alt text

Logo by ssnjrthegr8

Cosmic is a mutli purpose discord bot written in rust.The bot can help you in various tasks.Treat him nice and he will treat you the same way.Basic NLP capability is achieved with the help of eliza-rs

Features

  1. Basic AI Chat system
  2. Searches for lyrics of provided song
  3. Music player
  4. Searches and finds torrents as per the need
  5. Searches wiki
  6. Random meme generator and more...

Building

  1. Clone this repository

    git clone https://www.github.com/sreyas-sreelal/Cosmic.git
    
  2. Use cargo to build

    cargo build --release
    
  3. Add COSMIC_TOKEN to environment variables with your token as value

  4. Run

    ./cosmic
    

Deploy On Heroku

Deploy

Notes

Cosmic requires ffmpeg and youtubedl for audio processing.So install them before using the bot.

cosmic's People

Contributors

sreyas-sreelal 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cosmic's Issues

Compiling Cosmic on AWS Ubuntu in 2020-01

TL;DR
sudo apt update
sudo apt install -y pkg-config libssl-dev autoconf libtool libopus-dev

Story

I was trying to compile Cosmic, and I was getting the following error with openssl-sys:

ubuntu@ip-x-x-x-x:~/cosmic$ cargo build --release
   Compiling openssl-sys v0.9.53
error: failed to run custom build command for `openssl-sys v0.9.53`

Caused by:
  process didn't exit successfully: `/home/ubuntu/cosmic/target/release/build/openssl-sys-a58496d500b0ba7f/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: 
No such file or directory (os error 2)"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.53


It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
could not be found. If you have OpenSSL installed you can likely fix this by
installing `pkg-config`.

', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.53/build/find_normal.rs:150:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

So, as suggested by openssl-sys's error message, I did the following:

sudo apt update
sudo apt install -y libssl-dev pkg-config

Then I got the following error with audiopus_sys:

ubuntu@ip-172-31-38-14:~/cosmic$ cargo build --release
   Compiling audiopus_sys v0.1.5
error: failed to run custom build command for `audiopus_sys v0.1.5`

Caused by:
  process didn't exit successfully: `/home/ubuntu/cosmic/target/release/build/audiopus_sys-d46ad8915490dd23/build-script-build` (exit code: 101)
--- stdout
cargo:info=No feature or environment variable found, linking by default.
cargo:info=`pkg_config` could not find `Opus`.
cargo:info=Opus source path: "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.5/opus".
cargo:info=Opus will be built as dylib-library.
Updating build configuration files, please wait....

--- stderr
autogen.sh: 14: autogen.sh: autoreconf: not found
thread 'main' panicked at 'Failed to autogen Opus.', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.5/build.rs:81:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

So I installed autoconf:

sudo apt install -y autoconf

But then I got:

ubuntu@ip-172-31-38-14:~/cosmic$ cargo build --release
   Compiling audiopus_sys v0.1.5
error: failed to run custom build command for `audiopus_sys v0.1.5`

Caused by:
  process didn't exit successfully: `/home/ubuntu/cosmic/target/release/build/audiopus_sys-d46ad8915490dd23/build-script-build` (exit code: 101)
--- stdout
cargo:info=No feature or environment variable found, linking by default.
cargo:info=`pkg_config` could not find `Opus`.
cargo:info=Opus source path: "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.5/opus".
cargo:info=Opus will be built as dylib-library.
Updating build configuration files, please wait....

--- stderr
configure.ac:38: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:38: error: possibly undefined macro: AM_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
thread 'main' panicked at 'Failed to autogen Opus.', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.5/build.rs:81:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

So I installed libtool:

sudo apt install -y libtool

and then it built.


Edit: Added libopus-dev to TL;DR.

Things to do

  • add games (hang man,word guess etc)
  • random meme generator
  • Use google to improve on lyrics searching
  • Wikipedia scraping

Logo Proposal

Hi, would you like to have a logo for this project? I would like to contribute by making one.

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.