Skip to content

Commit ee4c3a7

Browse files
committed
Updated Deprecated
1 parent 83162c6 commit ee4c3a7

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

.github/workflows/nanos-world-store.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- name: Nanos Store Action
14-
uses: nanos-world/nanos-store-action@v1.0
14+
uses: nanos-world/nanos-store-action@v2.0
15+
env:
16+
GITHUB_TOKEN: ${{ github.token }}
1517
with:
1618
# folder which contains the asset/package - if it's on root, leave it blank
1719
folder: ''
1820
# name of the asset/package
1921
name: 'discord'
20-
# changelog of the release - can be edited on the store before it gets published
21-
changelog: 'built through actions'
2222
# API token - generate at https://store.nanos.world/settings/tokens/ and set under Settings -> Secrets -> Actions with name STORE_SECRET
2323
token: ${{ secrets.STORE_SECRET }}

Package.toml

+22-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
# package configurations
2-
[package]
3-
# package name
4-
name = "discord"
1+
# vault configurations
2+
[meta]
3+
# friendly name
4+
title = "Discord"
55
# contributors
6-
author = "SyedMuhammad"
6+
author = "SyedMuhammad"
77
# version
8-
version = "0.0.8"
9-
# image URL
10-
image = ""
11-
# package type: 'script' (normal package), 'game-mode' (unique package - can only load one at a time) or 'loading-screen' (special package loaded in loading screen)
12-
type = "script"
13-
# whether to force the custom map Script to do not load
14-
force_no_map_script = false
8+
version = "0.0.9"
9+
10+
# script configurations
11+
[script]
12+
# whether to force the custom map package to do not load
13+
force_no_map_package = false
1514
# auto destroy all entities spawned by this package when it unloads
16-
auto_cleanup = true
15+
auto_cleanup = true
16+
# whether to load all level entities on client - only enable it if your package needs to use level static meshes entities
17+
load_level_entities = false
18+
# the game version (major.minor) at the time this package was created, for granting compatibility between breaking changes
19+
compatibility_version = "1.30"
1720
# packages requirements
1821
packages_requirements = [
19-
22+
2023
]
2124
# asset packs requirements
2225
assets_requirements = [
23-
26+
27+
]
28+
# compatible game modes
29+
compatible_game_modes = [
30+
2431
]

Server/Index.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ DISCORD_WEBHOOK_TOKEN = PERSISTENT_DATA.DISCORD_WEBHOOK_TOKEN
66

77
-- Verify Configuration
88
if (not DISCORD_WEBHOOK_ID or not DISCORD_WEBHOOK_TOKEN or DISCORD_WEBHOOK_ID == "" or DISCORD_WEBHOOK_TOKEN == "") then
9-
Package.Error("Failed loading Discord Webhook ID or Token")
10-
return
9+
Console.Error("Failed loading Discord Webhook ID or Token")
10+
return
1111
end
1212

1313
-- Send Message method
1414
function SendDiscordMessage(message)
15-
HTTP.Request(
15+
HTTP.RequestAsync(
1616
"https://discord.com",
1717
"/api/webhooks/" .. DISCORD_WEBHOOK_ID .. "/" .. DISCORD_WEBHOOK_TOKEN,
1818
"POST",
@@ -22,11 +22,11 @@ end
2222

2323
-- Send Embed Message method
2424
function SendDiscordEmbed(tEmbed)
25-
HTTP.Request(
25+
HTTP.RequestAsync(
2626
"https://discord.com",
2727
"/api/webhooks/" .. DISCORD_WEBHOOK_ID .. "/" .. DISCORD_WEBHOOK_TOKEN,
2828
"POST",
29-
'{"embeds":[' .. JSON.stringify(tEmbed) .. '], "allowed_mentions":{"parse":[]}}'
29+
'{"embeds":[' .. JSON.stringify(tEmbed) .. '], "allowed_mentions":{"parse":[]}}'
3030
)
3131
end
3232

@@ -44,5 +44,5 @@ Player.Subscribe("Destroy", function(player)
4444
end)
4545

4646
-- Output Success
47-
Package.Log("Loaded Discord Configuration successfuly.")
47+
Console.Log("Loaded Discord Configuration successfuly.")
4848
SendDiscordMessage("Server started!")

0 commit comments

Comments
 (0)