Amadeus
アマデウス Memory storage and artificial intelligence system. Complex chatting AI bot for discord, also voice / music, streams trackers, WarCraft3 news, games trackers, various statistics/info grabbers.
Install / Use
/learn @Miezhiko/AmadeusREADME
Features
<img align="right" src="https://vignette.wikia.nocookie.net/steins-gate/images/0/07/Amadeuslogo.png">- Too many small commands
- Slash commands support (type
/) - Chatty (
set activity 66is default) - Automatic translation with rust-bert models
- Live games tracking on w3champions
- W3info news tracking using calendar
- Replays parsing (click emoji to get report)
- Points system on Cannyls
- Emoji roles system on Cannyls
- Various gifs commands using Tenor API
- Using Fluent for localization
- Sled for editable info archive
- Plays music streams using Songbird! (
~join ~play) - Dhall and YAML config files, dhall for per-guild teams configurations
- Multi-server streams notifications/trackers for twitch and goodgame.ru (using channels from dhall conf)
- Tracking pull requests of watching by some user repositories on GitHub and posting detailed PR embeds
- Veto helper (for banning maps against some player) using W3C statistics (
~vetocommand) - Versus command showing score for one player against another for x seasons (
~vscommand) - Bets on live games with
~betand emojis under Live tracking games - Warcraft 3 commands
~stats,~todayand more with info from wacraft3.info and W3C ladder - Warcraft 3 hostbot API integration (creating games) using flo services and tonic for RPC
- Some anti-spam protection (Free nitro scam and maybe more) using this
- Query package atoms from Zugaina
- Some moderation automation, like timeout commands creating room for communicating with target user.
- Slur words auto-removal / warnings system.
- Using Celery and RabbitMQ for distributed tasks queue.
- Using tokio UnixStream on various sockets for IPC
- Warcraft 3 Status Grid with active players on modes and weekly team players statistics.
- FloTV tokens generation using GraphQL API to Flo Stats.
- chat.rs integration to RabbitMQ/Kafka services.
Cooking
- Salieri needs RabbitMQ to work properly
- Strauss needs to link with PyTorch, instructions on tch-rs
tokens.txtfile for poe API to work- to compile just use
cargo build --releaseorhake cp conf.example.dhall conf.dhall(initial constant options)cp conf.example.yml conf.yml(those options may change in runtime)- generate token here: https://discord.com/developers/applications
- optionally for twitch support: https://dev.twitch.tv/docs/authentication
- modify conf.dhall and fill
discord,tenor_keyand optionallytwitchclient data - conf.yml
twitchvalue is OAuth access token, you can regenerate it with bot command~twitch_token_update
let SType = < Safe
| Unsafe >
let Server : Type =
{ id: Natural, kind: SType }
let u = λ(id: Natural) → { id = id, kind = SType.Unsafe }
let s = λ(id: Natural) → { id = id, kind = SType.Safe }
let additional_servers : List Server =
[ u 676119422418550815 -- "Unsafe Server"
, s 728694826203349072 -- "Rusty Tools"
]
in { discord = "AAAAAAAAA.AAA.AAAA-AAAAAAA"
, app_id = 000000000000000000
, guild = 611822838831251466
, amadeus_guild = 000000000000000000
, servers = additional_servers
, twitch_client_id = "AAAAAA"
, twitch_client_secret = "AAAAAAAAAAAAAAAAAAAAAAAA"
, tenor_key = "AAAA"
, flo_secret = "AAAAAAAAAAAAAAA"
, gencache_on_start = True
, gencache_on_start_only = False
, upgrade_on_resume = False
, github_auth = "AccountName:access_token"
}
Optional Build Features:
trackers- enable games trackers / w3info news trackers / streams trackersflo- gather flo nodes information / register players / host gamesflotv- GraphQL integration with flotv services to get keys for running gamesggru- streaming on GoodGame integration is optional due their instabilityspam_filter- detect and early remove various phishing linksfull- enable all
cargo build --release --features flo,trackers enabled by default,
use following to ignore non-needed features cargo build --release --no-default-features
installation environment for typescript parsing backend (optional) typescript replay parsing will be replaced in future.
npm install -D typescript
npm install -D ts-node
npm i @types/node
npm install w3gjs
to test typescript code you may run
node node_modules/ts-node/dist/bin.js ./js/w3g_parse.ts ./LastReplay.w3g > gg.out
Note: will lag at first run due pre-trained models downloading.
The models will be downloaded to the environment variable RUSTBERT_CACHE if it exists, otherwise to ~/.cache/.rustbert
Development
- Strauss is set of tasks running on distributed tasks queue
- Amadeus is discord bot service on Serenity
- Salieri is celery daemon running on rabbitmq and processing tasks
rustfmt usage is forbidden, stylish-haskell is a must, pep8 is OK
Service
cp misc/Salieri.service /etc/systemd/system/Salieri.service
cp misc/Amadeus.service /etc/systemd/system/Amadeus.service
systemctl daemon-reload
systemctl enable Amadeus
systemctl start Amadeus
it's safe to rebuild and restart it
systemctl restart Amadeus
Notes
- Check TODO.md for planned work (also if you want to help me)
- deepspeech mode was dropped (due bad voice to text model quality)
- Code open sourced just for my friend Sirius to be able to see it, please don't pay attention
- Fingon is cute
- Additional thank to @fluxxu for removing my ban on W3C (this was kind of important for my motivation to improve flo/w3c aspects of Amadeus)
- I feel weird
- Thank to RiplEy for giving me his part for cup winning money
- Thank to Reyenir for playing dota2 with me
- Thank to Rici for yet another acc after my new ban
Related Skills
himalaya
348.2kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
imsg
348.2kiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
taskflow
348.2kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
Writing Hookify Rules
108.9kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
