forked from mathwizard1232/tipnyan
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nyantip-sample.yml
121 lines (121 loc) · 4.35 KB
/
nyantip-sample.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
backup_passphrase:
banned:
- USER1
- USER2
coin:
config_file: '~/Library/Application Support/NyanCoin/nyancoin.conf'
explorer:
address: https://www.nyanchain.com/ad.nyan?
transaction: https://www.nyanchain.com/tx.nyan?
minconf:
tip: 4
withdraw: 60
name: Nyancoin
regex: '(K[1-9a-z]{20,40})'
minimum_tip: "0.1"
minimum_withdraw: "1"
transaction_fee: "0.0001"
symbol: 'Ɲ'
unit: nya
tip_message_body_url_encoded: "tip%20u/USERNAME%20AMOUNT"
withdraw_message_body_url_encoded: "withdraw%20ADDRESS%20AMOUNT"
commands:
accept: \Aaccept$
decline: \Adecline$
history: \Ahistory$
info: \Ainfo$
register: \Aregister$
tip:
message_parent_amount:
address: 0
amount: 1
destination: 0
keyword: 0
only: comment
regex: \A{BOT_NAME}\s+tip\s+{REGEX_AMOUNT}$
message_parent_keyword:
address: 0
amount: 0
destination: 0
keyword: 1
only: comment
regex: \A{BOT_NAME}\s+tip\s+{REGEX_KEYWORD}$
message_redditor_amount:
address: 0
amount: 2
destination: 1
keyword: 0
regex: \A{BOT_NAME}\s+tip\s+{REGEX_USERNAME}\s+{REGEX_AMOUNT}$
message_redditor_keyword:
address: 0
amount: 0
destination: 1
keyword: 2
regex: \A{BOT_NAME}\s+tip\s+{REGEX_USERNAME}\s+{REGEX_KEYWORD}$
reply_amount:
address: 0
amount: 2
destination: 1
keyword: 0
only: message
regex: \Atip\s+{REGEX_USERNAME}\s+{REGEX_AMOUNT}$
reply_keyword:
address: 0
amount: 0
destination: 1
keyword: 2
only: message
regex: \Atip\s+{REGEX_USERNAME}\s+{REGEX_KEYWORD}$
withdraw:
amount:
address: 1
amount: 2
destination: 0
keyword: 0
only: message
regex: \Awithdraw\s+{REGEX_ADDRESS}\s+{REGEX_AMOUNT}$
keyword:
address: 1
amount: 0
destination: 0
keyword: 2
only: message
regex: \Awithdraw\s+{REGEX_ADDRESS}\s+{REGEX_KEYWORD}$
database:
host: localhost
name: nyantip
password:
port: 3306
user:
exception_user:
keywords:
all: Decimal(self.source.balance(kind=self.action) - (self.nyantip.config['coin']['transaction_fee'] if self.action == 'withdraw' else 0))
nothing: Decimal(self.nyantip.config["coin"]["minimum_tip"])
pending_hours: 48
qr_url: 'https://chart.googleapis.com/chart?cht=qr&choe=UTF-8&chs=300x300&chl='
reddit:
client_id: OAUTH_CLIENT_ID
client_secret: OAUTH_CLIENT_SECRET
password: REDDIT_PASSWORD
subreddit: YOUR_SUBREDDIT
username: REDDIT_USERNAME
sql:
globalstats:
1_total_users_registered:
description: "Number of registered users"
name: "Total Users Registered"
query: "SELECT COUNT(username) FROM users"
2_total_tippers:
description: "Number of users who tipped at least once"
name: "Total Tippers"
query: "SELECT COUNT(DISTINCT source) FROM actions WHERE action='tip' AND status='completed'"
3_total_tips:
name: "Total Number of Tips"
description: "Total number of tips given"
query: "SELECT COUNT(1) FROM actions WHERE action='tip' AND status='completed'"
history: "SELECT message_timestamp AS `when`, action, source, destination, amount, path AS comment, status FROM actions WHERE action IN ('tip', 'withdraw') AND (destination=%s OR source=%s) ORDER BY message_timestamp DESC LIMIT 75"
tips: "SELECT message_timestamp AS `when`, source, destination, amount, path AS comment FROM actions WHERE action='tip' AND status='completed' ORDER BY message_timestamp DESC"
userstats:
history: "SELECT message_timestamp AS `when`, action, source, destination, amount, path AS comment FROM actions WHERE action IN ('tip', 'withdraw') AND (destination=%s OR source=%s) AND status='completed' ORDER BY message_timestamp DESC"
total_received: "SELECT SUM(amount) AS total FROM actions WHERE action='tip' AND destination=%s AND status='completed'"
total_tipped: "SELECT SUM(amount) AS total FROM actions WHERE action='tip' AND source=%s AND status='completed'"