PhaseRush.

Aspect

Cover Image for Aspect

Aspect is a discord bot that I worked on throughout university, and it has grown alongside my educational journey. This was the project that really taught me how to solve problems I had no idea how to tackle, and it has lead me to people whose help I'm grateful for to this day.

The original motivation for creating such a bot was sparked during a late night Discord call when a friend asked if it was possible to scramble the nicknames of everyone in the server. We brainstormed ideas and thought of the idea of writing a bot for it. From there, whenever anyone had an idea, I implemented it; server administrative tasks, game integration, we got it all. Before long, we had functionality that spanned anything and everything from ASCII art, music streaming with an equalizer, interaction with games like League of Legends, Warframe, Fortnite, Overwatch, and RotMG, as well as NASA's Astronomy picture of the day.

You'll notice that this is actually the second version of Aspect. The first version was so horrendous I've burried it in the depths of my Github. It was really the epitome of the OneFileWonder.java paradigm. Moving past that really helped me recognize the importance of foward planning and scalable design.

V2.0 fell off when the Discord library it depended on underwent a major backwards-incompatible redesign. I lost motivation to work on the bot, so I gradually stopped making updates to it. Currently, I'm actively working on V3.0, which focuses more on quality of life improvements for personal usage.

Below is the rest of the README.md, which can also be found on my Github.

Revamped. V2.0

To add Aspect to your discord server, shoot me a dm on Discord @Requiem#8148, and I'll provide an OAuth2 URL

All commands are prefixed by "",unlessmanuallychangedbythediscordserveradmin.Allcommandsareformattedas:"", unless manually changed by the discord server admin. All commands are formatted as: "[command id] param1, param2, ....". Note the space between the command id and the first param

All available commands:

Source for all commands

  • examples with params in round brackets indicate optional params. Square brackets indicate a placeholder. Do not use the round or square bracket characters if you choose to use that parameter

Music

Command#ParamsDescriptionExample
stop/lvoice0Stops current song, leaves voice$stop
play1Adds param to Queue$play [YT song/plist]
nowplaying/current/np0Displays info about current song$np
skip0, 1skips 1 song, or [param] songs$skip 13
purge1deletes all songs after x in queue$purge 12
queue/q0lists the first 15 songs in queue$queue
loop0, 1loops indefinetly, or [param] times$loop 3
shuffle0shuffles current queue$shuffle
sfx1plays [param] sound effect$sfx purple
listsfx0lists all available sound effects$listsfx
qdel/songdel1removes song in position x from queue$qdel 4
listmusic0lists all preconfigured playlists$listmusic
pq0lists past queue (past songs)$pq
seek1goes to that timestamp in the current song$seek 4:20
eq1..applies an equalizer filter$eq [curr, bass, treb]

Misc.

Command#ParamsDescriptionExample
summarize1summarizes webpage article$summarize https://goo.gl/oei2cu
img1image recognition$img https://goo.gl/5dx7VS
greet0greets everyone in current Voice channel$greet

Utility (non-meta)

Command#ParamsDescriptionExample
dic/def1urban dictionary query$dic english
wiki1wikipedia query$wiki apple
roll1rolls dice. Use dice notation$roll 6d14
render1renders an image with text param$render Hello!
freq1analyses word frequency for tagged user$freq @Requeim
bob1Spongebob-ify text parameter$bob haha so funny
haste1dumps ATTACHED file into hastebin$haste [attached file]

General Commands

Command#ParamsDescriptionExample
bulkdelete1deletes all msg in channel up to x mins$bulkdelete 3
timev0displays time in Vancouver, Canada$time
deletemsg2deletes msg by [x] in past [y] mins$deletemsg 264213620026638336, 10

Meta

Command#ParamsDescriptionExample
setprefix1sets prefix for disc server$setprefix ! (next time: !setprefix $)
ping0pretty useless$ping
info1shows info about a person. Ask for details$info @Requiem
help0, 1sends pm for help, or specific help a cmd$help (poll)
membercount0displays number of members in current server$membercount
poll2..*constructs poll$poll Question, option1, op2,...
cpuload0displays system info$cpuload

Meta Utility

command#ParamsDescriptionExample
time1..times execution duration of (nested) command$time ping

League of Legends

Command#ParamsDescriptionExample
lolign1shows availability of summoner id$lolign AKatHelicopter
lollevel1shows level of summoner$lollevel SchrödingersKat
lolsum1shows info of summoner$lolsum SchrödingersKat
lolregions0shows available regions$lolregions
lolitem0, 1shows info about item, or [x] items$lolitem (3)
lolrecent1WIP - shows recent match$lolrecent SchrödingersKat
allskins1lists all skins for [champion]$allskins katarina
skin2shows picture of skin$skin katarina, [4 or Kitty Cat Katarina]
lolquote0, 1shows a random quote (from specified champ)$lolquote zed

Warframe

Command#ParamsDescriptionExample
wfdaily0shows daily deals$wfdaily
wfcetus0shows time in cetus$wfcetus
wfalerts0shows all alerts$wfalert
wfvoid0,1shows all void fissures, or filters accordingly$wfvoid (meso)
wfinfo1shows basic info about item (has spellcheck)$wfinfo abkroncoe prwime blurewpint
wfaco0shows info about all currentl acolytes$wfaco
wfdropinfo1shows drop locations of materials$wfdropinfo polymer bundle
wfvoidtrader0shows info about current or upcomming void trader$wfvoidtrader
wfmarket1,2shows current listings for item$wfmarket flow, all

NASA

Command#ParamsDescriptionExample
apod0NASA's Astronomy Picture of the Day$apod
bluemarble0, 1NASA's image of the earth, updated frequently$bluemarble (natural)

Wolfram Alpha

Command#ParamsDescriptionExample
wolfram/solve/_1..*Basic WA query$_ tell me a comp sci joke
__1..*Full WA query$__ centripetal force 15kg 600m 13rad/sec

Humour // Don't dead open inside

Command#ParamsDescriptionExample
cute1displays a cute image$cute baka
ship2Ships two people$ship @Aspect, @Requiem
insult0says an insult (slight nsfw)$insult
ascii1,2Ascii-fy an image. Can specify font size$ascii https://goo.gl/5dx7VS, 4
ascii22Ascii-fy, old. Specify font size$ascii2 https://goo.gl/5dx7VS, 10
count1, 2Counts # of occurences of word/regex in channel, or entire server$count word, all

Stats

Command#ParamsDescriptionExample
ow2displays overwatch stats$ow cats, 11481
fn1displays fortnite stats$fn ninja

Realm of the Mad God - Temporarily Deprecated

Command#ParamsDescriptionExample
katinv0Lists kat's inventory$katinv
rguild1Rates guild$rguild Black Bullet
rpet1Rates player's pet$rpet SexySelfie
rrate1Rates player$rrate SexySelfie
rdesc1Shows player's realmeye desc$rdesc SexySelfie
rrecentchar1Shows player's most recent char$rrecentchar SexySelfie
rscore1Scores player$rscore SexySelfie
setinv-For use by dev only$setinv \[x]

Other Commands

dictfilter :: filter the entire english dictionary by some regex or substring wyr :: would you rather face :: demographic recognition given image of face uwu :: spams uwu (or other text) over target's pfp upscale :: upscales image using Waifu2x sweep :: minesweeper game

WIP Commands:

  • General: fetch: command that searches google and compiles keywords and top image
  • Google image search
  • Imgur upload/integration
  • Microsoft Azure/Cloud integration for image recognition
  • Remind me bot (timezones op?)

WIP Features:

  • Dump MasterState json with command
  • use FFT to detect "beat drops" etc.
  • Passively listen for hashtag. Excl channels, search via twitter api.
  • Word and Frequency Counter - regex to english translator for the layman
  • Anime/Manga quick fact/links. Passive and/or active feature.
  • Upgrade fornite api (current one broke :[)

Other Features:

  • Warframe :: Automatically updates alerts and posts to channel every 30 minutes
  • Warframe :: Has automatic spell correction. "abkroncoe prwime blurewpint" -> "akbronco prime blueprint"
  • Warframe :: Status is constantly updating to display current time and solar cycle on Cetus
  • Music :: Calling $play without valid url triggers Youtube search
  • Music :: $play supports various keywords
  • Music :: keeps track of song history with $pq
  • Count :: Supports regular expression matching. Begin Regex pattern with backslash: $count \[regex]
  • Pokemon Identification :: Due to request from server admin, the pokedex only works when $identify is called. This is to not ruin the fun of guessing pokemon
  • Privacy :: Can give users a role to access private channels if a custom password is pm'd to the bot. Uses SHA-256 for encryption.
  • Summarize :: If a summary exceeds a certain character count, Aspect will upload the summarized text to Gist
  • Frequency :: Can count word frequencies and detect spelling mistakes. Provides message analytics for users.
  • Can dump an uploaded text file into hastebin.
  • ... and much, much more.

Notes

  • music player uses LavaPlayer
  • $bulkdelete (and certain other commands) restricted to people with a certain role/privileges
  • League of Legends - due to riot's policy on api keys, the private key needs to be updated daily. Message me to update it.

Special thanks:

decyg for help with basically everything.

Drew Cornfield for the private channel/role/password idea.

Mike Winkelmann for permission to use their art as icons.

Aspect isn’t endorsed by Riot Games and doesn’t reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.