Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/chr233/ASFEnhance
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Oct 19, 2022
2 parents 42e7b3a + c13a6e0 commit 3ae3525
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 4 additions & 2 deletions ASFEnhance/ASFEnhance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Task OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigPrope
if (Config.Statistic)
{
Uri request = new("https://asfe.chrxw.com/");
var timer = new Timer(
_ = new Timer(
async (_) => {
await ASF.WebBrowser.UrlGetToHtmlDocument(request).ConfigureAwait(false);
},
Expand Down Expand Up @@ -172,7 +172,7 @@ private async Task<string> ResponseCommand(Bot bot, EAccess access, string messa
//Event
//case "EVENT" when access >= EAccess.Operator:
//case "E" when access >= EAccess.Operator:
//return await Event.Command.ResponseEvent(bot).ConfigureAwait(false);
//return await Event.Command.ResponseEvent(bot).ConfigureAwait(false);

//Shortcut
case "P":
Expand Down Expand Up @@ -313,6 +313,8 @@ private async Task<string> ResponseCommand(Bot bot, EAccess access, string messa
return await bot.Commands.Response(access, "ADDLICENSE " + Utilities.GetArgsAsText(message, 1), steamID).ConfigureAwait(false);
case "P":
return await bot.Commands.Response(access, "POINTS " + Utilities.GetArgsAsText(message, 1), steamID).ConfigureAwait(false);
case "TR":
return await bot.Commands.Response(access, "TRANSFER " + Utilities.GetArgsAsText(message, 1), steamID).ConfigureAwait(false);

//Account
case "PURCHASEHISTORY" when access > EAccess.Operator:
Expand Down
4 changes: 2 additions & 2 deletions ASFEnhance/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Reflection;

[assembly: System.CLSCompliant(false)]
[assembly: AssemblyVersion("1.6.14.0")]
[assembly: AssemblyFileVersion("1.6.14.0")]
[assembly: AssemblyVersion("1.6.15.0")]
[assembly: AssemblyFileVersion("1.6.15.0")]

[assembly: AssemblyCopyright("Copyright © 2022 Chr_")]
[assembly: AssemblyProduct("ASFEnhance")]
Expand Down
4 changes: 3 additions & 1 deletion ASFEnhance/Store/WebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ internal static async Task<bool> DeleteRecommend(Bot bot, uint gameID)
Uri request = new(SteamStoreURL, $"/ajaxrequestplaytestaccess/{gameID}");
Uri referer = new(SteamStoreURL, $"/app/{gameID}/");

var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<AjaxRequestAccessResponse>(request, headers: null, data: null, referer: referer).ConfigureAwait(false);
Dictionary<string, string> data = new(1, StringComparer.Ordinal);

var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<AjaxRequestAccessResponse>(request, data: data, referer: referer).ConfigureAwait(false);

return response?.Content;
}
Expand Down
16 changes: 9 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| ASFEnhance Version | Compat ASF Version |
| ---------------------------------------------------------------------- | ------------------ |
| [1.6.15.0](https://github.com/chr233/ASFEnhance/releases/tag/1.6.15.0) | 5.3.1.2 |
| [1.6.14.0](https://github.com/chr233/ASFEnhance/releases/tag/1.6.14.0) | 5.3.1.2 |

<details>
Expand Down Expand Up @@ -160,13 +161,14 @@ ASF.json

### Store Commands

| Command | Shorthand | Access | Description |
| ------------------------------------------ | --------- | ---------- | ----------------------------------------------------------------------------------- |
| `APPDETAIL [Bots] <AppIDs>` | `AD` | `Operator` | Get app detail from steam API, support `APP` |
| `SEARCH [Bots] Keywords` | `SS` | `Operator` | Search in Steam store |
| `SUBS [Bots] <AppIDs\|SubIDs\|BundleIDs>` | `S` | `Operator` | Get available subs from store page, support `APP/SUB/BUNDLE` |
| `PUBLISHRECOMMENT [Bots] <AppIDs> COMMENT` | `PREC` | `Operator` | Publish a recomment for game, if appID > 0 it will rateUp, or if appId < 0 rateDown |
| `DELETERECOMMENT [Bots] <AppIDs>` | `DREC` | `Operator` | Delete a recomment for game |
| Command | Shorthand | Access | Description |
| ------------------------------------------ | --------- | ---------- | ------------------------------------------------------------------------------------ |
| `APPDETAIL [Bots] <AppIDs>` | `AD` | `Operator` | Get app detail from steam API, support `APP` |
| `SEARCH [Bots] Keywords` | `SS` | `Operator` | Search in Steam store |
| `SUBS [Bots] <AppIDs\|SubIDs\|BundleIDs>` | `S` | `Operator` | Get available subs from store page, support `APP/SUB/BUNDLE` |
| `PUBLISHRECOMMENT [Bots] <AppIDs> COMMENT` | `PREC` | `Operator` | Publish a recomment for game, if appID > 0 it will rateUp, or if appId < 0 rateDown |
| `DELETERECOMMENT [Bots] <AppIDs>` | `DREC` | `Operator` | Delete a recomment for game |
| `REQUESTACCESS [Bots] <AppIDs>` | `RA` | `Operator` | Send join playtest request to specified appIDs, equivalent to click `Request Access` |

### Cart Commands

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ASFEnhance 介绍 & 使用指南: [https://keylol.com/t804841-1-1](https://keylo
| ASFEnhance 版本 | 适配 ASF 版本 |
| ---------------------------------------------------------------------- | ------------- |
| [1.6.15.0](https://github.com/chr233/ASFEnhance/releases/tag/1.6.15.0) | 5.3.1.2 |
| [1.6.14.0](https://github.com/chr233/ASFEnhance/releases/tag/1.6.14.0) | 5.3.1.2 |

<details>
Expand Down Expand Up @@ -164,9 +165,10 @@ ASF.json
| ------------------------------------------ | ------ | ---------- | ------------------------------------------------ |
| `APPDETAIL [Bots] <AppIDs>` | `AD` | `Operator` | 获取 APP 信息, 无法获取锁区游戏信息, 仅支持`APP` |
| `SEARCH [Bots] Keywords` | `SS` | `Operator` | 搜索商店 |
| `SUBS [Bots] <AppIDs\|SubIDs\|BundleIDs>` | `S` | `Operator` | 查询商店 SUB, 支持`APP/SUB/BUNDLE` |
| `SUBS [Bots] <AppIDs\|SubIDs\|BundleIDs>` | `S` | `Operator` | 查询商店 SUB, 支持 `APP/SUB/BUNDLE` |
| `PUBLISHRECOMMENT [Bots] <AppIDs> COMMENT` | `PREC` | `Master` | 发布评测, APPID > 0 给好评, AppID < 0 给差评 |
| `DELETERECOMMENT [Bots] <AppIDs>` | `DREC` | `Master` | 删除评测 |
| `REQUESTACCESS [Bots] <AppIDs>` | `RA` | `Operator` | 请求游戏内测访问权限, 等效于点击 `请求访问权限` |

### 购物车相关

Expand Down

0 comments on commit 3ae3525

Please sign in to comment.