This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
discord-dart/lib/src/message.dart

18 lines
612 B
Dart
Raw Normal View History

2023-07-30 23:19:42 +02:00
import 'package:tn_discord/src/index.dart';
import 'package:http/http.dart' as http;
Future<http.Response> sendWH(Map content, String token, String id) {
final url = Uri.parse("$apiURL/webhooks/$id/$token");
return http.post(url, body: content);
}
Future<http.Response> editWH(Map content, String token, String id, String mid) {
final url = Uri.parse("$apiURL/webhooks/$id/$token/messages/$mid");
return http.patch(url, body: content);
}
Future<http.Response> getWH(String token, String id, String mid) {
final url = Uri.parse("$apiURL/webhooks/$id/$token/messages/$mid");
return http.get(url);
}