This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
171 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System; | ||
namespace QQCourseBot | ||
namespace QQCourseBot | ||
{ | ||
public class GroupInfo | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Net.Http; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
|
||
namespace QQCourseBot | ||
{ | ||
public class TencentMeeting | ||
{ | ||
private static string GetWemeet(string Url) | ||
{ | ||
var client = new HttpClient(); | ||
var result = client.GetAsync(Url); | ||
result.Wait(); | ||
return "wemeet://page/inmeeting" + result.Result.RequestMessage.RequestUri.Query.Replace("meetingcode", "meeting_code"); | ||
} | ||
|
||
public static void InvokeWemeet(string Url) | ||
{ | ||
Console.WriteLine("[WEMEET] Meeting URL: " + GetWemeet(Url)); | ||
Process process = new Process(); | ||
process.StartInfo.UseShellExecute = true; | ||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
{ | ||
process.StartInfo.FileName = GetWemeet(Url); | ||
process.Start(); | ||
} | ||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) | ||
{ | ||
process.StartInfo.FileName = "xdg-open"; | ||
process.StartInfo.Arguments = GetWemeet(Url); | ||
process.Start(); | ||
} | ||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) | ||
{ | ||
process.StartInfo.FileName = "open"; | ||
process.StartInfo.Arguments = GetWemeet(Url); | ||
process.Start(); | ||
} | ||
else | ||
{ | ||
Console.WriteLine("[WEMEET] Your OS does not support Tencent Meeting."); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
namespace QQCourseBot | ||
{ | ||
public class TencentScheduledMeeting | ||
{ | ||
public DateTime StartTime; | ||
public DateTime EndTime; | ||
public string Url; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters