Comments (2)
با سلام ابتدا ربات را به کانال مدنظر اضافه کنید و سپس با کد زیر برای ربات پیام بفرستین
نکته برای ارسال به کانال باید
majorType
را برابر مقدار زیر قرار دهید
CHANNEL
و در بخش to باید آیدی کانال خود را بنویسید
امیدوارم مفید باشه
wle.ir
سروش مستنداتش کامل نیست ، دقیقا یک روزه دارم رو این کد ها کار می کنم تا فهمیدم چی به چی هست .
$bot_token = 'bot_token';
$bot = new Soroush\Client($bot_token);
try {
$data['to']= 'wle1036'; آیدی کانال رو اینجا بنویسید
$data['body']= ' به سرزمسن الکترونیک خوش آمدید WLE.IR';
$data['type']= 'TEXT';
$data['majorType']= 'CHANNEL';
list($error, $success) = $bot->sendRAW($data);
print_r($success);
print_r($error);
if($success) {
echo 'Message sent successfully' . PHP_EOL;
} else {
echo 'Fail : ' . $error. PHP_EOL;
}
} catch (Exception $e) {
die($e->getMessage());
}
from bot-php-sdk.
سلام
ربات سروش هنوز این امکان رو نداره
from bot-php-sdk.
Related Issues (20)
- ارور 504 HOT 8
- error file HOT 2
- موضوع قطع شدن ارتباط سرور سروش با ربات HOT 1
- چطوری میتونم من از این فایل در لاراول استفاده کنم HOT 4
- متن فارسی HOT 1
- How to use multi bots ? HOT 3
- ارسال پست از ربات به کانال HOT 7
- Error : Bad Response : 500 HTTP Error Code HOT 1
- اموش ارسال پیام به کانال از طریق ربات سروش HOT 9
- ارسال نشدن فایل به بات HOT 8
- What is the channelLink? HOT 1
- هاست HOT 2
- خطا آپلود فایل HOT 1
- مشکل با اجرا HOT 1
- مشکل با ارسال عکس به کانال! HOT 3
- What is the Group and channel address limitations ? HOT 1
- Get Channel Post HOT 1
- بدون Composer HOT 1
- phoneNo و nickName HOT 2
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 bot-php-sdk.