aboutsummaryrefslogtreecommitdiff
path: root/bot
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-06 00:28:40 -0600
committermat <github@matdoes.dev>2021-12-06 00:28:40 -0600
commit5029a09963b5753c1f9b7f777f28e1c0951343e7 (patch)
tree2e0e37029bf031adc3e28713828e7d4be7336ccb /bot
downloadazalea-drasl-5029a09963b5753c1f9b7f777f28e1c0951343e7.tar.xz
Initial commit
Diffstat (limited to 'bot')
-rw-r--r--bot/Cargo.toml11
-rw-r--r--bot/src/main.rs17
2 files changed, 28 insertions, 0 deletions
diff --git a/bot/Cargo.toml b/bot/Cargo.toml
new file mode 100644
index 00000000..f1c89a99
--- /dev/null
+++ b/bot/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "bot"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+minecraft-client = { path = "../minecraft-client" }
+minecraft-protocol = { path = "../minecraft-protocol" }
+tokio = "^1.14.0"
diff --git a/bot/src/main.rs b/bot/src/main.rs
new file mode 100644
index 00000000..def38c3d
--- /dev/null
+++ b/bot/src/main.rs
@@ -0,0 +1,17 @@
+use minecraft_client;
+use minecraft_protocol::ServerAddress;
+use tokio::runtime::Runtime;
+
+async fn bot() {
+ let address = ServerAddress::parse(&"play.wynncraft.com".to_string()).unwrap();
+ minecraft_protocol::server_status_pinger::ping_server(&address)
+ .await
+ .unwrap();
+}
+
+fn main() {
+ println!("Hello, world!");
+
+ let io_loop = Runtime::new().unwrap();
+ io_loop.block_on(bot());
+}