 
   _message: (msg) ->
     commands = [
-      { regex: /!pause/, fn: () => @player.pause() }
-      { regex: /!resume/, fn: () => @player.resume() }
-      { regex: /!skip/, fn: () => @player.skip() }
-      { regex: /!add ([^\s]+)/, fn: (match) => @player.add(match[1]) }
+      { regex: /!p(ause)?/, fn: () => @player.pause() },
+      { regex: /!r(esume)?/, fn: () => @player.resume() },
+      { regex: /!s(kip)?/, fn: () => @player.skip() },
+      { regex: /!a(dd)? ([^\s]+)/, fn: (match) => @player.add(match[2]) },
+      { regex: /!c(lear)?/, fn: () => @player.clear() },
+      { regex: /!vol(ume)? ([^\s]+)/, fn: (match) => @player.volume(match[2]) }
     ]
 
     c.fn(msg.match(c.regex)) for c in commands when c.regex.test(msg)

  _connectAsync: Promise.promisify mumble.connect

  _ready: (cli) ->
    cli.user.moveToChannel 'Games'

  _userMove: (user) ->
    if user.channel.name == 'Games' and user.name != @name

      @cmd.kill()
      @playing = false

  clear: ->
    @queue.queue = []
    this.skip()

  volume: (vol) ->
    gain = parseInt(vol) * .01
    if @cmd and @output and gain > 0 and gain <= 1
      @gain = gain
      @output.setGain @gain

  _stream: (url) ->
    @playing = true
    this._getInfoAsync(url, []).then (info) =>
      @output = @cli.inputStream gain: @gain
      @cmd = ffmpeg(info.url)
        .noVideo()
        .format('wav')
