项目作者: Ealenn

项目描述 :
Completely customizable Twitch Bot.
高级语言: TypeScript
项目地址: git://github.com/Ealenn/LarbinBot.git
创建时间: 2021-03-30T19:04:37Z
项目社区:https://github.com/Ealenn/LarbinBot

开源协议:GNU General Public License v3.0

下载


LarbinBot

Codecov
GitHub stars
GitHub issues
GitHub release (latest by date)
Docker Pulls

Completely customizable Twitch Bot.

  1. docker run --rm \
  2. -e DEBUG=true \
  3. -e LARBIN_TWITCH_USERNAME= Larbin \
  4. -e LARBIN_TWITCH_PASSWORD= oic:password \
  5. -e LARBIN_TWITCH_CHANNEL= example \
  6. -e LARBIN_FILE= /bot \
  7. -v $PWD/config:/bot \
  8. ealenn/larbinbot

More information about deployment here https://ealenn.github.io/LarbinBot/deployment

Version

The versioning scheme is SemVer.

  1. - latest: Master Build
  2. - x.x.x: Release version x.x.x
  3. - snapshot: Pull Request / Internal Tests

Environment Variables

  1. # Path to larbin.yml configuration file
  2. LARBIN_FILE=/tmp
  3. # Debug mode
  4. DEBUG=true
  5. # Single command threshold per second
  6. LARBIN_THRESHOLD=5
  7. # Twitch Credentials (mandatory)
  8. LARBIN_TWITCH_USERNAME: Larbin
  9. LARBIN_TWITCH_PASSWORD: oic:password
  10. LARBIN_TWITCH_CHANNEL: example

Larbin Configuration File (LCF)

You must configure this bot with configuration file larbin.yml.
This file contain all actions/events and commands.

More information about Larbin Configuration File here https://ealenn.github.io/LarbinBot/configuration

  1. tools:
  2. commands:
  3. # Command to start/stop schedulers
  4. # (The schedulers is started by default on bot starting.)
  5. # Example:
  6. # !schedulers status
  7. # !schedulers on
  8. # !schedulers off
  9. - type: schedulers
  10. name: '!schedulers'
  11. policies:
  12. mod: true
  13. admin: true
  14. argOn: 'on'
  15. argOff: 'off'
  16. argStatus: 'status'
  17. commands:
  18. - name: '!facebook' # Command to write
  19. random: false # Takes a random message from the list rather than following the order of the list
  20. policies:
  21. others: true # All
  22. messages:
  23. - 'My Facebook is https://facebook.com/example'
  24. - 'Like my Facebook page https://facebook.com/example'
  25. - name: '!twitter'
  26. policies:
  27. others: true # All
  28. messages:
  29. - 'My Twitter is https://twitter.com/example (This question has been asked {{ Count }} times)'
  30. schedulers:
  31. - id: 'social' # Required, is only used to make this scheduler unique
  32. minutes: 10 # Send message every minutes
  33. random: true # Takes a random message from the list rather than following the order of the list
  34. messages:
  35. - 'Follow me on Twitter https://twitter.com/example'
  36. - id: 'other'
  37. minutes: 5
  38. messages:
  39. - 'Text rolling 1'
  40. - 'Text rolling 2'
  41. - 'Text rolling 3'
  42. events:
  43. - name: 'join' # Event type
  44. random: true # Takes a random message from the list rather than following the order of the list
  45. messages:
  46. - 'Less noise {{ Username }} is coming!'
  47. - 'Ah! We are talking about you {{ Username }} !'
  48. - name: 'raided'
  49. messages:
  50. - 'Thanks to {{ Username }} for this raid of {{ Viewers }} viewers !'
  51. - name: 'resub'
  52. messages:
  53. - 'Thanks {{ Username }} for your {{ Months }} with us ! -- {{ Username }} say: {{ Message }}'
  54. - name: 'submysterygift'
  55. messages:
  56. - '{{ Username }} is rich and he just offered {{ OfferedSubs }} subscription! Thank him in the chat! (with a total of {{ GiftCount }} subscription offered)'
  57. - name: 'subgift'
  58. messages:
  59. - 'Hey ! {{ Username }} is {{ GiftCount }}x more generous with {{ RecipientUsername }} !'
  60. - name: 'subscription'
  61. messages:
  62. - 'I know someone from sub, but, I say anything, alright {{ Username }} ?'

Policies

Warning, by default, everything is blocked for everyone. You must allow at least one.

  1. # DEFAULT POLICIES VALUES
  2. policies:
  3. admin: false # Allow Admins/Streamer
  4. mod: false # Allow Moderators
  5. vip: false # Allow VIP
  6. sub: false # Allow Subscriber
  7. others: false # Allow/Disallow all/others