Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Fix auto search, auto buy + glitch #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions instance/autobuy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (in *Instance) abLaptop(_ discord.Message) {
if trigger == nil || trigger.Value != postmemeCmdValue {
return
}
in.sdlr.ResumeWithCommand(&scheduler.Command{
1337-69420 marked this conversation as resolved.
Show resolved Hide resolved
in.sdlr.ResumeWithCommandOrPrioritySchedule(&scheduler.Command{
Value: buyCmdValue("1", "laptop"),
Log: "no laptop, buying a new one",
})
Expand All @@ -27,7 +27,7 @@ func (in *Instance) abHuntingRifle(_ discord.Message) {
if trigger == nil || trigger.Value != huntCmdValue {
return
}
in.sdlr.ResumeWithCommand(&scheduler.Command{
in.sdlr.ResumeWithCommandOrPrioritySchedule(&scheduler.Command{
Value: buyCmdValue("1", "rifle"),
Log: "no hunting rifle, buying a new one",
})
Expand All @@ -38,7 +38,7 @@ func (in *Instance) abFishingPole(_ discord.Message) {
if trigger == nil || trigger.Value != fishCmdValue {
return
}
in.sdlr.ResumeWithCommand(&scheduler.Command{
in.sdlr.ResumeWithCommandOrPrioritySchedule(&scheduler.Command{
Value: buyCmdValue("1", "fishing"),
Log: "no fishing pole, buying a new one",
})
Expand Down
6 changes: 3 additions & 3 deletions instance/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (in *Instance) router() *discord.MessageRouter {
Channel(in.ChannelID).
Author(DMID).
ContentMatchesExp(exp.search).
Mentions(in.Client.User.ID).
1337-69420 marked this conversation as resolved.
Show resolved Hide resolved
RespondsTo(in.Client.User.ID).
Handler(in.search)

// Highlow.
Expand Down Expand Up @@ -164,7 +164,7 @@ func (in *Instance) router() *discord.MessageRouter {
Channel(in.ChannelID).
Author(DMID).
ContentContains("You don't have a fishing pole").
Mentions(in.Client.User.ID).
RespondsTo(in.Client.User.ID).
Handler(in.abFishingPole)
}

Expand All @@ -174,7 +174,7 @@ func (in *Instance) router() *discord.MessageRouter {
Channel(in.ChannelID).
Author(DMID).
ContentContains("You don't have a hunting rifle").
Mentions(in.Client.User.ID).
RespondsTo(in.Client.User.ID).
Handler(in.abHuntingRifle)
}

Expand Down