Skip to content

Commit 268a6d7

Browse files
committed
adjusted emoji path reference
1 parent f92ef24 commit 268a6d7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/PoshGram/Imports.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$script:assetPath = "$PSScriptRoot\asset\emoji.json"

src/PoshGram/PoshGram.psm1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# this psm1 is for local testing and development use only
22

3+
# dot source the parent import for local development variables
4+
. $PSScriptRoot\Imports.ps1
5+
36
# discover all ps1 file(s) in Public and Private paths
47
$itemSplat = @{
58
Filter = '*.ps1'

src/PoshGram/Public/Get-TelegramStickerPackInfo.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ function Get-TelegramStickerPackInfo {
100100
}#catch_messageSend
101101
#------------------------------------------------------------------------
102102
Write-Verbose -Message 'Sticker information found. Processing emoji information...'
103-
$assetPath = "..\$PSScriptRoot\asset\emoji.json"
104-
Write-Verbose "Asset path: $assetPath"
105-
$je = Get-Content -Path $assetPath
103+
Write-Verbose "Asset path: $script:assetPath"
104+
$je = Get-Content -Path $script:assetPath
106105
$psF = $je | ConvertFrom-Json
107106
$stickerData = @()
108107
foreach ($emoji in $results.result.stickers) {

0 commit comments

Comments
 (0)