Skip to content

Chat giveaways

Łukasz Domeradzki edited this page Mar 8, 2017 · 18 revisions

Chat giveaways

Chat giveaways module, as name suggests, is a module responsible for delivering SteamGifts giveaway URLs to Steam chat users. It's extremely useful for small SG communities that are enjoying using Steam group chat feature, and would like to create giveaways specially for that small group of people (optionally including non-members), and not for the entire group.


TODO

  • Find out optimal solution for people that don't have ArchiBoT on their friendlist (reverse-engineer chat invitation?)
  • Implement support for varying giveaway state, such as gibs being removed and gibs starting in future
  • Misc MySQL optimizations to ensure that this can work with gigantic amount of users concurrently (currently tested 10k+)

Screenshots


Syntax

The general command syntax is:

!chatgiveaway <action> (ExtraArgs) sent privately to ArchiBoT.

Available actions are defined below, ExtraArgs are required in some specific actions.

Typically making chat giveaway consists of three things:

  • Creating giveaway with AddGiveaway action.
  • Specifying eligible chats and rules with ConnectGiveawayWithChat action (multiple times if needed).
  • Enabling (and optionally announcing) giveaway with EnableGiveaway action.

When giveaway is active, ArchiBoT will automatically send giveaway link to eligible members.


Actions

AddGiveaway <giveawayID>

Adds giveaway to ArchiBoT's database, giveaway must be invite-only, running, with you being the creator.

Example: !chatgiveaway AddGiveaway ABCDE


ConnectGiveawayWithChat <giveawayID> <chatID> <ruleType> (ExtraRuleArgs)

Connects giveawayID to chatID on ruleType rule. chatID can be 64-bit steamID or known chat name, like for chat relay. You can use !chatinfo command on group chat to get its chatID.

One chat/rule per command, you can execute this multiple times for multiple chats/rules if needed.

Rules

Rule Description
GroupMembersOnly Once set, only group members are eligible for giveaway.
ChatMessagesCount <count> Member must write in total <count> messages on the chat since giveaway became active.

Examples:

!chatgiveaway ConnectGiveawayWithChat ABCDE 110338190878500667 ChatMessagesCount 20 - We share the same giveaway with two chats, those members will need to write 20 messages in total.

!chatgiveaway ConnectGiveawayWithChat ABCDE 2hu ChatMessagesCount 10 - Touhou chat members will need to write 10 messages in total.

!chatgiveaway ConnectGiveawayWithChat ABCDE 2hu GroupMembersOnly - But we restrict 2hu chat to group-members only


EnableGiveaway <giveawayID> <announcementType>

Enables given giveaway as available for claiming, starting all tracking sub-modules. Also posts small announcement on chats (optional).

Announcement types

Type Description
None Lack of any notification, only you know that giveaway is active now.
Basic Basic notification on all included chat IDs - contains only generic message about you creating a chat giveaway.
WithGiveawayInfo Like Basic, but also includes name of the game included in the giveaway, and when the giveaway ends.

Example: !chatgiveaway EnableGiveaway ABCDE None


GetEligibleGiveaways

Prints a list of (still running) giveaways that you're eligible for. Useful if you missed ArchiBoT notification or in other way lost your giveaways.

Example: !chatgiveaway GetEligibleGiveaways


GetEligibleUsers <giveawayID>

Gets list of users (from all chats) that are eligible for given giveaway, meaning that ArchiBoT gave them link to join it. Useful as anti-leakers test similar to SGT.

Example: !chatgiveaway GetEligibleUsers ABCDE


Complete example

Adding (and announcing) giveaway ABCDE for all chat users of Touhou Giveaways that posted at least 2 messages (including non-group members):

!chatgiveaway AddGiveaway ABCDE
!chatgiveaway ConnectGiveawayWithChat ABCDE 2hu ChatMessagesCount 2
!chatgiveaway EnableGiveaway ABCDE Basic

Clone this wiki locally