revoltrb 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -9
- data/lib/revoltrb/bot.rb +6 -2
- data/lib/revoltrb/version.rb +1 -1
- data/lib/revoltrb/webhooks.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c754dbe329ccdcb39afb50423ec94ca08dc43e04e65d431e13b02e24a30febf
|
|
4
|
+
data.tar.gz: b41ab3955d6e540fe7e8de3c4ed12f7d34d1c5c0ea56ea9f20e2c77365c944c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbfb71a18d170fe28f10cab767d84466945c1e1ca67c463d0f2e301c5d0dc4020c4f5573fa46b44060d774b739202d4c19645aaffb89b319ec7ddcc9b11b9f3a
|
|
7
|
+
data.tar.gz: d291c7ba3f656aac0b93e569b949b11e9eadad0056bbf9da997b35f0fd01201cdf83bdd829abd01ae1374e40ee4c260875dc8cf78a42204afa543cec4e45580b
|
data/README.md
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
# revoltrb
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+
 
|
|
4
4
|
|
|
5
5
|
Revoltrb is a Ruby package (a.k.a. Gem) that allows you to make Revolt.chat bots using the Ruby programming language. This package (a.k.a. Gem) is not officially endorsed by Revolt.chat amd this is not an official Revolt.chat product.
|
|
6
6
|
|
|
7
7
|
You need Ruby 3.0 or newer in order to use this package (Ruby 3.2 or newer is recommended)
|
|
8
8
|
|
|
9
|
-
> [!
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
## ToDo
|
|
13
|
-
|
|
14
|
-
This list contains a list of things that I know is broken and gotta fix. Contributing will be super helpful.
|
|
15
|
-
|
|
16
|
-
- Fix reactions support
|
|
9
|
+
> [!CAUTION]
|
|
10
|
+
> Revolt.chat has became stoat.chat for certain reasons. This means we are moving from revoltrb to stoatrb. This package will no longer be maintained. We will have a migration guide in future updates here before archiving the repos.
|
|
17
11
|
|
|
18
12
|
## Setup
|
|
19
13
|
|
data/lib/revoltrb/bot.rb
CHANGED
|
@@ -121,6 +121,8 @@ module Revoltrb
|
|
|
121
121
|
exit(1)
|
|
122
122
|
end
|
|
123
123
|
puts "Bot is online and running. Press Ctrl+C to stop."
|
|
124
|
+
puts "WARNING: Revolt.chat has became stoat.chat. We have moved to stoatrb."
|
|
125
|
+
puts "WARNING: Consider using our new package stoatrb instead as this package is now discontinued"
|
|
124
126
|
@websocket_thread.join
|
|
125
127
|
rescue Interrupt
|
|
126
128
|
puts "\nCtrl+C detected. Shutting down bot gracefully..."
|
|
@@ -199,7 +201,7 @@ module Revoltrb
|
|
|
199
201
|
sleep 5
|
|
200
202
|
bot_instance.connect_websocket
|
|
201
203
|
else
|
|
202
|
-
thread_logger.debug "BOT: Bot has stopped and will not try to reconnect"
|
|
204
|
+
thread_logger.debug "BOT: Bot has stopped and will not try to reconnect"
|
|
203
205
|
end
|
|
204
206
|
end
|
|
205
207
|
@websocket.on :error do |e|
|
|
@@ -263,6 +265,8 @@ module Revoltrb
|
|
|
263
265
|
@logger.debug "Loaded #{event['servers'].count} real servers from 'Ready' event."
|
|
264
266
|
else
|
|
265
267
|
@logger.debug "'Ready' event received but no 'servers' array found."
|
|
268
|
+
@logger.debug "WARNING: Revolt.chat has became stoat.chat. We have moved to stoatrb."
|
|
269
|
+
@logger.debug "WARNING: Consider using our new package stoatrb instead as this package is now discontinued"
|
|
266
270
|
end
|
|
267
271
|
@ready_event_received = true
|
|
268
272
|
@logger.debug "@ready_event_received set to true."
|
|
@@ -586,4 +590,4 @@ module Revoltrb
|
|
|
586
590
|
end
|
|
587
591
|
end
|
|
588
592
|
end
|
|
589
|
-
end
|
|
593
|
+
end
|
data/lib/revoltrb/version.rb
CHANGED
data/lib/revoltrb/webhooks.rb
CHANGED
|
@@ -64,7 +64,7 @@ end
|
|
|
64
64
|
|
|
65
65
|
module RevoltWebhooks
|
|
66
66
|
class Webhook
|
|
67
|
-
DEFAULT_API_URL = 'https://
|
|
67
|
+
DEFAULT_API_URL = 'https://stoat.chat/api'.freeze
|
|
68
68
|
def initialize(webhook_id, webhook_token, api_url: DEFAULT_API_URL)
|
|
69
69
|
@webhook_id = webhook_id
|
|
70
70
|
@webhook_token = webhook_token
|