Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta41 #144

Merged
merged 4 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions handlers/get_guild_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func init() {
func getGuildList(client callapi.Client, api openapi.OpenAPI, apiv2 openapi.OpenAPI, message callapi.ActionMessage) {
var response GuildListResponse

// 初始化 response.Data 为一个空数组
response.Data = []GuildData{}

// 创建一个 GuildPager 实例,设置 limit 为 10
pager := dto.GuildPager{Limit: "50", After: "0"} // 默认从0开始,取50个

Expand Down
2 changes: 1 addition & 1 deletion sys/restart_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewRestarter() *UnixRestarter {
func (r *UnixRestarter) Restart(executableName string) error {
scriptContent := "#!/bin/sh\n" +
"sleep 1\n" + // Sleep for a bit to allow the main application to exit
"sh -c '" + executableName + "'\n"
"." + executableName + "\n"

scriptName := "restart.sh"
if err := os.WriteFile(scriptName, []byte(scriptContent), 0755); err != nil {
Expand Down