Comments (1)
Parameters Change
In many functions parameters such as DisableNotification have been set to bool. It would be more interesting and standardized if they were set to Switch.
Determine boolean parameters that could potentially be changed to Switch
$results = @()
$functions = Get-Command -Module PoshGram
foreach ($f in $functions.Name) {
$paramSets = Get-Command $f | Select-Object -Expand ParameterSets
$obj = New-Object System.Object
$obj | Add-Member -type NoteProperty -Name Function -Value $f
$params = @()
foreach ($item in $paramSets.Parameters) {
if ($item.ParameterType.Name -eq 'Boolean') {
$params += $item.Name
}
}
$obj | Add-Member -type NoteProperty -Name BooleanParams -Value $params
$results += $obj
}
$results
Function BooleanParams
-------- -------------
Send-TelegramLocalAnimation {DisableNotification}
Send-TelegramLocalAudio {DisableNotification}
Send-TelegramLocalDocument {DisableNotification}
Send-TelegramLocalPhoto {DisableNotification}
Send-TelegramLocalVideo {Streaming, DisableNotification}
Send-TelegramLocation {DisableNotification}
Send-TelegramMediaGroup {DisableNotification}
Send-TelegramTextMessage {Preview, DisableNotification}
Send-TelegramURLAnimation {DisableNotification}
Send-TelegramURLAudio {DisableNotification}
Send-TelegramURLDocument {DisableNotification}
Send-TelegramURLPhoto {DisableNotification}
Send-TelegramURLVideo {Streaming, DisableNotification}
Test-BotToken {}
Thoughts on change
This will be a potentially breaking change for some. I do like the suggestion though and agree that these are better suited as Switch.
I will work on integrating this.
from poshgram.
Related Issues (20)
- No Pester tests written for Resolve-Shortlink function
- Example formatting in the help docs and Get-Help of functions is not displaying correctly due to multi-line breaks HOT 1
- README missing comments on code
- Issue with UTF-8 characters in messages HOT 2
- Add sendContact method
- Add sendVenue method
- Add sendPoll method
- Add send sticker capability
- PoshBot integration HOT 1
- DisableNotification parameter has no effect with Send-TelegramSticker
- Add support for new MarkdownV2 parse mode
- Add support for new poll features
- How to send inline emoji texts
- PoshGram - Retrive Chat id from Telegram bot
- Help framing inline keyboard button HOT 1
- PoshGram notification bug. HOT 1
- Cyrillic file name HOT 1
- Send-TelegramPoll - Now allows first option. HOT 1
- not support editMessageText
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poshgram.