ville-solja / kukkohelper

Kylmät kukot discord bot
3 stars 1 forks source link

Additional checks to streamer notifications #17

Closed ville-solja closed 5 years ago

ville-solja commented 5 years ago

Currently bot checks for following statuses:

  1. status = online
  2. game.type = 2 (streaming)
  3. User has the role-streamer -role

These values are gained from on_member_update event and more specifically the after state. This means that user that makes any changes to their member status (nickname, status, game name or type) prompts a new unnecessary message as long as the after state passes the checks from prior list.

ville-solja commented 5 years ago

after.game.name stores the stream name and changing that is a valid reason to repost the stream link and new name

ville-solja commented 5 years ago

status = 'online' validation might be redundant

ville-solja commented 5 years ago

on_member_update

  1. Try check before.game -object 1.1 If it has value. Great! 1.2 It doesn't have value and goes to exception 1.2.1 Set before.game.type to 0 (other other not 1 value) 2.1 Check that before.game.type is not 1 2.2 Check that after.game.type is 1
ville-solja commented 5 years ago

Made redundant by #19