From 4da437f98fe603b0f98e427179966097d9da4e02 Mon Sep 17 00:00:00 2001 From: zekroTJA Date: Sat, 13 Jan 2024 15:02:38 +0100 Subject: [PATCH] update mocks --- mocks/ConfigProvider.go | 19 +- mocks/Database.go | 627 +++++++++++++++++++++- mocks/IKen.go | 35 +- mocks/ISession.go | 979 +++++++++++++++++++++++++++++++++- mocks/IState.go | 199 ++++++- mocks/KarmaProvider.go | 31 +- mocks/KenContext.go | 142 ++++- mocks/KenState.go | 31 +- mocks/Logger.go | 35 +- mocks/PermissionsProvider.go | 35 +- mocks/ReportProvider.go | 47 +- mocks/Storage.go | 43 +- mocks/TimeProvider.go | 15 +- mocks/VerificationProvider.go | 31 +- 14 files changed, 2165 insertions(+), 104 deletions(-) diff --git a/mocks/ConfigProvider.go b/mocks/ConfigProvider.go index ac879a93..30ced432 100644 --- a/mocks/ConfigProvider.go +++ b/mocks/ConfigProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type ConfigProvider struct { func (_m *ConfigProvider) Config() *models.Config { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Config") + } + var r0 *models.Config if rf, ok := ret.Get(0).(func() *models.Config); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *ConfigProvider) Config() *models.Config { func (_m *ConfigProvider) Parse() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Parse") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -42,13 +50,12 @@ func (_m *ConfigProvider) Parse() error { return r0 } -type mockConstructorTestingTNewConfigProvider interface { +// NewConfigProvider creates a new instance of ConfigProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewConfigProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewConfigProvider creates a new instance of ConfigProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConfigProvider(t mockConstructorTestingTNewConfigProvider) *ConfigProvider { +}) *ConfigProvider { mock := &ConfigProvider{} mock.Mock.Test(t) diff --git a/mocks/Database.go b/mocks/Database.go index b86c660f..248e7a4e 100644 --- a/mocks/Database.go +++ b/mocks/Database.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -31,6 +31,10 @@ type Database struct { func (_m *Database) AddBackup(guildID string, fileID string) error { ret := _m.Called(guildID, fileID) + if len(ret) == 0 { + panic("no return value specified for AddBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, fileID) @@ -45,6 +49,10 @@ func (_m *Database) AddBackup(guildID string, fileID string) error { func (_m *Database) AddGuildLogEntry(entry models.GuildLogEntry) error { ret := _m.Called(entry) + if len(ret) == 0 { + panic("no return value specified for AddGuildLogEntry") + } + var r0 error if rf, ok := ret.Get(0).(func(models.GuildLogEntry) error); ok { r0 = rf(entry) @@ -59,6 +67,10 @@ func (_m *Database) AddGuildLogEntry(entry models.GuildLogEntry) error { func (_m *Database) AddKarmaBlockList(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for AddKarmaBlockList") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -73,6 +85,10 @@ func (_m *Database) AddKarmaBlockList(guildID string, userID string) error { func (_m *Database) AddOrUpdateKarmaRule(rule models.KarmaRule) error { ret := _m.Called(rule) + if len(ret) == 0 { + panic("no return value specified for AddOrUpdateKarmaRule") + } + var r0 error if rf, ok := ret.Get(0).(func(models.KarmaRule) error); ok { r0 = rf(rule) @@ -87,6 +103,10 @@ func (_m *Database) AddOrUpdateKarmaRule(rule models.KarmaRule) error { func (_m *Database) AddReport(rep models.Report) error { ret := _m.Called(rep) + if len(ret) == 0 { + panic("no return value specified for AddReport") + } + var r0 error if rf, ok := ret.Get(0).(func(models.Report) error); ok { r0 = rf(rep) @@ -101,6 +121,10 @@ func (_m *Database) AddReport(rep models.Report) error { func (_m *Database) AddRoleSelects(v []models.RoleSelect) error { ret := _m.Called(v) + if len(ret) == 0 { + panic("no return value specified for AddRoleSelects") + } + var r0 error if rf, ok := ret.Get(0).(func([]models.RoleSelect) error); ok { r0 = rf(v) @@ -115,6 +139,10 @@ func (_m *Database) AddRoleSelects(v []models.RoleSelect) error { func (_m *Database) AddTag(_a0 tag.Tag) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AddTag") + } + var r0 error if rf, ok := ret.Get(0).(func(tag.Tag) error); ok { r0 = rf(_a0) @@ -129,6 +157,10 @@ func (_m *Database) AddTag(_a0 tag.Tag) error { func (_m *Database) AddToAntiraidJoinList(guildID string, userID string, userTag string, accountCreated time.Time) error { ret := _m.Called(guildID, userID, userTag, accountCreated) + if len(ret) == 0 { + panic("no return value specified for AddToAntiraidJoinList") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, time.Time) error); ok { r0 = rf(guildID, userID, userTag, accountCreated) @@ -143,6 +175,10 @@ func (_m *Database) AddToAntiraidJoinList(guildID string, userID string, userTag func (_m *Database) AddUnbanRequest(request models.UnbanRequest) error { ret := _m.Called(request) + if len(ret) == 0 { + panic("no return value specified for AddUnbanRequest") + } + var r0 error if rf, ok := ret.Get(0).(func(models.UnbanRequest) error); ok { r0 = rf(request) @@ -157,6 +193,10 @@ func (_m *Database) AddUnbanRequest(request models.UnbanRequest) error { func (_m *Database) AddUpdateVote(votes vote.Vote) error { ret := _m.Called(votes) + if len(ret) == 0 { + panic("no return value specified for AddUpdateVote") + } + var r0 error if rf, ok := ret.Get(0).(func(vote.Vote) error); ok { r0 = rf(votes) @@ -171,6 +211,10 @@ func (_m *Database) AddUpdateVote(votes vote.Vote) error { func (_m *Database) AddVerificationQueue(e models.VerificationQueueEntry) error { ret := _m.Called(e) + if len(ret) == 0 { + panic("no return value specified for AddVerificationQueue") + } + var r0 error if rf, ok := ret.Get(0).(func(models.VerificationQueueEntry) error); ok { r0 = rf(e) @@ -185,6 +229,10 @@ func (_m *Database) AddVerificationQueue(e models.VerificationQueueEntry) error func (_m *Database) CheckKarmaRule(guildID string, checksum string) (bool, error) { ret := _m.Called(guildID, checksum) + if len(ret) == 0 { + panic("no return value specified for CheckKarmaRule") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -209,6 +257,10 @@ func (_m *Database) CheckKarmaRule(guildID string, checksum string) (bool, error func (_m *Database) CleanupExpiredRefreshTokens() (int64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CleanupExpiredRefreshTokens") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -240,6 +292,10 @@ func (_m *Database) Connect(credentials ...interface{}) error { _ca = append(_ca, credentials...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 error if rf, ok := ret.Get(0).(func(...interface{}) error); ok { r0 = rf(credentials...) @@ -254,6 +310,10 @@ func (_m *Database) Connect(credentials ...interface{}) error { func (_m *Database) DeleteAPIToken(userID string) error { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for DeleteAPIToken") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -268,6 +328,10 @@ func (_m *Database) DeleteAPIToken(userID string) error { func (_m *Database) DeleteBackup(guildID string, fileID string) error { ret := _m.Called(guildID, fileID) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, fileID) @@ -282,6 +346,10 @@ func (_m *Database) DeleteBackup(guildID string, fileID string) error { func (_m *Database) DeleteBirthday(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for DeleteBirthday") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -296,6 +364,10 @@ func (_m *Database) DeleteBirthday(guildID string, userID string) error { func (_m *Database) DeleteLockChan(chanID string) error { ret := _m.Called(chanID) + if len(ret) == 0 { + panic("no return value specified for DeleteLockChan") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(chanID) @@ -310,6 +382,10 @@ func (_m *Database) DeleteLockChan(chanID string) error { func (_m *Database) DeleteLogEntries(guildID string) error { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for DeleteLogEntries") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(guildID) @@ -324,6 +400,10 @@ func (_m *Database) DeleteLogEntries(guildID string) error { func (_m *Database) DeleteLogEntry(guildID string, id snowflake.ID) error { ret := _m.Called(guildID, id) + if len(ret) == 0 { + panic("no return value specified for DeleteLogEntry") + } + var r0 error if rf, ok := ret.Get(0).(func(string, snowflake.ID) error); ok { r0 = rf(guildID, id) @@ -338,6 +418,10 @@ func (_m *Database) DeleteLogEntry(guildID string, id snowflake.ID) error { func (_m *Database) DeleteReport(id snowflake.ID) error { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for DeleteReport") + } + var r0 error if rf, ok := ret.Get(0).(func(snowflake.ID) error); ok { r0 = rf(id) @@ -352,6 +436,10 @@ func (_m *Database) DeleteReport(id snowflake.ID) error { func (_m *Database) DeleteTag(id snowflake.ID) error { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for DeleteTag") + } + var r0 error if rf, ok := ret.Get(0).(func(snowflake.ID) error); ok { r0 = rf(id) @@ -366,6 +454,10 @@ func (_m *Database) DeleteTag(id snowflake.ID) error { func (_m *Database) DeleteTwitchNotify(twitchUserID string, guildID string) error { ret := _m.Called(twitchUserID, guildID) + if len(ret) == 0 { + panic("no return value specified for DeleteTwitchNotify") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(twitchUserID, guildID) @@ -380,6 +472,10 @@ func (_m *Database) DeleteTwitchNotify(twitchUserID string, guildID string) erro func (_m *Database) DeleteVote(voteID string) error { ret := _m.Called(voteID) + if len(ret) == 0 { + panic("no return value specified for DeleteVote") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(voteID) @@ -394,6 +490,10 @@ func (_m *Database) DeleteVote(voteID string) error { func (_m *Database) EditTag(_a0 tag.Tag) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for EditTag") + } + var r0 error if rf, ok := ret.Get(0).(func(tag.Tag) error); ok { r0 = rf(_a0) @@ -414,6 +514,10 @@ func (_m *Database) ExpireReports(id ...string) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ExpireReports") + } + var r0 error if rf, ok := ret.Get(0).(func(...string) error); ok { r0 = rf(id...) @@ -428,6 +532,10 @@ func (_m *Database) ExpireReports(id ...string) error { func (_m *Database) FlushAntiraidJoinList(guildID string) error { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for FlushAntiraidJoinList") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(guildID) @@ -442,6 +550,10 @@ func (_m *Database) FlushAntiraidJoinList(guildID string) error { func (_m *Database) FlushGuildData(guildID string) error { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for FlushGuildData") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(guildID) @@ -456,6 +568,10 @@ func (_m *Database) FlushGuildData(guildID string) error { func (_m *Database) FlushUserData(userID string) (map[string]int, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for FlushUserData") + } + var r0 map[string]int var r1 error if rf, ok := ret.Get(0).(func(string) (map[string]int, error)); ok { @@ -482,6 +598,10 @@ func (_m *Database) FlushUserData(userID string) (map[string]int, error) { func (_m *Database) FlushVerificationQueue(guildID string) error { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for FlushVerificationQueue") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(guildID) @@ -496,6 +616,10 @@ func (_m *Database) FlushVerificationQueue(guildID string) error { func (_m *Database) GetAPIToken(userID string) (models.APITokenEntry, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for GetAPIToken") + } + var r0 models.APITokenEntry var r1 error if rf, ok := ret.Get(0).(func(string) (models.APITokenEntry, error)); ok { @@ -520,6 +644,10 @@ func (_m *Database) GetAPIToken(userID string) (models.APITokenEntry, error) { func (_m *Database) GetAllTwitchNotifies(twitchUserID string) ([]twitchnotify.DBEntry, error) { ret := _m.Called(twitchUserID) + if len(ret) == 0 { + panic("no return value specified for GetAllTwitchNotifies") + } + var r0 []twitchnotify.DBEntry var r1 error if rf, ok := ret.Get(0).(func(string) ([]twitchnotify.DBEntry, error)); ok { @@ -546,6 +674,10 @@ func (_m *Database) GetAllTwitchNotifies(twitchUserID string) ([]twitchnotify.DB func (_m *Database) GetAntiraidBurst(guildID string) (int, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetAntiraidBurst") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -570,6 +702,10 @@ func (_m *Database) GetAntiraidBurst(guildID string) (int, error) { func (_m *Database) GetAntiraidJoinList(guildID string) ([]models.JoinLogEntry, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetAntiraidJoinList") + } + var r0 []models.JoinLogEntry var r1 error if rf, ok := ret.Get(0).(func(string) ([]models.JoinLogEntry, error)); ok { @@ -596,6 +732,10 @@ func (_m *Database) GetAntiraidJoinList(guildID string) ([]models.JoinLogEntry, func (_m *Database) GetAntiraidRegeneration(guildID string) (int, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetAntiraidRegeneration") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -620,6 +760,10 @@ func (_m *Database) GetAntiraidRegeneration(guildID string) (int, error) { func (_m *Database) GetAntiraidState(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetAntiraidState") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -644,6 +788,10 @@ func (_m *Database) GetAntiraidState(guildID string) (bool, error) { func (_m *Database) GetAntiraidVerification(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetAntiraidVerification") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -668,6 +816,10 @@ func (_m *Database) GetAntiraidVerification(guildID string) (bool, error) { func (_m *Database) GetBackups(guildID string) ([]backupmodels.Entry, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetBackups") + } + var r0 []backupmodels.Entry var r1 error if rf, ok := ret.Get(0).(func(string) ([]backupmodels.Entry, error)); ok { @@ -694,6 +846,10 @@ func (_m *Database) GetBackups(guildID string) ([]backupmodels.Entry, error) { func (_m *Database) GetBirthdays(guildID string) ([]models.Birthday, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetBirthdays") + } + var r0 []models.Birthday var r1 error if rf, ok := ret.Get(0).(func(string) ([]models.Birthday, error)); ok { @@ -720,6 +876,10 @@ func (_m *Database) GetBirthdays(guildID string) ([]models.Birthday, error) { func (_m *Database) GetExpiredReports() ([]models.Report, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetExpiredReports") + } + var r0 []models.Report var r1 error if rf, ok := ret.Get(0).(func() ([]models.Report, error)); ok { @@ -746,6 +906,10 @@ func (_m *Database) GetExpiredReports() ([]models.Report, error) { func (_m *Database) GetGuildAPI(guildID string) (models.GuildAPISettings, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildAPI") + } + var r0 models.GuildAPISettings var r1 error if rf, ok := ret.Get(0).(func(string) (models.GuildAPISettings, error)); ok { @@ -770,6 +934,10 @@ func (_m *Database) GetGuildAPI(guildID string) (models.GuildAPISettings, error) func (_m *Database) GetGuildAutoRole(guildID string) ([]string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildAutoRole") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -796,6 +964,10 @@ func (_m *Database) GetGuildAutoRole(guildID string) ([]string, error) { func (_m *Database) GetGuildAutoVC(guildID string) ([]string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildAutoVC") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -822,6 +994,10 @@ func (_m *Database) GetGuildAutoVC(guildID string) ([]string, error) { func (_m *Database) GetGuildBackup(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildBackup") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -846,6 +1022,10 @@ func (_m *Database) GetGuildBackup(guildID string) (bool, error) { func (_m *Database) GetGuildBirthdayChan(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildBirthdayChan") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -870,6 +1050,10 @@ func (_m *Database) GetGuildBirthdayChan(guildID string) (string, error) { func (_m *Database) GetGuildCodeExecEnabled(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildCodeExecEnabled") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -894,6 +1078,10 @@ func (_m *Database) GetGuildCodeExecEnabled(guildID string) (bool, error) { func (_m *Database) GetGuildColorReaction(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildColorReaction") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -918,6 +1106,10 @@ func (_m *Database) GetGuildColorReaction(guildID string) (bool, error) { func (_m *Database) GetGuildGhostpingMsg(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildGhostpingMsg") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -942,6 +1134,10 @@ func (_m *Database) GetGuildGhostpingMsg(guildID string) (string, error) { func (_m *Database) GetGuildInviteBlock(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildInviteBlock") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -966,6 +1162,10 @@ func (_m *Database) GetGuildInviteBlock(guildID string) (string, error) { func (_m *Database) GetGuildJdoodleKey(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildJdoodleKey") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -990,6 +1190,10 @@ func (_m *Database) GetGuildJdoodleKey(guildID string) (string, error) { func (_m *Database) GetGuildJoinMsg(guildID string) (string, string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildJoinMsg") + } + var r0 string var r1 string var r2 error @@ -1021,6 +1225,10 @@ func (_m *Database) GetGuildJoinMsg(guildID string) (string, string, error) { func (_m *Database) GetGuildLeaveMsg(guildID string) (string, string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildLeaveMsg") + } + var r0 string var r1 string var r2 error @@ -1052,6 +1260,10 @@ func (_m *Database) GetGuildLeaveMsg(guildID string) (string, string, error) { func (_m *Database) GetGuildLogDisable(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildLogDisable") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -1076,6 +1288,10 @@ func (_m *Database) GetGuildLogDisable(guildID string) (bool, error) { func (_m *Database) GetGuildLogEntries(guildID string, offset int, limit int, severity models.GuildLogSeverity, ascending bool) ([]models.GuildLogEntry, error) { ret := _m.Called(guildID, offset, limit, severity, ascending) + if len(ret) == 0 { + panic("no return value specified for GetGuildLogEntries") + } + var r0 []models.GuildLogEntry var r1 error if rf, ok := ret.Get(0).(func(string, int, int, models.GuildLogSeverity, bool) ([]models.GuildLogEntry, error)); ok { @@ -1102,6 +1318,10 @@ func (_m *Database) GetGuildLogEntries(guildID string, offset int, limit int, se func (_m *Database) GetGuildLogEntriesCount(guildID string, severity models.GuildLogSeverity) (int, error) { ret := _m.Called(guildID, severity) + if len(ret) == 0 { + panic("no return value specified for GetGuildLogEntriesCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, models.GuildLogSeverity) (int, error)); ok { @@ -1126,6 +1346,10 @@ func (_m *Database) GetGuildLogEntriesCount(guildID string, severity models.Guil func (_m *Database) GetGuildModLog(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildModLog") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1150,6 +1374,10 @@ func (_m *Database) GetGuildModLog(guildID string) (string, error) { func (_m *Database) GetGuildModNot(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildModNot") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1174,6 +1402,10 @@ func (_m *Database) GetGuildModNot(guildID string) (string, error) { func (_m *Database) GetGuildNotifyRole(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildNotifyRole") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1198,6 +1430,10 @@ func (_m *Database) GetGuildNotifyRole(guildID string) (string, error) { func (_m *Database) GetGuildPermissions(guildID string) (map[string]permissions.PermissionArray, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildPermissions") + } + var r0 map[string]permissions.PermissionArray var r1 error if rf, ok := ret.Get(0).(func(string) (map[string]permissions.PermissionArray, error)); ok { @@ -1224,6 +1460,10 @@ func (_m *Database) GetGuildPermissions(guildID string) (map[string]permissions. func (_m *Database) GetGuildPrefix(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildPrefix") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1248,6 +1488,10 @@ func (_m *Database) GetGuildPrefix(guildID string) (string, error) { func (_m *Database) GetGuildTags(guildID string) ([]tag.Tag, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildTags") + } + var r0 []tag.Tag var r1 error if rf, ok := ret.Get(0).(func(string) ([]tag.Tag, error)); ok { @@ -1274,6 +1518,10 @@ func (_m *Database) GetGuildTags(guildID string) ([]tag.Tag, error) { func (_m *Database) GetGuildUnbanRequests(guildID string, limit int, offset int) ([]models.UnbanRequest, error) { ret := _m.Called(guildID, limit, offset) + if len(ret) == 0 { + panic("no return value specified for GetGuildUnbanRequests") + } + var r0 []models.UnbanRequest var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]models.UnbanRequest, error)); ok { @@ -1300,6 +1548,10 @@ func (_m *Database) GetGuildUnbanRequests(guildID string, limit int, offset int) func (_m *Database) GetGuildUnbanRequestsCount(guildID string, state *models.UnbanRequestState) (int, error) { ret := _m.Called(guildID, state) + if len(ret) == 0 { + panic("no return value specified for GetGuildUnbanRequestsCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, *models.UnbanRequestState) (int, error)); ok { @@ -1324,6 +1576,10 @@ func (_m *Database) GetGuildUnbanRequestsCount(guildID string, state *models.Unb func (_m *Database) GetGuildUserUnbanRequests(userID string, guildID string) ([]models.UnbanRequest, error) { ret := _m.Called(userID, guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildUserUnbanRequests") + } + var r0 []models.UnbanRequest var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]models.UnbanRequest, error)); ok { @@ -1350,6 +1606,10 @@ func (_m *Database) GetGuildUserUnbanRequests(userID string, guildID string) ([] func (_m *Database) GetGuildVerificationRequired(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildVerificationRequired") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -1374,6 +1634,10 @@ func (_m *Database) GetGuildVerificationRequired(guildID string) (bool, error) { func (_m *Database) GetGuildVoiceLog(guildID string) (string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildVoiceLog") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1398,6 +1662,10 @@ func (_m *Database) GetGuildVoiceLog(guildID string) (string, error) { func (_m *Database) GetGuildVoiceLogIgnores(guildID string) ([]string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetGuildVoiceLogIgnores") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -1424,6 +1692,10 @@ func (_m *Database) GetGuildVoiceLogIgnores(guildID string) ([]string, error) { func (_m *Database) GetGuilds() ([]string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetGuilds") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func() ([]string, error)); ok { @@ -1450,6 +1722,10 @@ func (_m *Database) GetGuilds() ([]string, error) { func (_m *Database) GetKarma(userID string, guildID string) (int, error) { ret := _m.Called(userID, guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarma") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, string) (int, error)); ok { @@ -1474,6 +1750,10 @@ func (_m *Database) GetKarma(userID string, guildID string) (int, error) { func (_m *Database) GetKarmaBlockList(guildID string) ([]string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaBlockList") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -1500,6 +1780,10 @@ func (_m *Database) GetKarmaBlockList(guildID string) ([]string, error) { func (_m *Database) GetKarmaEmotes(guildID string) (string, string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaEmotes") + } + var r0 string var r1 string var r2 error @@ -1531,6 +1815,10 @@ func (_m *Database) GetKarmaEmotes(guildID string) (string, string, error) { func (_m *Database) GetKarmaGuild(guildID string, limit int) ([]models.GuildKarma, error) { ret := _m.Called(guildID, limit) + if len(ret) == 0 { + panic("no return value specified for GetKarmaGuild") + } + var r0 []models.GuildKarma var r1 error if rf, ok := ret.Get(0).(func(string, int) ([]models.GuildKarma, error)); ok { @@ -1557,6 +1845,10 @@ func (_m *Database) GetKarmaGuild(guildID string, limit int) ([]models.GuildKarm func (_m *Database) GetKarmaPenalty(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaPenalty") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -1581,6 +1873,10 @@ func (_m *Database) GetKarmaPenalty(guildID string) (bool, error) { func (_m *Database) GetKarmaRules(guildID string) ([]models.KarmaRule, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaRules") + } + var r0 []models.KarmaRule var r1 error if rf, ok := ret.Get(0).(func(string) ([]models.KarmaRule, error)); ok { @@ -1607,6 +1903,10 @@ func (_m *Database) GetKarmaRules(guildID string) ([]models.KarmaRule, error) { func (_m *Database) GetKarmaState(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaState") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -1631,6 +1931,10 @@ func (_m *Database) GetKarmaState(guildID string) (bool, error) { func (_m *Database) GetKarmaSum(userID string) (int, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaSum") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -1655,6 +1959,10 @@ func (_m *Database) GetKarmaSum(userID string) (int, error) { func (_m *Database) GetKarmaTokens(guildID string) (int, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetKarmaTokens") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -1679,6 +1987,10 @@ func (_m *Database) GetKarmaTokens(guildID string) (int, error) { func (_m *Database) GetLockChan(chanID string) (string, string, string, error) { ret := _m.Called(chanID) + if len(ret) == 0 { + panic("no return value specified for GetLockChan") + } + var r0 string var r1 string var r2 string @@ -1717,6 +2029,10 @@ func (_m *Database) GetLockChan(chanID string) (string, string, string, error) { func (_m *Database) GetLockChannels(guildID string) ([]string, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetLockChannels") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -1743,6 +2059,10 @@ func (_m *Database) GetLockChannels(guildID string) ([]string, error) { func (_m *Database) GetReport(id snowflake.ID) (models.Report, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetReport") + } + var r0 models.Report var r1 error if rf, ok := ret.Get(0).(func(snowflake.ID) (models.Report, error)); ok { @@ -1767,6 +2087,10 @@ func (_m *Database) GetReport(id snowflake.ID) (models.Report, error) { func (_m *Database) GetReportsFiltered(guildID string, memberID string, repType models.ReportType, offset int, limit int) ([]models.Report, error) { ret := _m.Called(guildID, memberID, repType, offset, limit) + if len(ret) == 0 { + panic("no return value specified for GetReportsFiltered") + } + var r0 []models.Report var r1 error if rf, ok := ret.Get(0).(func(string, string, models.ReportType, int, int) ([]models.Report, error)); ok { @@ -1793,6 +2117,10 @@ func (_m *Database) GetReportsFiltered(guildID string, memberID string, repType func (_m *Database) GetReportsFilteredCount(guildID string, memberID string, repType int) (int, error) { ret := _m.Called(guildID, memberID, repType) + if len(ret) == 0 { + panic("no return value specified for GetReportsFilteredCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string, string, int) (int, error)); ok { @@ -1817,6 +2145,10 @@ func (_m *Database) GetReportsFilteredCount(guildID string, memberID string, rep func (_m *Database) GetReportsGuild(guildID string, offset int, limit int) ([]models.Report, error) { ret := _m.Called(guildID, offset, limit) + if len(ret) == 0 { + panic("no return value specified for GetReportsGuild") + } + var r0 []models.Report var r1 error if rf, ok := ret.Get(0).(func(string, int, int) ([]models.Report, error)); ok { @@ -1843,6 +2175,10 @@ func (_m *Database) GetReportsGuild(guildID string, offset int, limit int) ([]mo func (_m *Database) GetReportsGuildCount(guildID string) (int, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetReportsGuildCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -1867,6 +2203,10 @@ func (_m *Database) GetReportsGuildCount(guildID string) (int, error) { func (_m *Database) GetRoleSelects() ([]models.RoleSelect, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRoleSelects") + } + var r0 []models.RoleSelect var r1 error if rf, ok := ret.Get(0).(func() ([]models.RoleSelect, error)); ok { @@ -1893,6 +2233,10 @@ func (_m *Database) GetRoleSelects() ([]models.RoleSelect, error) { func (_m *Database) GetSetting(setting string) (string, error) { ret := _m.Called(setting) + if len(ret) == 0 { + panic("no return value specified for GetSetting") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -1917,6 +2261,10 @@ func (_m *Database) GetSetting(setting string) (string, error) { func (_m *Database) GetStarboardConfig(guildID string) (models.StarboardConfig, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetStarboardConfig") + } + var r0 models.StarboardConfig var r1 error if rf, ok := ret.Get(0).(func(string) (models.StarboardConfig, error)); ok { @@ -1941,6 +2289,10 @@ func (_m *Database) GetStarboardConfig(guildID string) (models.StarboardConfig, func (_m *Database) GetStarboardEntries(guildID string, sortBy models.StarboardSortBy, limit int, offset int) ([]models.StarboardEntry, error) { ret := _m.Called(guildID, sortBy, limit, offset) + if len(ret) == 0 { + panic("no return value specified for GetStarboardEntries") + } + var r0 []models.StarboardEntry var r1 error if rf, ok := ret.Get(0).(func(string, models.StarboardSortBy, int, int) ([]models.StarboardEntry, error)); ok { @@ -1967,6 +2319,10 @@ func (_m *Database) GetStarboardEntries(guildID string, sortBy models.StarboardS func (_m *Database) GetStarboardEntriesCount(guildID string) (int, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetStarboardEntriesCount") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(string) (int, error)); ok { @@ -1991,6 +2347,10 @@ func (_m *Database) GetStarboardEntriesCount(guildID string) (int, error) { func (_m *Database) GetStarboardEntry(messageID string) (models.StarboardEntry, error) { ret := _m.Called(messageID) + if len(ret) == 0 { + panic("no return value specified for GetStarboardEntry") + } + var r0 models.StarboardEntry var r1 error if rf, ok := ret.Get(0).(func(string) (models.StarboardEntry, error)); ok { @@ -2015,6 +2375,10 @@ func (_m *Database) GetStarboardEntry(messageID string) (models.StarboardEntry, func (_m *Database) GetTagByID(id snowflake.ID) (tag.Tag, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetTagByID") + } + var r0 tag.Tag var r1 error if rf, ok := ret.Get(0).(func(snowflake.ID) (tag.Tag, error)); ok { @@ -2039,6 +2403,10 @@ func (_m *Database) GetTagByID(id snowflake.ID) (tag.Tag, error) { func (_m *Database) GetTagByIdent(ident string, guildID string) (tag.Tag, error) { ret := _m.Called(ident, guildID) + if len(ret) == 0 { + panic("no return value specified for GetTagByIdent") + } + var r0 tag.Tag var r1 error if rf, ok := ret.Get(0).(func(string, string) (tag.Tag, error)); ok { @@ -2063,6 +2431,10 @@ func (_m *Database) GetTagByIdent(ident string, guildID string) (tag.Tag, error) func (_m *Database) GetTwitchNotify(twitchUserID string, guildID string) (twitchnotify.DBEntry, error) { ret := _m.Called(twitchUserID, guildID) + if len(ret) == 0 { + panic("no return value specified for GetTwitchNotify") + } + var r0 twitchnotify.DBEntry var r1 error if rf, ok := ret.Get(0).(func(string, string) (twitchnotify.DBEntry, error)); ok { @@ -2087,6 +2459,10 @@ func (_m *Database) GetTwitchNotify(twitchUserID string, guildID string) (twitch func (_m *Database) GetUnbanRequest(id string) (models.UnbanRequest, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetUnbanRequest") + } + var r0 models.UnbanRequest var r1 error if rf, ok := ret.Get(0).(func(string) (models.UnbanRequest, error)); ok { @@ -2111,6 +2487,10 @@ func (_m *Database) GetUnbanRequest(id string) (models.UnbanRequest, error) { func (_m *Database) GetUserByRefreshToken(token string) (string, time.Time, error) { ret := _m.Called(token) + if len(ret) == 0 { + panic("no return value specified for GetUserByRefreshToken") + } + var r0 string var r1 time.Time var r2 error @@ -2142,6 +2522,10 @@ func (_m *Database) GetUserByRefreshToken(token string) (string, time.Time, erro func (_m *Database) GetUserOTAEnabled(userID string) (bool, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for GetUserOTAEnabled") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -2166,6 +2550,10 @@ func (_m *Database) GetUserOTAEnabled(userID string) (bool, error) { func (_m *Database) GetUserStarboardOptout(userID string) (bool, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for GetUserStarboardOptout") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -2190,6 +2578,10 @@ func (_m *Database) GetUserStarboardOptout(userID string) (bool, error) { func (_m *Database) GetUserVerified(userID string) (bool, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for GetUserVerified") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -2214,6 +2606,10 @@ func (_m *Database) GetUserVerified(userID string) (bool, error) { func (_m *Database) GetVerificationQueue(guildID string, userID string) ([]models.VerificationQueueEntry, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for GetVerificationQueue") + } + var r0 []models.VerificationQueueEntry var r1 error if rf, ok := ret.Get(0).(func(string, string) ([]models.VerificationQueueEntry, error)); ok { @@ -2240,6 +2636,10 @@ func (_m *Database) GetVerificationQueue(guildID string, userID string) ([]model func (_m *Database) GetVotes() (map[string]vote.Vote, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetVotes") + } + var r0 map[string]vote.Vote var r1 error if rf, ok := ret.Get(0).(func() (map[string]vote.Vote, error)); ok { @@ -2266,6 +2666,10 @@ func (_m *Database) GetVotes() (map[string]vote.Vote, error) { func (_m *Database) IsGuildVoiceLogIgnored(guildID string, channelID string) (bool, error) { ret := _m.Called(guildID, channelID) + if len(ret) == 0 { + panic("no return value specified for IsGuildVoiceLogIgnored") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -2290,6 +2694,10 @@ func (_m *Database) IsGuildVoiceLogIgnored(guildID string, channelID string) (bo func (_m *Database) IsKarmaBlockListed(guildID string, userID string) (bool, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for IsKarmaBlockListed") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -2314,6 +2722,10 @@ func (_m *Database) IsKarmaBlockListed(guildID string, userID string) (bool, err func (_m *Database) RemoveAntiraidJoinList(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for RemoveAntiraidJoinList") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -2328,6 +2740,10 @@ func (_m *Database) RemoveAntiraidJoinList(guildID string, userID string) error func (_m *Database) RemoveGuildVoiceLogIgnore(guildID string, channelID string) error { ret := _m.Called(guildID, channelID) + if len(ret) == 0 { + panic("no return value specified for RemoveGuildVoiceLogIgnore") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, channelID) @@ -2342,6 +2758,10 @@ func (_m *Database) RemoveGuildVoiceLogIgnore(guildID string, channelID string) func (_m *Database) RemoveKarmaBlockList(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for RemoveKarmaBlockList") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -2356,6 +2776,10 @@ func (_m *Database) RemoveKarmaBlockList(guildID string, userID string) error { func (_m *Database) RemoveKarmaRule(guildID string, id snowflake.ID) error { ret := _m.Called(guildID, id) + if len(ret) == 0 { + panic("no return value specified for RemoveKarmaRule") + } + var r0 error if rf, ok := ret.Get(0).(func(string, snowflake.ID) error); ok { r0 = rf(guildID, id) @@ -2370,6 +2794,10 @@ func (_m *Database) RemoveKarmaRule(guildID string, id snowflake.ID) error { func (_m *Database) RemoveRoleSelect(guildID string, channelID string, messageID string) error { ret := _m.Called(guildID, channelID, messageID) + if len(ret) == 0 { + panic("no return value specified for RemoveRoleSelect") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(guildID, channelID, messageID) @@ -2384,6 +2812,10 @@ func (_m *Database) RemoveRoleSelect(guildID string, channelID string, messageID func (_m *Database) RemoveStarboardEntry(msgID string) error { ret := _m.Called(msgID) + if len(ret) == 0 { + panic("no return value specified for RemoveStarboardEntry") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(msgID) @@ -2398,6 +2830,10 @@ func (_m *Database) RemoveStarboardEntry(msgID string) error { func (_m *Database) RemoveVerificationQueue(guildID string, userID string) (bool, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for RemoveVerificationQueue") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -2422,6 +2858,10 @@ func (_m *Database) RemoveVerificationQueue(guildID string, userID string) (bool func (_m *Database) RevokeUserRefreshToken(userID string) error { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for RevokeUserRefreshToken") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -2436,6 +2876,10 @@ func (_m *Database) RevokeUserRefreshToken(userID string) error { func (_m *Database) SetAPIToken(token models.APITokenEntry) error { ret := _m.Called(token) + if len(ret) == 0 { + panic("no return value specified for SetAPIToken") + } + var r0 error if rf, ok := ret.Get(0).(func(models.APITokenEntry) error); ok { r0 = rf(token) @@ -2450,6 +2894,10 @@ func (_m *Database) SetAPIToken(token models.APITokenEntry) error { func (_m *Database) SetAntiraidBurst(guildID string, burst int) error { ret := _m.Called(guildID, burst) + if len(ret) == 0 { + panic("no return value specified for SetAntiraidBurst") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(guildID, burst) @@ -2464,6 +2912,10 @@ func (_m *Database) SetAntiraidBurst(guildID string, burst int) error { func (_m *Database) SetAntiraidRegeneration(guildID string, periodSecs int) error { ret := _m.Called(guildID, periodSecs) + if len(ret) == 0 { + panic("no return value specified for SetAntiraidRegeneration") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(guildID, periodSecs) @@ -2478,6 +2930,10 @@ func (_m *Database) SetAntiraidRegeneration(guildID string, periodSecs int) erro func (_m *Database) SetAntiraidState(guildID string, state bool) error { ret := _m.Called(guildID, state) + if len(ret) == 0 { + panic("no return value specified for SetAntiraidState") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, state) @@ -2492,6 +2948,10 @@ func (_m *Database) SetAntiraidState(guildID string, state bool) error { func (_m *Database) SetAntiraidVerification(guildID string, state bool) error { ret := _m.Called(guildID, state) + if len(ret) == 0 { + panic("no return value specified for SetAntiraidVerification") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, state) @@ -2506,6 +2966,10 @@ func (_m *Database) SetAntiraidVerification(guildID string, state bool) error { func (_m *Database) SetBirthday(m models.Birthday) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SetBirthday") + } + var r0 error if rf, ok := ret.Get(0).(func(models.Birthday) error); ok { r0 = rf(m) @@ -2520,6 +2984,10 @@ func (_m *Database) SetBirthday(m models.Birthday) error { func (_m *Database) SetGuildAPI(guildID string, settings models.GuildAPISettings) error { ret := _m.Called(guildID, settings) + if len(ret) == 0 { + panic("no return value specified for SetGuildAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(string, models.GuildAPISettings) error); ok { r0 = rf(guildID, settings) @@ -2534,6 +3002,10 @@ func (_m *Database) SetGuildAPI(guildID string, settings models.GuildAPISettings func (_m *Database) SetGuildAutoRole(guildID string, autoRoleIDs []string) error { ret := _m.Called(guildID, autoRoleIDs) + if len(ret) == 0 { + panic("no return value specified for SetGuildAutoRole") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(guildID, autoRoleIDs) @@ -2548,6 +3020,10 @@ func (_m *Database) SetGuildAutoRole(guildID string, autoRoleIDs []string) error func (_m *Database) SetGuildAutoVC(guildID string, autoVCIDs []string) error { ret := _m.Called(guildID, autoVCIDs) + if len(ret) == 0 { + panic("no return value specified for SetGuildAutoVC") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []string) error); ok { r0 = rf(guildID, autoVCIDs) @@ -2562,6 +3038,10 @@ func (_m *Database) SetGuildAutoVC(guildID string, autoVCIDs []string) error { func (_m *Database) SetGuildBackup(guildID string, enabled bool) error { ret := _m.Called(guildID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetGuildBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enabled) @@ -2576,6 +3056,10 @@ func (_m *Database) SetGuildBackup(guildID string, enabled bool) error { func (_m *Database) SetGuildBirthdayChan(guildID string, chanID string) error { ret := _m.Called(guildID, chanID) + if len(ret) == 0 { + panic("no return value specified for SetGuildBirthdayChan") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, chanID) @@ -2590,6 +3074,10 @@ func (_m *Database) SetGuildBirthdayChan(guildID string, chanID string) error { func (_m *Database) SetGuildCodeExecEnabled(guildID string, enabled bool) error { ret := _m.Called(guildID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetGuildCodeExecEnabled") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enabled) @@ -2604,6 +3092,10 @@ func (_m *Database) SetGuildCodeExecEnabled(guildID string, enabled bool) error func (_m *Database) SetGuildColorReaction(guildID string, enable bool) error { ret := _m.Called(guildID, enable) + if len(ret) == 0 { + panic("no return value specified for SetGuildColorReaction") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enable) @@ -2618,6 +3110,10 @@ func (_m *Database) SetGuildColorReaction(guildID string, enable bool) error { func (_m *Database) SetGuildGhostpingMsg(guildID string, msg string) error { ret := _m.Called(guildID, msg) + if len(ret) == 0 { + panic("no return value specified for SetGuildGhostpingMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, msg) @@ -2632,6 +3128,10 @@ func (_m *Database) SetGuildGhostpingMsg(guildID string, msg string) error { func (_m *Database) SetGuildInviteBlock(guildID string, data string) error { ret := _m.Called(guildID, data) + if len(ret) == 0 { + panic("no return value specified for SetGuildInviteBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, data) @@ -2646,6 +3146,10 @@ func (_m *Database) SetGuildInviteBlock(guildID string, data string) error { func (_m *Database) SetGuildJdoodleKey(guildID string, key string) error { ret := _m.Called(guildID, key) + if len(ret) == 0 { + panic("no return value specified for SetGuildJdoodleKey") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, key) @@ -2660,6 +3164,10 @@ func (_m *Database) SetGuildJdoodleKey(guildID string, key string) error { func (_m *Database) SetGuildJoinMsg(guildID string, channelID string, msg string) error { ret := _m.Called(guildID, channelID, msg) + if len(ret) == 0 { + panic("no return value specified for SetGuildJoinMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(guildID, channelID, msg) @@ -2674,6 +3182,10 @@ func (_m *Database) SetGuildJoinMsg(guildID string, channelID string, msg string func (_m *Database) SetGuildLeaveMsg(guildID string, channelID string, msg string) error { ret := _m.Called(guildID, channelID, msg) + if len(ret) == 0 { + panic("no return value specified for SetGuildLeaveMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(guildID, channelID, msg) @@ -2688,6 +3200,10 @@ func (_m *Database) SetGuildLeaveMsg(guildID string, channelID string, msg strin func (_m *Database) SetGuildLogDisable(guildID string, enabled bool) error { ret := _m.Called(guildID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetGuildLogDisable") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enabled) @@ -2702,6 +3218,10 @@ func (_m *Database) SetGuildLogDisable(guildID string, enabled bool) error { func (_m *Database) SetGuildModLog(guildID string, chanID string) error { ret := _m.Called(guildID, chanID) + if len(ret) == 0 { + panic("no return value specified for SetGuildModLog") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, chanID) @@ -2716,6 +3236,10 @@ func (_m *Database) SetGuildModLog(guildID string, chanID string) error { func (_m *Database) SetGuildModNot(guildID string, chanID string) error { ret := _m.Called(guildID, chanID) + if len(ret) == 0 { + panic("no return value specified for SetGuildModNot") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, chanID) @@ -2730,6 +3254,10 @@ func (_m *Database) SetGuildModNot(guildID string, chanID string) error { func (_m *Database) SetGuildNotifyRole(guildID string, roleID string) error { ret := _m.Called(guildID, roleID) + if len(ret) == 0 { + panic("no return value specified for SetGuildNotifyRole") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, roleID) @@ -2744,6 +3272,10 @@ func (_m *Database) SetGuildNotifyRole(guildID string, roleID string) error { func (_m *Database) SetGuildPrefix(guildID string, newPrefix string) error { ret := _m.Called(guildID, newPrefix) + if len(ret) == 0 { + panic("no return value specified for SetGuildPrefix") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, newPrefix) @@ -2758,6 +3290,10 @@ func (_m *Database) SetGuildPrefix(guildID string, newPrefix string) error { func (_m *Database) SetGuildRolePermission(guildID string, roleID string, p permissions.PermissionArray) error { ret := _m.Called(guildID, roleID, p) + if len(ret) == 0 { + panic("no return value specified for SetGuildRolePermission") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, permissions.PermissionArray) error); ok { r0 = rf(guildID, roleID, p) @@ -2772,6 +3308,10 @@ func (_m *Database) SetGuildRolePermission(guildID string, roleID string, p perm func (_m *Database) SetGuildVerificationRequired(guildID string, enable bool) error { ret := _m.Called(guildID, enable) + if len(ret) == 0 { + panic("no return value specified for SetGuildVerificationRequired") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enable) @@ -2786,6 +3326,10 @@ func (_m *Database) SetGuildVerificationRequired(guildID string, enable bool) er func (_m *Database) SetGuildVoiceLog(guildID string, chanID string) error { ret := _m.Called(guildID, chanID) + if len(ret) == 0 { + panic("no return value specified for SetGuildVoiceLog") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, chanID) @@ -2800,6 +3344,10 @@ func (_m *Database) SetGuildVoiceLog(guildID string, chanID string) error { func (_m *Database) SetGuildVoiceLogIngore(guildID string, channelID string) error { ret := _m.Called(guildID, channelID) + if len(ret) == 0 { + panic("no return value specified for SetGuildVoiceLogIngore") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, channelID) @@ -2814,6 +3362,10 @@ func (_m *Database) SetGuildVoiceLogIngore(guildID string, channelID string) err func (_m *Database) SetKarma(userID string, guildID string, val int) error { ret := _m.Called(userID, guildID, val) + if len(ret) == 0 { + panic("no return value specified for SetKarma") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int) error); ok { r0 = rf(userID, guildID, val) @@ -2828,6 +3380,10 @@ func (_m *Database) SetKarma(userID string, guildID string, val int) error { func (_m *Database) SetKarmaEmotes(guildID string, emotesInc string, emotesDec string) error { ret := _m.Called(guildID, emotesInc, emotesDec) + if len(ret) == 0 { + panic("no return value specified for SetKarmaEmotes") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string) error); ok { r0 = rf(guildID, emotesInc, emotesDec) @@ -2842,6 +3398,10 @@ func (_m *Database) SetKarmaEmotes(guildID string, emotesInc string, emotesDec s func (_m *Database) SetKarmaPenalty(guildID string, state bool) error { ret := _m.Called(guildID, state) + if len(ret) == 0 { + panic("no return value specified for SetKarmaPenalty") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, state) @@ -2856,6 +3416,10 @@ func (_m *Database) SetKarmaPenalty(guildID string, state bool) error { func (_m *Database) SetKarmaState(guildID string, state bool) error { ret := _m.Called(guildID, state) + if len(ret) == 0 { + panic("no return value specified for SetKarmaState") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, state) @@ -2870,6 +3434,10 @@ func (_m *Database) SetKarmaState(guildID string, state bool) error { func (_m *Database) SetKarmaTokens(guildID string, tokens int) error { ret := _m.Called(guildID, tokens) + if len(ret) == 0 { + panic("no return value specified for SetKarmaTokens") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(guildID, tokens) @@ -2884,6 +3452,10 @@ func (_m *Database) SetKarmaTokens(guildID string, tokens int) error { func (_m *Database) SetLockChan(chanID string, guildID string, executorID string, _a3 string) error { ret := _m.Called(chanID, guildID, executorID, _a3) + if len(ret) == 0 { + panic("no return value specified for SetLockChan") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string) error); ok { r0 = rf(chanID, guildID, executorID, _a3) @@ -2898,6 +3470,10 @@ func (_m *Database) SetLockChan(chanID string, guildID string, executorID string func (_m *Database) SetSetting(setting string, value string) error { ret := _m.Called(setting, value) + if len(ret) == 0 { + panic("no return value specified for SetSetting") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(setting, value) @@ -2912,6 +3488,10 @@ func (_m *Database) SetSetting(setting string, value string) error { func (_m *Database) SetStarboardConfig(config models.StarboardConfig) error { ret := _m.Called(config) + if len(ret) == 0 { + panic("no return value specified for SetStarboardConfig") + } + var r0 error if rf, ok := ret.Get(0).(func(models.StarboardConfig) error); ok { r0 = rf(config) @@ -2926,6 +3506,10 @@ func (_m *Database) SetStarboardConfig(config models.StarboardConfig) error { func (_m *Database) SetStarboardEntry(e models.StarboardEntry) error { ret := _m.Called(e) + if len(ret) == 0 { + panic("no return value specified for SetStarboardEntry") + } + var r0 error if rf, ok := ret.Get(0).(func(models.StarboardEntry) error); ok { r0 = rf(e) @@ -2940,6 +3524,10 @@ func (_m *Database) SetStarboardEntry(e models.StarboardEntry) error { func (_m *Database) SetTwitchNotify(twitchNotify twitchnotify.DBEntry) error { ret := _m.Called(twitchNotify) + if len(ret) == 0 { + panic("no return value specified for SetTwitchNotify") + } + var r0 error if rf, ok := ret.Get(0).(func(twitchnotify.DBEntry) error); ok { r0 = rf(twitchNotify) @@ -2954,6 +3542,10 @@ func (_m *Database) SetTwitchNotify(twitchNotify twitchnotify.DBEntry) error { func (_m *Database) SetUserOTAEnabled(userID string, enabled bool) error { ret := _m.Called(userID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetUserOTAEnabled") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(userID, enabled) @@ -2968,6 +3560,10 @@ func (_m *Database) SetUserOTAEnabled(userID string, enabled bool) error { func (_m *Database) SetUserRefreshToken(userID string, token string, expires time.Time) error { ret := _m.Called(userID, token, expires) + if len(ret) == 0 { + panic("no return value specified for SetUserRefreshToken") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, time.Time) error); ok { r0 = rf(userID, token, expires) @@ -2982,6 +3578,10 @@ func (_m *Database) SetUserRefreshToken(userID string, token string, expires tim func (_m *Database) SetUserStarboardOptout(userID string, enabled bool) error { ret := _m.Called(userID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetUserStarboardOptout") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(userID, enabled) @@ -2996,6 +3596,10 @@ func (_m *Database) SetUserStarboardOptout(userID string, enabled bool) error { func (_m *Database) SetUserVerified(userID string, enabled bool) error { ret := _m.Called(userID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetUserVerified") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(userID, enabled) @@ -3010,6 +3614,10 @@ func (_m *Database) SetUserVerified(userID string, enabled bool) error { func (_m *Database) Status() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -3024,6 +3632,10 @@ func (_m *Database) Status() error { func (_m *Database) UpdateKarma(userID string, guildID string, diff int) error { ret := _m.Called(userID, guildID, diff) + if len(ret) == 0 { + panic("no return value specified for UpdateKarma") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int) error); ok { r0 = rf(userID, guildID, diff) @@ -3038,6 +3650,10 @@ func (_m *Database) UpdateKarma(userID string, guildID string, diff int) error { func (_m *Database) UpdateUnbanRequest(request models.UnbanRequest) error { ret := _m.Called(request) + if len(ret) == 0 { + panic("no return value specified for UpdateUnbanRequest") + } + var r0 error if rf, ok := ret.Get(0).(func(models.UnbanRequest) error); ok { r0 = rf(request) @@ -3048,13 +3664,12 @@ func (_m *Database) UpdateUnbanRequest(request models.UnbanRequest) error { return r0 } -type mockConstructorTestingTNewDatabase interface { +// NewDatabase creates a new instance of Database. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewDatabase(t interface { mock.TestingT Cleanup(func()) -} - -// NewDatabase creates a new instance of Database. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDatabase(t mockConstructorTestingTNewDatabase) *Database { +}) *Database { mock := &Database{} mock.Mock.Test(t) diff --git a/mocks/IKen.go b/mocks/IKen.go index 35fa3a90..b18d5ee9 100644 --- a/mocks/IKen.go +++ b/mocks/IKen.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type IKen struct { func (_m *IKen) Components() *ken.ComponentHandler { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Components") + } + var r0 *ken.ComponentHandler if rf, ok := ret.Get(0).(func() *ken.ComponentHandler); ok { r0 = rf() @@ -40,6 +44,10 @@ func (_m *IKen) GetCommandInfo(keyTransformer ...ken.KeyTransformerFunc) ken.Com _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetCommandInfo") + } + var r0 ken.CommandInfoList if rf, ok := ret.Get(0).(func(...ken.KeyTransformerFunc) ken.CommandInfoList); ok { r0 = rf(keyTransformer...) @@ -62,6 +70,10 @@ func (_m *IKen) RegisterCommands(cmds ...ken.Command) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RegisterCommands") + } + var r0 error if rf, ok := ret.Get(0).(func(...ken.Command) error); ok { r0 = rf(cmds...) @@ -78,6 +90,10 @@ func (_m *IKen) RegisterMiddlewares(mws ...interface{}) error { _ca = append(_ca, mws...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RegisterMiddlewares") + } + var r0 error if rf, ok := ret.Get(0).(func(...interface{}) error); ok { r0 = rf(mws...) @@ -92,6 +108,10 @@ func (_m *IKen) RegisterMiddlewares(mws ...interface{}) error { func (_m *IKen) Session() *discordgo.Session { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Session") + } + var r0 *discordgo.Session if rf, ok := ret.Get(0).(func() *discordgo.Session); ok { r0 = rf() @@ -108,6 +128,10 @@ func (_m *IKen) Session() *discordgo.Session { func (_m *IKen) Unregister() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Unregister") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -118,13 +142,12 @@ func (_m *IKen) Unregister() error { return r0 } -type mockConstructorTestingTNewIKen interface { +// NewIKen creates a new instance of IKen. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewIKen(t interface { mock.TestingT Cleanup(func()) -} - -// NewIKen creates a new instance of IKen. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIKen(t mockConstructorTestingTNewIKen) *IKen { +}) *IKen { mock := &IKen{} mock.Mock.Test(t) diff --git a/mocks/ISession.go b/mocks/ISession.go index 1c56f13f..51f09bd3 100644 --- a/mocks/ISession.go +++ b/mocks/ISession.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -23,6 +23,10 @@ type ISession struct { func (_m *ISession) AddHandler(handler interface{}) func() { ret := _m.Called(handler) + if len(ret) == 0 { + panic("no return value specified for AddHandler") + } + var r0 func() if rf, ok := ret.Get(0).(func(interface{}) func()); ok { r0 = rf(handler) @@ -39,6 +43,10 @@ func (_m *ISession) AddHandler(handler interface{}) func() { func (_m *ISession) AddHandlerOnce(handler interface{}) func() { ret := _m.Called(handler) + if len(ret) == 0 { + panic("no return value specified for AddHandlerOnce") + } + var r0 func() if rf, ok := ret.Get(0).(func(interface{}) func()); ok { r0 = rf(handler) @@ -55,6 +63,10 @@ func (_m *ISession) AddHandlerOnce(handler interface{}) func() { func (_m *ISession) Application(appID string) (*discordgo.Application, error) { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for Application") + } + var r0 *discordgo.Application var r1 error if rf, ok := ret.Get(0).(func(string) (*discordgo.Application, error)); ok { @@ -81,6 +93,10 @@ func (_m *ISession) Application(appID string) (*discordgo.Application, error) { func (_m *ISession) ApplicationAssets(appID string) ([]*discordgo.Asset, error) { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for ApplicationAssets") + } + var r0 []*discordgo.Asset var r1 error if rf, ok := ret.Get(0).(func(string) ([]*discordgo.Asset, error)); ok { @@ -107,6 +123,10 @@ func (_m *ISession) ApplicationAssets(appID string) ([]*discordgo.Asset, error) func (_m *ISession) ApplicationBotCreate(appID string) (*discordgo.User, error) { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for ApplicationBotCreate") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(string) (*discordgo.User, error)); ok { @@ -140,6 +160,10 @@ func (_m *ISession) ApplicationCommand(appID string, guildID string, cmdID strin _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommand") + } + var r0 *discordgo.ApplicationCommand var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.ApplicationCommand, error)); ok { @@ -173,6 +197,10 @@ func (_m *ISession) ApplicationCommandBulkOverwrite(appID string, guildID string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandBulkOverwrite") + } + var r0 []*discordgo.ApplicationCommand var r1 error if rf, ok := ret.Get(0).(func(string, string, []*discordgo.ApplicationCommand, ...discordgo.RequestOption) ([]*discordgo.ApplicationCommand, error)); ok { @@ -206,6 +234,10 @@ func (_m *ISession) ApplicationCommandCreate(appID string, guildID string, cmd * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandCreate") + } + var r0 *discordgo.ApplicationCommand var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.ApplicationCommand, ...discordgo.RequestOption) (*discordgo.ApplicationCommand, error)); ok { @@ -239,6 +271,10 @@ func (_m *ISession) ApplicationCommandDelete(appID string, guildID string, cmdID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(appID, guildID, cmdID, options...) @@ -260,6 +296,10 @@ func (_m *ISession) ApplicationCommandEdit(appID string, guildID string, cmdID s _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandEdit") + } + var r0 *discordgo.ApplicationCommand var r1 error if rf, ok := ret.Get(0).(func(string, string, string, *discordgo.ApplicationCommand, ...discordgo.RequestOption) (*discordgo.ApplicationCommand, error)); ok { @@ -293,6 +333,10 @@ func (_m *ISession) ApplicationCommandPermissions(appID string, guildID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandPermissions") + } + var r0 *discordgo.GuildApplicationCommandPermissions var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.GuildApplicationCommandPermissions, error)); ok { @@ -326,6 +370,10 @@ func (_m *ISession) ApplicationCommandPermissionsBatchEdit(appID string, guildID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandPermissionsBatchEdit") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, []*discordgo.GuildApplicationCommandPermissions, ...discordgo.RequestOption) error); ok { r0 = rf(appID, guildID, permissions, options...) @@ -347,6 +395,10 @@ func (_m *ISession) ApplicationCommandPermissionsEdit(appID string, guildID stri _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommandPermissionsEdit") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, *discordgo.ApplicationCommandPermissionsList, ...discordgo.RequestOption) error); ok { r0 = rf(appID, guildID, cmdID, permissions, options...) @@ -368,6 +420,10 @@ func (_m *ISession) ApplicationCommands(appID string, guildID string, options .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ApplicationCommands") + } + var r0 []*discordgo.ApplicationCommand var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) ([]*discordgo.ApplicationCommand, error)); ok { @@ -394,6 +450,10 @@ func (_m *ISession) ApplicationCommands(appID string, guildID string, options .. func (_m *ISession) ApplicationCreate(ap *discordgo.Application) (*discordgo.Application, error) { ret := _m.Called(ap) + if len(ret) == 0 { + panic("no return value specified for ApplicationCreate") + } + var r0 *discordgo.Application var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Application) (*discordgo.Application, error)); ok { @@ -420,6 +480,10 @@ func (_m *ISession) ApplicationCreate(ap *discordgo.Application) (*discordgo.App func (_m *ISession) ApplicationDelete(appID string) error { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for ApplicationDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(appID) @@ -434,6 +498,10 @@ func (_m *ISession) ApplicationDelete(appID string) error { func (_m *ISession) ApplicationRoleConnectionMetadata(appID string) ([]*discordgo.ApplicationRoleConnectionMetadata, error) { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for ApplicationRoleConnectionMetadata") + } + var r0 []*discordgo.ApplicationRoleConnectionMetadata var r1 error if rf, ok := ret.Get(0).(func(string) ([]*discordgo.ApplicationRoleConnectionMetadata, error)); ok { @@ -460,6 +528,10 @@ func (_m *ISession) ApplicationRoleConnectionMetadata(appID string) ([]*discordg func (_m *ISession) ApplicationRoleConnectionMetadataUpdate(appID string, metadata []*discordgo.ApplicationRoleConnectionMetadata) ([]*discordgo.ApplicationRoleConnectionMetadata, error) { ret := _m.Called(appID, metadata) + if len(ret) == 0 { + panic("no return value specified for ApplicationRoleConnectionMetadataUpdate") + } + var r0 []*discordgo.ApplicationRoleConnectionMetadata var r1 error if rf, ok := ret.Get(0).(func(string, []*discordgo.ApplicationRoleConnectionMetadata) ([]*discordgo.ApplicationRoleConnectionMetadata, error)); ok { @@ -486,6 +558,10 @@ func (_m *ISession) ApplicationRoleConnectionMetadataUpdate(appID string, metada func (_m *ISession) ApplicationUpdate(appID string, ap *discordgo.Application) (*discordgo.Application, error) { ret := _m.Called(appID, ap) + if len(ret) == 0 { + panic("no return value specified for ApplicationUpdate") + } + var r0 *discordgo.Application var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.Application) (*discordgo.Application, error)); ok { @@ -512,6 +588,10 @@ func (_m *ISession) ApplicationUpdate(appID string, ap *discordgo.Application) ( func (_m *ISession) Applications() ([]*discordgo.Application, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Applications") + } + var r0 []*discordgo.Application var r1 error if rf, ok := ret.Get(0).(func() ([]*discordgo.Application, error)); ok { @@ -545,6 +625,10 @@ func (_m *ISession) AutoModerationRule(guildID string, ruleID string, options .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AutoModerationRule") + } + var r0 *discordgo.AutoModerationRule var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.AutoModerationRule, error)); ok { @@ -578,6 +662,10 @@ func (_m *ISession) AutoModerationRuleCreate(guildID string, rule *discordgo.Aut _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AutoModerationRuleCreate") + } + var r0 *discordgo.AutoModerationRule var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.AutoModerationRule, ...discordgo.RequestOption) (*discordgo.AutoModerationRule, error)); ok { @@ -611,6 +699,10 @@ func (_m *ISession) AutoModerationRuleDelete(guildID string, ruleID string, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AutoModerationRuleDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, ruleID, options...) @@ -632,6 +724,10 @@ func (_m *ISession) AutoModerationRuleEdit(guildID string, ruleID string, rule * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AutoModerationRuleEdit") + } + var r0 *discordgo.AutoModerationRule var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.AutoModerationRule, ...discordgo.RequestOption) (*discordgo.AutoModerationRule, error)); ok { @@ -665,6 +761,10 @@ func (_m *ISession) AutoModerationRules(guildID string, options ...discordgo.Req _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AutoModerationRules") + } + var r0 []*discordgo.AutoModerationRule var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.AutoModerationRule, error)); ok { @@ -698,6 +798,10 @@ func (_m *ISession) Channel(channelID string, options ...discordgo.RequestOption _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Channel") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -731,6 +835,10 @@ func (_m *ISession) ChannelDelete(channelID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelDelete") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -764,6 +872,10 @@ func (_m *ISession) ChannelEdit(channelID string, data *discordgo.ChannelEdit, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelEdit") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.ChannelEdit, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -797,6 +909,10 @@ func (_m *ISession) ChannelEditComplex(channelID string, data *discordgo.Channel _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelEditComplex") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.ChannelEdit, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -830,6 +946,10 @@ func (_m *ISession) ChannelFileSend(channelID string, name string, r io.Reader, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelFileSend") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, io.Reader, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -863,6 +983,10 @@ func (_m *ISession) ChannelFileSendWithMessage(channelID string, content string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelFileSendWithMessage") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, string, io.Reader, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -896,6 +1020,10 @@ func (_m *ISession) ChannelInviteCreate(channelID string, i discordgo.Invite, op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelInviteCreate") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, discordgo.Invite, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -929,6 +1057,10 @@ func (_m *ISession) ChannelInvites(channelID string, options ...discordgo.Reques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelInvites") + } + var r0 []*discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Invite, error)); ok { @@ -962,6 +1094,10 @@ func (_m *ISession) ChannelMessage(channelID string, messageID string, options . _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessage") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -995,6 +1131,10 @@ func (_m *ISession) ChannelMessageCrosspost(channelID string, messageID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageCrosspost") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1028,6 +1168,10 @@ func (_m *ISession) ChannelMessageDelete(channelID string, messageID string, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, options...) @@ -1049,6 +1193,10 @@ func (_m *ISession) ChannelMessageEdit(channelID string, messageID string, conte _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageEdit") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1082,6 +1230,10 @@ func (_m *ISession) ChannelMessageEditComplex(m *discordgo.MessageEdit, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageEditComplex") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(*discordgo.MessageEdit, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1115,6 +1267,10 @@ func (_m *ISession) ChannelMessageEditEmbed(channelID string, messageID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageEditEmbed") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1148,6 +1304,10 @@ func (_m *ISession) ChannelMessageEditEmbeds(channelID string, messageID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageEditEmbeds") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, []*discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1181,6 +1341,10 @@ func (_m *ISession) ChannelMessagePin(channelID string, messageID string, option _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessagePin") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, options...) @@ -1202,6 +1366,10 @@ func (_m *ISession) ChannelMessageSend(channelID string, content string, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSend") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1235,6 +1403,10 @@ func (_m *ISession) ChannelMessageSendComplex(channelID string, data *discordgo. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendComplex") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.MessageSend, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1268,6 +1440,10 @@ func (_m *ISession) ChannelMessageSendEmbed(channelID string, embed *discordgo.M _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendEmbed") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1301,6 +1477,10 @@ func (_m *ISession) ChannelMessageSendEmbedReply(channelID string, embed *discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendEmbedReply") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.MessageEmbed, *discordgo.MessageReference, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1334,6 +1514,10 @@ func (_m *ISession) ChannelMessageSendEmbeds(channelID string, embeds []*discord _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendEmbeds") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, []*discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1367,6 +1551,10 @@ func (_m *ISession) ChannelMessageSendEmbedsReply(channelID string, embeds []*di _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendEmbedsReply") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, []*discordgo.MessageEmbed, *discordgo.MessageReference, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1400,6 +1588,10 @@ func (_m *ISession) ChannelMessageSendReply(channelID string, content string, re _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendReply") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.MessageReference, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1433,6 +1625,10 @@ func (_m *ISession) ChannelMessageSendTTS(channelID string, content string, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageSendTTS") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1466,6 +1662,10 @@ func (_m *ISession) ChannelMessageUnpin(channelID string, messageID string, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessageUnpin") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, options...) @@ -1487,6 +1687,10 @@ func (_m *ISession) ChannelMessages(channelID string, limit int, beforeID string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessages") + } + var r0 []*discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, int, string, string, string, ...discordgo.RequestOption) ([]*discordgo.Message, error)); ok { @@ -1520,6 +1724,10 @@ func (_m *ISession) ChannelMessagesBulkDelete(channelID string, messages []strin _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessagesBulkDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messages, options...) @@ -1541,6 +1749,10 @@ func (_m *ISession) ChannelMessagesPinned(channelID string, options ...discordgo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelMessagesPinned") + } + var r0 []*discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Message, error)); ok { @@ -1574,6 +1786,10 @@ func (_m *ISession) ChannelNewsFollow(channelID string, targetID string, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelNewsFollow") + } + var r0 *discordgo.ChannelFollow var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.ChannelFollow, error)); ok { @@ -1607,6 +1823,10 @@ func (_m *ISession) ChannelPermissionDelete(channelID string, targetID string, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelPermissionDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, targetID, options...) @@ -1628,6 +1848,10 @@ func (_m *ISession) ChannelPermissionSet(channelID string, targetID string, targ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelPermissionSet") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, discordgo.PermissionOverwriteType, int64, int64, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, targetID, targetType, allow, deny, options...) @@ -1649,6 +1873,10 @@ func (_m *ISession) ChannelTyping(channelID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelTyping") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, options...) @@ -1663,6 +1891,10 @@ func (_m *ISession) ChannelTyping(channelID string, options ...discordgo.Request func (_m *ISession) ChannelVoiceJoin(gID string, cID string, mute bool, deaf bool) (*discordgo.VoiceConnection, error) { ret := _m.Called(gID, cID, mute, deaf) + if len(ret) == 0 { + panic("no return value specified for ChannelVoiceJoin") + } + var r0 *discordgo.VoiceConnection var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, bool) (*discordgo.VoiceConnection, error)); ok { @@ -1689,6 +1921,10 @@ func (_m *ISession) ChannelVoiceJoin(gID string, cID string, mute bool, deaf boo func (_m *ISession) ChannelVoiceJoinManual(gID string, cID string, mute bool, deaf bool) error { ret := _m.Called(gID, cID, mute, deaf) + if len(ret) == 0 { + panic("no return value specified for ChannelVoiceJoinManual") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, bool, bool) error); ok { r0 = rf(gID, cID, mute, deaf) @@ -1710,6 +1946,10 @@ func (_m *ISession) ChannelWebhooks(channelID string, options ...discordgo.Reque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ChannelWebhooks") + } + var r0 []*discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Webhook, error)); ok { @@ -1736,6 +1976,10 @@ func (_m *ISession) ChannelWebhooks(channelID string, options ...discordgo.Reque func (_m *ISession) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1750,6 +1994,10 @@ func (_m *ISession) Close() error { func (_m *ISession) CloseWithCode(closeCode int) error { ret := _m.Called(closeCode) + if len(ret) == 0 { + panic("no return value specified for CloseWithCode") + } + var r0 error if rf, ok := ret.Get(0).(func(int) error); ok { r0 = rf(closeCode) @@ -1771,6 +2019,10 @@ func (_m *ISession) FollowupMessageCreate(interaction *discordgo.Interaction, wa _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FollowupMessageCreate") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, bool, *discordgo.WebhookParams, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1804,6 +2056,10 @@ func (_m *ISession) FollowupMessageDelete(interaction *discordgo.Interaction, me _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FollowupMessageDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, string, ...discordgo.RequestOption) error); ok { r0 = rf(interaction, messageID, options...) @@ -1825,6 +2081,10 @@ func (_m *ISession) FollowupMessageEdit(interaction *discordgo.Interaction, mess _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FollowupMessageEdit") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, string, *discordgo.WebhookEdit, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -1858,6 +2118,10 @@ func (_m *ISession) ForumThreadStart(channelID string, name string, archiveDurat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ForumThreadStart") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, int, string, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -1891,6 +2155,10 @@ func (_m *ISession) ForumThreadStartComplex(channelID string, threadData *discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ForumThreadStartComplex") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.ThreadStart, *discordgo.MessageSend, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -1924,6 +2192,10 @@ func (_m *ISession) ForumThreadStartEmbed(channelID string, name string, archive _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ForumThreadStartEmbed") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, int, *discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -1957,6 +2229,10 @@ func (_m *ISession) ForumThreadStartEmbeds(channelID string, name string, archiv _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ForumThreadStartEmbeds") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, int, []*discordgo.MessageEmbed, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -1989,6 +2265,10 @@ func (_m *ISession) Gateway(options ...discordgo.RequestOption) (string, error) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Gateway") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(...discordgo.RequestOption) (string, error)); ok { @@ -2019,6 +2299,10 @@ func (_m *ISession) GatewayBot(options ...discordgo.RequestOption) (*discordgo.G _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GatewayBot") + } + var r0 *discordgo.GatewayBotResponse var r1 error if rf, ok := ret.Get(0).(func(...discordgo.RequestOption) (*discordgo.GatewayBotResponse, error)); ok { @@ -2052,6 +2336,10 @@ func (_m *ISession) Guild(guildID string, options ...discordgo.RequestOption) (* _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Guild") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Guild, error)); ok { @@ -2085,6 +2373,10 @@ func (_m *ISession) GuildApplicationCommandsPermissions(appID string, guildID st _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildApplicationCommandsPermissions") + } + var r0 []*discordgo.GuildApplicationCommandPermissions var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) ([]*discordgo.GuildApplicationCommandPermissions, error)); ok { @@ -2118,6 +2410,10 @@ func (_m *ISession) GuildAuditLog(guildID string, userID string, beforeID string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildAuditLog") + } + var r0 *discordgo.GuildAuditLog var r1 error if rf, ok := ret.Get(0).(func(string, string, string, int, int, ...discordgo.RequestOption) (*discordgo.GuildAuditLog, error)); ok { @@ -2151,6 +2447,10 @@ func (_m *ISession) GuildBan(guildID string, userID string, options ...discordgo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildBan") + } + var r0 *discordgo.GuildBan var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.GuildBan, error)); ok { @@ -2184,6 +2484,10 @@ func (_m *ISession) GuildBanCreate(guildID string, userID string, days int, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildBanCreate") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, days, options...) @@ -2205,6 +2509,10 @@ func (_m *ISession) GuildBanCreateWithReason(guildID string, userID string, reas _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildBanCreateWithReason") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, int, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, reason, days, options...) @@ -2226,6 +2534,10 @@ func (_m *ISession) GuildBanDelete(guildID string, userID string, options ...dis _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildBanDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, options...) @@ -2247,6 +2559,10 @@ func (_m *ISession) GuildBans(guildID string, limit int, beforeID string, afterI _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildBans") + } + var r0 []*discordgo.GuildBan var r1 error if rf, ok := ret.Get(0).(func(string, int, string, string, ...discordgo.RequestOption) ([]*discordgo.GuildBan, error)); ok { @@ -2280,6 +2596,10 @@ func (_m *ISession) GuildChannelCreate(guildID string, name string, ctype discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildChannelCreate") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, discordgo.ChannelType, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -2313,6 +2633,10 @@ func (_m *ISession) GuildChannelCreateComplex(guildID string, data discordgo.Gui _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildChannelCreateComplex") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, discordgo.GuildChannelCreateData, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -2346,6 +2670,10 @@ func (_m *ISession) GuildChannels(guildID string, options ...discordgo.RequestOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildChannels") + } + var r0 []*discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Channel, error)); ok { @@ -2379,6 +2707,10 @@ func (_m *ISession) GuildChannelsReorder(guildID string, channels []*discordgo.C _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildChannelsReorder") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []*discordgo.Channel, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, channels, options...) @@ -2400,6 +2732,10 @@ func (_m *ISession) GuildCreate(name string, options ...discordgo.RequestOption) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildCreate") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Guild, error)); ok { @@ -2433,6 +2769,10 @@ func (_m *ISession) GuildCreateWithTemplate(templateCode string, name string, ic _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildCreateWithTemplate") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.Guild, error)); ok { @@ -2466,6 +2806,10 @@ func (_m *ISession) GuildDelete(guildID string, options ...discordgo.RequestOpti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, options...) @@ -2487,6 +2831,10 @@ func (_m *ISession) GuildEdit(guildID string, g *discordgo.GuildParams, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEdit") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.GuildParams, ...discordgo.RequestOption) (*discordgo.Guild, error)); ok { @@ -2520,6 +2868,10 @@ func (_m *ISession) GuildEmbed(guildID string, options ...discordgo.RequestOptio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmbed") + } + var r0 *discordgo.GuildEmbed var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.GuildEmbed, error)); ok { @@ -2553,6 +2905,10 @@ func (_m *ISession) GuildEmbedEdit(guildID string, data *discordgo.GuildEmbed, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmbedEdit") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.GuildEmbed, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, data, options...) @@ -2574,6 +2930,10 @@ func (_m *ISession) GuildEmoji(guildID string, emojiID string, options ...discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmoji") + } + var r0 *discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Emoji, error)); ok { @@ -2607,6 +2967,10 @@ func (_m *ISession) GuildEmojiCreate(guildID string, data *discordgo.EmojiParams _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmojiCreate") + } + var r0 *discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.EmojiParams, ...discordgo.RequestOption) (*discordgo.Emoji, error)); ok { @@ -2640,6 +3004,10 @@ func (_m *ISession) GuildEmojiDelete(guildID string, emojiID string, options ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmojiDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, emojiID, options...) @@ -2661,6 +3029,10 @@ func (_m *ISession) GuildEmojiEdit(guildID string, emojiID string, data *discord _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmojiEdit") + } + var r0 *discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.EmojiParams, ...discordgo.RequestOption) (*discordgo.Emoji, error)); ok { @@ -2694,6 +3066,10 @@ func (_m *ISession) GuildEmojis(guildID string, options ...discordgo.RequestOpti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildEmojis") + } + var r0 []*discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Emoji, error)); ok { @@ -2727,6 +3103,10 @@ func (_m *ISession) GuildIcon(guildID string, options ...discordgo.RequestOption _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildIcon") + } + var r0 image.Image var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (image.Image, error)); ok { @@ -2760,6 +3140,10 @@ func (_m *ISession) GuildIntegrationCreate(guildID string, integrationType strin _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildIntegrationCreate") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, integrationType, integrationID, options...) @@ -2781,6 +3165,10 @@ func (_m *ISession) GuildIntegrationDelete(guildID string, integrationID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildIntegrationDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, integrationID, options...) @@ -2802,6 +3190,10 @@ func (_m *ISession) GuildIntegrationEdit(guildID string, integrationID string, e _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildIntegrationEdit") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int, int, bool, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, integrationID, expireBehavior, expireGracePeriod, enableEmoticons, options...) @@ -2823,6 +3215,10 @@ func (_m *ISession) GuildIntegrations(guildID string, options ...discordgo.Reque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildIntegrations") + } + var r0 []*discordgo.Integration var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Integration, error)); ok { @@ -2856,6 +3252,10 @@ func (_m *ISession) GuildInvites(guildID string, options ...discordgo.RequestOpt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildInvites") + } + var r0 []*discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Invite, error)); ok { @@ -2889,6 +3289,10 @@ func (_m *ISession) GuildLeave(guildID string, options ...discordgo.RequestOptio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildLeave") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, options...) @@ -2910,6 +3314,10 @@ func (_m *ISession) GuildMember(guildID string, userID string, options ...discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMember") + } + var r0 *discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Member, error)); ok { @@ -2943,6 +3351,10 @@ func (_m *ISession) GuildMemberAdd(guildID string, userID string, data *discordg _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberAdd") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.GuildMemberAddParams, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, data, options...) @@ -2964,6 +3376,10 @@ func (_m *ISession) GuildMemberDeafen(guildID string, userID string, deaf bool, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberDeafen") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, bool, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, deaf, options...) @@ -2985,6 +3401,10 @@ func (_m *ISession) GuildMemberDelete(guildID string, userID string, options ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, options...) @@ -3006,6 +3426,10 @@ func (_m *ISession) GuildMemberDeleteWithReason(guildID string, userID string, r _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberDeleteWithReason") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, reason, options...) @@ -3027,6 +3451,10 @@ func (_m *ISession) GuildMemberEdit(guildID string, userID string, data *discord _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberEdit") + } + var r0 *discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.GuildMemberParams, ...discordgo.RequestOption) (*discordgo.Member, error)); ok { @@ -3060,6 +3488,10 @@ func (_m *ISession) GuildMemberEditComplex(guildID string, userID string, data * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberEditComplex") + } + var r0 *discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.GuildMemberParams, ...discordgo.RequestOption) (*discordgo.Member, error)); ok { @@ -3093,6 +3525,10 @@ func (_m *ISession) GuildMemberMove(guildID string, userID string, channelID *st _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberMove") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, *string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, channelID, options...) @@ -3114,6 +3550,10 @@ func (_m *ISession) GuildMemberMute(guildID string, userID string, mute bool, op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberMute") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, bool, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, mute, options...) @@ -3135,6 +3575,10 @@ func (_m *ISession) GuildMemberNickname(guildID string, userID string, nickname _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberNickname") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, nickname, options...) @@ -3156,6 +3600,10 @@ func (_m *ISession) GuildMemberRoleAdd(guildID string, userID string, roleID str _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberRoleAdd") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, roleID, options...) @@ -3177,6 +3625,10 @@ func (_m *ISession) GuildMemberRoleRemove(guildID string, userID string, roleID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberRoleRemove") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, roleID, options...) @@ -3198,6 +3650,10 @@ func (_m *ISession) GuildMemberTimeout(guildID string, userID string, until *tim _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMemberTimeout") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, *time.Time, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, userID, until, options...) @@ -3219,6 +3675,10 @@ func (_m *ISession) GuildMembers(guildID string, after string, limit int, option _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMembers") + } + var r0 []*discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, int, ...discordgo.RequestOption) ([]*discordgo.Member, error)); ok { @@ -3252,6 +3712,10 @@ func (_m *ISession) GuildMembersSearch(guildID string, query string, limit int, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildMembersSearch") + } + var r0 []*discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, int, ...discordgo.RequestOption) ([]*discordgo.Member, error)); ok { @@ -3274,6 +3738,80 @@ func (_m *ISession) GuildMembersSearch(guildID string, query string, limit int, return r0, r1 } +// GuildOnboarding provides a mock function with given fields: guildID, options +func (_m *ISession) GuildOnboarding(guildID string, options ...discordgo.RequestOption) (*discordgo.GuildOnboarding, error) { + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] + } + var _ca []interface{} + _ca = append(_ca, guildID) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GuildOnboarding") + } + + var r0 *discordgo.GuildOnboarding + var r1 error + if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.GuildOnboarding, error)); ok { + return rf(guildID, options...) + } + if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) *discordgo.GuildOnboarding); ok { + r0 = rf(guildID, options...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*discordgo.GuildOnboarding) + } + } + + if rf, ok := ret.Get(1).(func(string, ...discordgo.RequestOption) error); ok { + r1 = rf(guildID, options...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GuildOnboardingEdit provides a mock function with given fields: guildID, o, options +func (_m *ISession) GuildOnboardingEdit(guildID string, o *discordgo.GuildOnboarding, options ...discordgo.RequestOption) (*discordgo.GuildOnboarding, error) { + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] + } + var _ca []interface{} + _ca = append(_ca, guildID, o) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GuildOnboardingEdit") + } + + var r0 *discordgo.GuildOnboarding + var r1 error + if rf, ok := ret.Get(0).(func(string, *discordgo.GuildOnboarding, ...discordgo.RequestOption) (*discordgo.GuildOnboarding, error)); ok { + return rf(guildID, o, options...) + } + if rf, ok := ret.Get(0).(func(string, *discordgo.GuildOnboarding, ...discordgo.RequestOption) *discordgo.GuildOnboarding); ok { + r0 = rf(guildID, o, options...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*discordgo.GuildOnboarding) + } + } + + if rf, ok := ret.Get(1).(func(string, *discordgo.GuildOnboarding, ...discordgo.RequestOption) error); ok { + r1 = rf(guildID, o, options...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GuildPreview provides a mock function with given fields: guildID, options func (_m *ISession) GuildPreview(guildID string, options ...discordgo.RequestOption) (*discordgo.GuildPreview, error) { _va := make([]interface{}, len(options)) @@ -3285,6 +3823,10 @@ func (_m *ISession) GuildPreview(guildID string, options ...discordgo.RequestOpt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildPreview") + } + var r0 *discordgo.GuildPreview var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.GuildPreview, error)); ok { @@ -3318,6 +3860,10 @@ func (_m *ISession) GuildPrune(guildID string, days uint32, options ...discordgo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildPrune") + } + var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(string, uint32, ...discordgo.RequestOption) (uint32, error)); ok { @@ -3349,6 +3895,10 @@ func (_m *ISession) GuildPruneCount(guildID string, days uint32, options ...disc _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildPruneCount") + } + var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(string, uint32, ...discordgo.RequestOption) (uint32, error)); ok { @@ -3380,6 +3930,10 @@ func (_m *ISession) GuildRoleCreate(guildID string, data *discordgo.RoleParams, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildRoleCreate") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.RoleParams, ...discordgo.RequestOption) (*discordgo.Role, error)); ok { @@ -3413,6 +3967,10 @@ func (_m *ISession) GuildRoleDelete(guildID string, roleID string, options ...di _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildRoleDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, roleID, options...) @@ -3434,6 +3992,10 @@ func (_m *ISession) GuildRoleEdit(guildID string, roleID string, data *discordgo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildRoleEdit") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.RoleParams, ...discordgo.RequestOption) (*discordgo.Role, error)); ok { @@ -3467,6 +4029,10 @@ func (_m *ISession) GuildRoleReorder(guildID string, roles []*discordgo.Role, op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildRoleReorder") + } + var r0 []*discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, []*discordgo.Role, ...discordgo.RequestOption) ([]*discordgo.Role, error)); ok { @@ -3500,6 +4066,10 @@ func (_m *ISession) GuildRoles(guildID string, options ...discordgo.RequestOptio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildRoles") + } + var r0 []*discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Role, error)); ok { @@ -3533,6 +4103,10 @@ func (_m *ISession) GuildScheduledEvent(guildID string, eventID string, userCoun _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEvent") + } + var r0 *discordgo.GuildScheduledEvent var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, ...discordgo.RequestOption) (*discordgo.GuildScheduledEvent, error)); ok { @@ -3566,6 +4140,10 @@ func (_m *ISession) GuildScheduledEventCreate(guildID string, event *discordgo.G _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEventCreate") + } + var r0 *discordgo.GuildScheduledEvent var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.GuildScheduledEventParams, ...discordgo.RequestOption) (*discordgo.GuildScheduledEvent, error)); ok { @@ -3599,6 +4177,10 @@ func (_m *ISession) GuildScheduledEventDelete(guildID string, eventID string, op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEventDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, eventID, options...) @@ -3620,6 +4202,10 @@ func (_m *ISession) GuildScheduledEventEdit(guildID string, eventID string, even _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEventEdit") + } + var r0 *discordgo.GuildScheduledEvent var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.GuildScheduledEventParams, ...discordgo.RequestOption) (*discordgo.GuildScheduledEvent, error)); ok { @@ -3653,6 +4239,10 @@ func (_m *ISession) GuildScheduledEventUsers(guildID string, eventID string, lim _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEventUsers") + } + var r0 []*discordgo.GuildScheduledEventUser var r1 error if rf, ok := ret.Get(0).(func(string, string, int, bool, string, string, ...discordgo.RequestOption) ([]*discordgo.GuildScheduledEventUser, error)); ok { @@ -3686,6 +4276,10 @@ func (_m *ISession) GuildScheduledEvents(guildID string, userCount bool, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildScheduledEvents") + } + var r0 []*discordgo.GuildScheduledEvent var r1 error if rf, ok := ret.Get(0).(func(string, bool, ...discordgo.RequestOption) ([]*discordgo.GuildScheduledEvent, error)); ok { @@ -3719,6 +4313,10 @@ func (_m *ISession) GuildSplash(guildID string, options ...discordgo.RequestOpti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildSplash") + } + var r0 image.Image var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (image.Image, error)); ok { @@ -3752,6 +4350,10 @@ func (_m *ISession) GuildTemplate(templateCode string, options ...discordgo.Requ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplate") + } + var r0 *discordgo.GuildTemplate var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.GuildTemplate, error)); ok { @@ -3785,6 +4387,10 @@ func (_m *ISession) GuildTemplateCreate(guildID string, data *discordgo.GuildTem _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplateCreate") + } + var r0 *discordgo.GuildTemplate if rf, ok := ret.Get(0).(func(string, *discordgo.GuildTemplateParams, ...discordgo.RequestOption) *discordgo.GuildTemplate); ok { r0 = rf(guildID, data, options...) @@ -3808,6 +4414,10 @@ func (_m *ISession) GuildTemplateDelete(guildID string, templateCode string, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplateDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, templateCode, options...) @@ -3829,6 +4439,10 @@ func (_m *ISession) GuildTemplateEdit(guildID string, templateCode string, data _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplateEdit") + } + var r0 *discordgo.GuildTemplate var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.GuildTemplateParams, ...discordgo.RequestOption) (*discordgo.GuildTemplate, error)); ok { @@ -3862,6 +4476,10 @@ func (_m *ISession) GuildTemplateSync(guildID string, templateCode string, optio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplateSync") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(guildID, templateCode, options...) @@ -3883,6 +4501,10 @@ func (_m *ISession) GuildTemplates(guildID string, options ...discordgo.RequestO _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildTemplates") + } + var r0 []*discordgo.GuildTemplate var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.GuildTemplate, error)); ok { @@ -3916,6 +4538,10 @@ func (_m *ISession) GuildThreadsActive(guildID string, options ...discordgo.Requ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildThreadsActive") + } + var r0 *discordgo.ThreadsList var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.ThreadsList, error)); ok { @@ -3949,6 +4575,10 @@ func (_m *ISession) GuildWebhooks(guildID string, options ...discordgo.RequestOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildWebhooks") + } + var r0 []*discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.Webhook, error)); ok { @@ -3982,6 +4612,10 @@ func (_m *ISession) GuildWithCounts(guildID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GuildWithCounts") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Guild, error)); ok { @@ -4008,6 +4642,10 @@ func (_m *ISession) GuildWithCounts(guildID string, options ...discordgo.Request func (_m *ISession) HeartbeatLatency() time.Duration { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for HeartbeatLatency") + } + var r0 time.Duration if rf, ok := ret.Get(0).(func() time.Duration); ok { r0 = rf() @@ -4029,6 +4667,10 @@ func (_m *ISession) InteractionRespond(interaction *discordgo.Interaction, resp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InteractionRespond") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, *discordgo.InteractionResponse, ...discordgo.RequestOption) error); ok { r0 = rf(interaction, resp, options...) @@ -4050,6 +4692,10 @@ func (_m *ISession) InteractionResponse(interaction *discordgo.Interaction, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InteractionResponse") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -4083,6 +4729,10 @@ func (_m *ISession) InteractionResponseDelete(interaction *discordgo.Interaction _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InteractionResponseDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, ...discordgo.RequestOption) error); ok { r0 = rf(interaction, options...) @@ -4104,6 +4754,10 @@ func (_m *ISession) InteractionResponseEdit(interaction *discordgo.Interaction, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InteractionResponseEdit") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Interaction, *discordgo.WebhookEdit, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -4137,6 +4791,10 @@ func (_m *ISession) Invite(inviteID string, options ...discordgo.RequestOption) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Invite") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -4170,6 +4828,10 @@ func (_m *ISession) InviteAccept(inviteID string, options ...discordgo.RequestOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InviteAccept") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -4203,6 +4865,10 @@ func (_m *ISession) InviteComplex(inviteID string, guildScheduledEventID string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InviteComplex") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, bool, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -4236,6 +4902,10 @@ func (_m *ISession) InviteDelete(inviteID string, options ...discordgo.RequestOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InviteDelete") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -4269,6 +4939,10 @@ func (_m *ISession) InviteWithCounts(inviteID string, options ...discordgo.Reque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InviteWithCounts") + } + var r0 *discordgo.Invite var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Invite, error)); ok { @@ -4302,6 +4976,10 @@ func (_m *ISession) MessageReactionAdd(channelID string, messageID string, emoji _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageReactionAdd") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, emojiID, options...) @@ -4323,6 +5001,10 @@ func (_m *ISession) MessageReactionRemove(channelID string, messageID string, em _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageReactionRemove") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, emojiID, userID, options...) @@ -4344,6 +5026,10 @@ func (_m *ISession) MessageReactions(channelID string, messageID string, emojiID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageReactions") + } + var r0 []*discordgo.User var r1 error if rf, ok := ret.Get(0).(func(string, string, string, int, string, string, ...discordgo.RequestOption) ([]*discordgo.User, error)); ok { @@ -4377,6 +5063,10 @@ func (_m *ISession) MessageReactionsRemoveAll(channelID string, messageID string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageReactionsRemoveAll") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, options...) @@ -4398,6 +5088,10 @@ func (_m *ISession) MessageReactionsRemoveEmoji(channelID string, messageID stri _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageReactionsRemoveEmoji") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, messageID, emojiID, options...) @@ -4419,6 +5113,10 @@ func (_m *ISession) MessageThreadStart(channelID string, messageID string, name _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageThreadStart") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, string, int, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -4452,6 +5150,10 @@ func (_m *ISession) MessageThreadStartComplex(channelID string, messageID string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MessageThreadStartComplex") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.ThreadStart, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -4478,6 +5180,10 @@ func (_m *ISession) MessageThreadStartComplex(channelID string, messageID string func (_m *ISession) Open() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Open") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -4499,6 +5205,10 @@ func (_m *ISession) Request(method string, urlStr string, data interface{}, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Request") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(string, string, interface{}, ...discordgo.RequestOption) ([]byte, error)); ok { @@ -4525,6 +5235,10 @@ func (_m *ISession) Request(method string, urlStr string, data interface{}, opti func (_m *ISession) RequestGuildMembers(guildID string, query string, limit int, nonce string, presences bool) error { ret := _m.Called(guildID, query, limit, nonce, presences) + if len(ret) == 0 { + panic("no return value specified for RequestGuildMembers") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int, string, bool) error); ok { r0 = rf(guildID, query, limit, nonce, presences) @@ -4539,6 +5253,10 @@ func (_m *ISession) RequestGuildMembers(guildID string, query string, limit int, func (_m *ISession) RequestGuildMembersBatch(guildIDs []string, query string, limit int, nonce string, presences bool) error { ret := _m.Called(guildIDs, query, limit, nonce, presences) + if len(ret) == 0 { + panic("no return value specified for RequestGuildMembersBatch") + } + var r0 error if rf, ok := ret.Get(0).(func([]string, string, int, string, bool) error); ok { r0 = rf(guildIDs, query, limit, nonce, presences) @@ -4553,6 +5271,10 @@ func (_m *ISession) RequestGuildMembersBatch(guildIDs []string, query string, li func (_m *ISession) RequestGuildMembersBatchList(guildIDs []string, userIDs []string, limit int, nonce string, presences bool) error { ret := _m.Called(guildIDs, userIDs, limit, nonce, presences) + if len(ret) == 0 { + panic("no return value specified for RequestGuildMembersBatchList") + } + var r0 error if rf, ok := ret.Get(0).(func([]string, []string, int, string, bool) error); ok { r0 = rf(guildIDs, userIDs, limit, nonce, presences) @@ -4567,6 +5289,10 @@ func (_m *ISession) RequestGuildMembersBatchList(guildIDs []string, userIDs []st func (_m *ISession) RequestGuildMembersList(guildID string, userIDs []string, limit int, nonce string, presences bool) error { ret := _m.Called(guildID, userIDs, limit, nonce, presences) + if len(ret) == 0 { + panic("no return value specified for RequestGuildMembersList") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []string, int, string, bool) error); ok { r0 = rf(guildID, userIDs, limit, nonce, presences) @@ -4588,6 +5314,10 @@ func (_m *ISession) RequestWithBucketID(method string, urlStr string, data inter _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RequestWithBucketID") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(string, string, interface{}, string, ...discordgo.RequestOption) ([]byte, error)); ok { @@ -4621,6 +5351,10 @@ func (_m *ISession) RequestWithLockedBucket(method string, urlStr string, conten _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RequestWithLockedBucket") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(string, string, string, []byte, *discordgo.Bucket, int, ...discordgo.RequestOption) ([]byte, error)); ok { @@ -4654,6 +5388,10 @@ func (_m *ISession) StageInstance(channelID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StageInstance") + } + var r0 *discordgo.StageInstance var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.StageInstance, error)); ok { @@ -4687,6 +5425,10 @@ func (_m *ISession) StageInstanceCreate(data *discordgo.StageInstanceParams, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StageInstanceCreate") + } + var r0 *discordgo.StageInstance var r1 error if rf, ok := ret.Get(0).(func(*discordgo.StageInstanceParams, ...discordgo.RequestOption) (*discordgo.StageInstance, error)); ok { @@ -4720,6 +5462,10 @@ func (_m *ISession) StageInstanceDelete(channelID string, options ...discordgo.R _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StageInstanceDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(channelID, options...) @@ -4741,6 +5487,10 @@ func (_m *ISession) StageInstanceEdit(channelID string, data *discordgo.StageIns _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StageInstanceEdit") + } + var r0 *discordgo.StageInstance var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.StageInstanceParams, ...discordgo.RequestOption) (*discordgo.StageInstance, error)); ok { @@ -4774,6 +5524,10 @@ func (_m *ISession) ThreadJoin(id string, options ...discordgo.RequestOption) er _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadJoin") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(id, options...) @@ -4795,6 +5549,10 @@ func (_m *ISession) ThreadLeave(id string, options ...discordgo.RequestOption) e _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadLeave") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(id, options...) @@ -4805,32 +5563,36 @@ func (_m *ISession) ThreadLeave(id string, options ...discordgo.RequestOption) e return r0 } -// ThreadMember provides a mock function with given fields: threadID, memberID, options -func (_m *ISession) ThreadMember(threadID string, memberID string, options ...discordgo.RequestOption) (*discordgo.ThreadMember, error) { +// ThreadMember provides a mock function with given fields: threadID, memberID, withMember, options +func (_m *ISession) ThreadMember(threadID string, memberID string, withMember bool, options ...discordgo.RequestOption) (*discordgo.ThreadMember, error) { _va := make([]interface{}, len(options)) for _i := range options { _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, threadID, memberID) + _ca = append(_ca, threadID, memberID, withMember) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadMember") + } + var r0 *discordgo.ThreadMember var r1 error - if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.ThreadMember, error)); ok { - return rf(threadID, memberID, options...) + if rf, ok := ret.Get(0).(func(string, string, bool, ...discordgo.RequestOption) (*discordgo.ThreadMember, error)); ok { + return rf(threadID, memberID, withMember, options...) } - if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) *discordgo.ThreadMember); ok { - r0 = rf(threadID, memberID, options...) + if rf, ok := ret.Get(0).(func(string, string, bool, ...discordgo.RequestOption) *discordgo.ThreadMember); ok { + r0 = rf(threadID, memberID, withMember, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*discordgo.ThreadMember) } } - if rf, ok := ret.Get(1).(func(string, string, ...discordgo.RequestOption) error); ok { - r1 = rf(threadID, memberID, options...) + if rf, ok := ret.Get(1).(func(string, string, bool, ...discordgo.RequestOption) error); ok { + r1 = rf(threadID, memberID, withMember, options...) } else { r1 = ret.Error(1) } @@ -4849,6 +5611,10 @@ func (_m *ISession) ThreadMemberAdd(threadID string, memberID string, options .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadMemberAdd") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(threadID, memberID, options...) @@ -4870,6 +5636,10 @@ func (_m *ISession) ThreadMemberRemove(threadID string, memberID string, options _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadMemberRemove") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) error); ok { r0 = rf(threadID, memberID, options...) @@ -4880,32 +5650,36 @@ func (_m *ISession) ThreadMemberRemove(threadID string, memberID string, options return r0 } -// ThreadMembers provides a mock function with given fields: threadID, options -func (_m *ISession) ThreadMembers(threadID string, options ...discordgo.RequestOption) ([]*discordgo.ThreadMember, error) { +// ThreadMembers provides a mock function with given fields: threadID, limit, withMember, afterID, options +func (_m *ISession) ThreadMembers(threadID string, limit int, withMember bool, afterID string, options ...discordgo.RequestOption) ([]*discordgo.ThreadMember, error) { _va := make([]interface{}, len(options)) for _i := range options { _va[_i] = options[_i] } var _ca []interface{} - _ca = append(_ca, threadID) + _ca = append(_ca, threadID, limit, withMember, afterID) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadMembers") + } + var r0 []*discordgo.ThreadMember var r1 error - if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) ([]*discordgo.ThreadMember, error)); ok { - return rf(threadID, options...) + if rf, ok := ret.Get(0).(func(string, int, bool, string, ...discordgo.RequestOption) ([]*discordgo.ThreadMember, error)); ok { + return rf(threadID, limit, withMember, afterID, options...) } - if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) []*discordgo.ThreadMember); ok { - r0 = rf(threadID, options...) + if rf, ok := ret.Get(0).(func(string, int, bool, string, ...discordgo.RequestOption) []*discordgo.ThreadMember); ok { + r0 = rf(threadID, limit, withMember, afterID, options...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*discordgo.ThreadMember) } } - if rf, ok := ret.Get(1).(func(string, ...discordgo.RequestOption) error); ok { - r1 = rf(threadID, options...) + if rf, ok := ret.Get(1).(func(string, int, bool, string, ...discordgo.RequestOption) error); ok { + r1 = rf(threadID, limit, withMember, afterID, options...) } else { r1 = ret.Error(1) } @@ -4924,6 +5698,10 @@ func (_m *ISession) ThreadStart(channelID string, name string, typ discordgo.Cha _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadStart") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, string, discordgo.ChannelType, int, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -4957,6 +5735,10 @@ func (_m *ISession) ThreadStartComplex(channelID string, data *discordgo.ThreadS _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadStartComplex") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.ThreadStart, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -4990,6 +5772,10 @@ func (_m *ISession) ThreadsActive(channelID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadsActive") + } + var r0 *discordgo.ThreadsList var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.ThreadsList, error)); ok { @@ -5023,6 +5809,10 @@ func (_m *ISession) ThreadsArchived(channelID string, before *time.Time, limit i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadsArchived") + } + var r0 *discordgo.ThreadsList var r1 error if rf, ok := ret.Get(0).(func(string, *time.Time, int, ...discordgo.RequestOption) (*discordgo.ThreadsList, error)); ok { @@ -5056,6 +5846,10 @@ func (_m *ISession) ThreadsPrivateArchived(channelID string, before *time.Time, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadsPrivateArchived") + } + var r0 *discordgo.ThreadsList var r1 error if rf, ok := ret.Get(0).(func(string, *time.Time, int, ...discordgo.RequestOption) (*discordgo.ThreadsList, error)); ok { @@ -5089,6 +5883,10 @@ func (_m *ISession) ThreadsPrivateJoinedArchived(channelID string, before *time. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ThreadsPrivateJoinedArchived") + } + var r0 *discordgo.ThreadsList var r1 error if rf, ok := ret.Get(0).(func(string, *time.Time, int, ...discordgo.RequestOption) (*discordgo.ThreadsList, error)); ok { @@ -5111,10 +5909,32 @@ func (_m *ISession) ThreadsPrivateJoinedArchived(channelID string, before *time. return r0, r1 } +// UpdateCustomStatus provides a mock function with given fields: state +func (_m *ISession) UpdateCustomStatus(state string) error { + ret := _m.Called(state) + + if len(ret) == 0 { + panic("no return value specified for UpdateCustomStatus") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(state) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // UpdateGameStatus provides a mock function with given fields: idle, name func (_m *ISession) UpdateGameStatus(idle int, name string) error { ret := _m.Called(idle, name) + if len(ret) == 0 { + panic("no return value specified for UpdateGameStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(int, string) error); ok { r0 = rf(idle, name) @@ -5129,6 +5949,10 @@ func (_m *ISession) UpdateGameStatus(idle int, name string) error { func (_m *ISession) UpdateListeningStatus(name string) error { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for UpdateListeningStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(name) @@ -5143,6 +5967,10 @@ func (_m *ISession) UpdateListeningStatus(name string) error { func (_m *ISession) UpdateStatusComplex(usd discordgo.UpdateStatusData) error { ret := _m.Called(usd) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusComplex") + } + var r0 error if rf, ok := ret.Get(0).(func(discordgo.UpdateStatusData) error); ok { r0 = rf(usd) @@ -5157,6 +5985,10 @@ func (_m *ISession) UpdateStatusComplex(usd discordgo.UpdateStatusData) error { func (_m *ISession) UpdateStreamingStatus(idle int, name string, url string) error { ret := _m.Called(idle, name, url) + if len(ret) == 0 { + panic("no return value specified for UpdateStreamingStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(int, string, string) error); ok { r0 = rf(idle, name, url) @@ -5171,6 +6003,10 @@ func (_m *ISession) UpdateStreamingStatus(idle int, name string, url string) err func (_m *ISession) UpdateWatchStatus(idle int, name string) error { ret := _m.Called(idle, name) + if len(ret) == 0 { + panic("no return value specified for UpdateWatchStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(int, string) error); ok { r0 = rf(idle, name) @@ -5192,6 +6028,10 @@ func (_m *ISession) User(userID string, options ...discordgo.RequestOption) (*di _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for User") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.User, error)); ok { @@ -5218,6 +6058,10 @@ func (_m *ISession) User(userID string, options ...discordgo.RequestOption) (*di func (_m *ISession) UserApplicationRoleConnection(appID string) (*discordgo.ApplicationRoleConnection, error) { ret := _m.Called(appID) + if len(ret) == 0 { + panic("no return value specified for UserApplicationRoleConnection") + } + var r0 *discordgo.ApplicationRoleConnection var r1 error if rf, ok := ret.Get(0).(func(string) (*discordgo.ApplicationRoleConnection, error)); ok { @@ -5244,6 +6088,10 @@ func (_m *ISession) UserApplicationRoleConnection(appID string) (*discordgo.Appl func (_m *ISession) UserApplicationRoleConnectionUpdate(appID string, rconn *discordgo.ApplicationRoleConnection) (*discordgo.ApplicationRoleConnection, error) { ret := _m.Called(appID, rconn) + if len(ret) == 0 { + panic("no return value specified for UserApplicationRoleConnectionUpdate") + } + var r0 *discordgo.ApplicationRoleConnection var r1 error if rf, ok := ret.Get(0).(func(string, *discordgo.ApplicationRoleConnection) (*discordgo.ApplicationRoleConnection, error)); ok { @@ -5277,6 +6125,10 @@ func (_m *ISession) UserAvatar(userID string, options ...discordgo.RequestOption _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserAvatar") + } + var r0 image.Image var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (image.Image, error)); ok { @@ -5310,6 +6162,10 @@ func (_m *ISession) UserAvatarDecode(u *discordgo.User, options ...discordgo.Req _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserAvatarDecode") + } + var r0 image.Image var r1 error if rf, ok := ret.Get(0).(func(*discordgo.User, ...discordgo.RequestOption) (image.Image, error)); ok { @@ -5343,6 +6199,10 @@ func (_m *ISession) UserChannelCreate(recipientID string, options ...discordgo.R _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserChannelCreate") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Channel, error)); ok { @@ -5376,6 +6236,10 @@ func (_m *ISession) UserChannelPermissions(userID string, channelID string, fetc _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserChannelPermissions") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (int64, error)); ok { @@ -5406,6 +6270,10 @@ func (_m *ISession) UserConnections(options ...discordgo.RequestOption) ([]*disc _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserConnections") + } + var r0 []*discordgo.UserConnection var r1 error if rf, ok := ret.Get(0).(func(...discordgo.RequestOption) ([]*discordgo.UserConnection, error)); ok { @@ -5439,6 +6307,10 @@ func (_m *ISession) UserGuildMember(guildID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserGuildMember") + } + var r0 *discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Member, error)); ok { @@ -5472,6 +6344,10 @@ func (_m *ISession) UserGuilds(limit int, beforeID string, afterID string, optio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserGuilds") + } + var r0 []*discordgo.UserGuild var r1 error if rf, ok := ret.Get(0).(func(int, string, string, ...discordgo.RequestOption) ([]*discordgo.UserGuild, error)); ok { @@ -5505,6 +6381,10 @@ func (_m *ISession) UserUpdate(username string, avatar string, options ...discor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UserUpdate") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.User, error)); ok { @@ -5537,6 +6417,10 @@ func (_m *ISession) VoiceRegions(options ...discordgo.RequestOption) ([]*discord _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for VoiceRegions") + } + var r0 []*discordgo.VoiceRegion var r1 error if rf, ok := ret.Get(0).(func(...discordgo.RequestOption) ([]*discordgo.VoiceRegion, error)); ok { @@ -5570,6 +6454,10 @@ func (_m *ISession) Webhook(webhookID string, options ...discordgo.RequestOption _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Webhook") + } + var r0 *discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) (*discordgo.Webhook, error)); ok { @@ -5603,6 +6491,10 @@ func (_m *ISession) WebhookCreate(channelID string, name string, avatar string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookCreate") + } + var r0 *discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.Webhook, error)); ok { @@ -5636,6 +6528,10 @@ func (_m *ISession) WebhookDelete(webhookID string, options ...discordgo.Request _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...discordgo.RequestOption) error); ok { r0 = rf(webhookID, options...) @@ -5657,6 +6553,10 @@ func (_m *ISession) WebhookDeleteWithToken(webhookID string, token string, optio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookDeleteWithToken") + } + var r0 *discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Webhook, error)); ok { @@ -5690,6 +6590,10 @@ func (_m *ISession) WebhookEdit(webhookID string, name string, avatar string, ch _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookEdit") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, string, string, string, ...discordgo.RequestOption) (*discordgo.Role, error)); ok { @@ -5723,6 +6627,10 @@ func (_m *ISession) WebhookEditWithToken(webhookID string, token string, name st _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookEditWithToken") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, string, string, string, ...discordgo.RequestOption) (*discordgo.Role, error)); ok { @@ -5756,6 +6664,10 @@ func (_m *ISession) WebhookExecute(webhookID string, token string, wait bool, da _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookExecute") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, *discordgo.WebhookParams, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -5789,6 +6701,10 @@ func (_m *ISession) WebhookMessage(webhookID string, token string, messageID str _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookMessage") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -5822,6 +6738,10 @@ func (_m *ISession) WebhookMessageDelete(webhookID string, token string, message _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookMessageDelete") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, ...discordgo.RequestOption) error); ok { r0 = rf(webhookID, token, messageID, options...) @@ -5843,6 +6763,10 @@ func (_m *ISession) WebhookMessageEdit(webhookID string, token string, messageID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookMessageEdit") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, string, *discordgo.WebhookEdit, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -5876,6 +6800,10 @@ func (_m *ISession) WebhookThreadExecute(webhookID string, token string, wait bo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookThreadExecute") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string, bool, string, *discordgo.WebhookParams, ...discordgo.RequestOption) (*discordgo.Message, error)); ok { @@ -5909,6 +6837,10 @@ func (_m *ISession) WebhookWithToken(webhookID string, token string, options ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WebhookWithToken") + } + var r0 *discordgo.Webhook var r1 error if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Webhook, error)); ok { @@ -5931,13 +6863,12 @@ func (_m *ISession) WebhookWithToken(webhookID string, token string, options ... return r0, r1 } -type mockConstructorTestingTNewISession interface { +// NewISession creates a new instance of ISession. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewISession(t interface { mock.TestingT Cleanup(func()) -} - -// NewISession creates a new instance of ISession. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewISession(t mockConstructorTestingTNewISession) *ISession { +}) *ISession { mock := &ISession{} mock.Mock.Test(t) diff --git a/mocks/IState.go b/mocks/IState.go index b5b23ad8..63cf4c7e 100644 --- a/mocks/IState.go +++ b/mocks/IState.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type IState struct { func (_m *IState) Channel(id string) (*discordgo.Channel, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for Channel") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string) (*discordgo.Channel, error)); ok { @@ -51,6 +55,10 @@ func (_m *IState) Channels(guildID string, forceFetch ...bool) ([]*discordgo.Cha _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Channels") + } + var r0 []*discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) ([]*discordgo.Channel, error)); ok { @@ -77,6 +85,10 @@ func (_m *IState) Channels(guildID string, forceFetch ...bool) ([]*discordgo.Cha func (_m *IState) Emoji(guildID string, emojiID string) (*discordgo.Emoji, error) { ret := _m.Called(guildID, emojiID) + if len(ret) == 0 { + panic("no return value specified for Emoji") + } + var r0 *discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, string) (*discordgo.Emoji, error)); ok { @@ -110,6 +122,10 @@ func (_m *IState) Emojis(guildID string, forceFetch ...bool) ([]*discordgo.Emoji _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Emojis") + } + var r0 []*discordgo.Emoji var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) ([]*discordgo.Emoji, error)); ok { @@ -142,6 +158,10 @@ func (_m *IState) Flush(subKeys ...string) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func(...string) error); ok { r0 = rf(subKeys...) @@ -163,6 +183,10 @@ func (_m *IState) Guild(id string, hydrate ...bool) (*discordgo.Guild, error) { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Guild") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) (*discordgo.Guild, error)); ok { @@ -189,6 +213,10 @@ func (_m *IState) Guild(id string, hydrate ...bool) (*discordgo.Guild, error) { func (_m *IState) Guilds() ([]*discordgo.Guild, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Guilds") + } + var r0 []*discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func() ([]*discordgo.Guild, error)); ok { @@ -222,6 +250,10 @@ func (_m *IState) Member(guildID string, memberID string, forceNoFetch ...bool) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Member") + } + var r0 *discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, ...bool) (*discordgo.Member, error)); ok { @@ -255,6 +287,10 @@ func (_m *IState) Members(guildID string, forceFetch ...bool) ([]*discordgo.Memb _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Members") + } + var r0 []*discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) ([]*discordgo.Member, error)); ok { @@ -288,6 +324,10 @@ func (_m *IState) MembersLimit(guildID string, afterID string, limit int, forceF _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MembersLimit") + } + var r0 []*discordgo.Member var r1 error if rf, ok := ret.Get(0).(func(string, string, int, ...bool) ([]*discordgo.Member, error)); ok { @@ -314,6 +354,10 @@ func (_m *IState) MembersLimit(guildID string, afterID string, limit int, forceF func (_m *IState) Message(channelID string, messageID string) (*discordgo.Message, error) { ret := _m.Called(channelID, messageID) + if len(ret) == 0 { + panic("no return value specified for Message") + } + var r0 *discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, string) (*discordgo.Message, error)); ok { @@ -347,6 +391,10 @@ func (_m *IState) Messages(channelID string, forceFetch ...bool) ([]*discordgo.M _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Messages") + } + var r0 []*discordgo.Message var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) ([]*discordgo.Message, error)); ok { @@ -373,6 +421,10 @@ func (_m *IState) Messages(channelID string, forceFetch ...bool) ([]*discordgo.M func (_m *IState) Presence(guildID string, userID string) (*discordgo.Presence, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for Presence") + } + var r0 *discordgo.Presence var r1 error if rf, ok := ret.Get(0).(func(string, string) (*discordgo.Presence, error)); ok { @@ -399,6 +451,10 @@ func (_m *IState) Presence(guildID string, userID string) (*discordgo.Presence, func (_m *IState) Presences(guildID string) ([]*discordgo.Presence, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for Presences") + } + var r0 []*discordgo.Presence var r1 error if rf, ok := ret.Get(0).(func(string) ([]*discordgo.Presence, error)); ok { @@ -425,6 +481,10 @@ func (_m *IState) Presences(guildID string) ([]*discordgo.Presence, error) { func (_m *IState) Publish(channel string, payload interface{}) error { ret := _m.Called(channel, payload) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(string, interface{}) error); ok { r0 = rf(channel, payload) @@ -439,6 +499,10 @@ func (_m *IState) Publish(channel string, payload interface{}) error { func (_m *IState) ReleaseShard(pool int, id int) error { ret := _m.Called(pool, id) + if len(ret) == 0 { + panic("no return value specified for ReleaseShard") + } + var r0 error if rf, ok := ret.Get(0).(func(int, int) error); ok { r0 = rf(pool, id) @@ -460,6 +524,10 @@ func (_m *IState) RemoveChannel(id string, dehydrate ...bool) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...bool) error); ok { r0 = rf(id, dehydrate...) @@ -474,6 +542,10 @@ func (_m *IState) RemoveChannel(id string, dehydrate ...bool) error { func (_m *IState) RemoveEmoji(guildID string, emojiID string) error { ret := _m.Called(guildID, emojiID) + if len(ret) == 0 { + panic("no return value specified for RemoveEmoji") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, emojiID) @@ -495,6 +567,10 @@ func (_m *IState) RemoveGuild(id string, dehydrate ...bool) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveGuild") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...bool) error); ok { r0 = rf(id, dehydrate...) @@ -509,6 +585,10 @@ func (_m *IState) RemoveGuild(id string, dehydrate ...bool) error { func (_m *IState) RemoveMember(guildID string, memberID string) error { ret := _m.Called(guildID, memberID) + if len(ret) == 0 { + panic("no return value specified for RemoveMember") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, memberID) @@ -523,6 +603,10 @@ func (_m *IState) RemoveMember(guildID string, memberID string) error { func (_m *IState) RemoveMessage(channelID string, messageID string) error { ret := _m.Called(channelID, messageID) + if len(ret) == 0 { + panic("no return value specified for RemoveMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(channelID, messageID) @@ -537,6 +621,10 @@ func (_m *IState) RemoveMessage(channelID string, messageID string) error { func (_m *IState) RemovePresence(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for RemovePresence") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -551,6 +639,10 @@ func (_m *IState) RemovePresence(guildID string, userID string) error { func (_m *IState) RemoveRole(guildID string, roleID string) error { ret := _m.Called(guildID, roleID) + if len(ret) == 0 { + panic("no return value specified for RemoveRole") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, roleID) @@ -565,6 +657,10 @@ func (_m *IState) RemoveRole(guildID string, roleID string) error { func (_m *IState) RemoveUser(id string) error { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for RemoveUser") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(id) @@ -579,6 +675,10 @@ func (_m *IState) RemoveUser(id string) error { func (_m *IState) RemoveVoiceState(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for RemoveVoiceState") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -600,6 +700,10 @@ func (_m *IState) ReserveShard(pool int, cid ...int) (int, error) { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ReserveShard") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(int, ...int) (int, error)); ok { @@ -624,6 +728,10 @@ func (_m *IState) ReserveShard(pool int, cid ...int) (int, error) { func (_m *IState) Role(guildID string, roleID string) (*discordgo.Role, error) { ret := _m.Called(guildID, roleID) + if len(ret) == 0 { + panic("no return value specified for Role") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, string) (*discordgo.Role, error)); ok { @@ -657,6 +765,10 @@ func (_m *IState) Roles(guildID string, forceFetch ...bool) ([]*discordgo.Role, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Roles") + } + var r0 []*discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(string, ...bool) ([]*discordgo.Role, error)); ok { @@ -683,6 +795,10 @@ func (_m *IState) Roles(guildID string, forceFetch ...bool) ([]*discordgo.Role, func (_m *IState) SelfUser() (*discordgo.User, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SelfUser") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func() (*discordgo.User, error)); ok { @@ -709,6 +825,10 @@ func (_m *IState) SelfUser() (*discordgo.User, error) { func (_m *IState) SetChannel(channel *discordgo.Channel) error { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for SetChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Channel) error); ok { r0 = rf(channel) @@ -723,6 +843,10 @@ func (_m *IState) SetChannel(channel *discordgo.Channel) error { func (_m *IState) SetEmoji(guildID string, emoji *discordgo.Emoji) error { ret := _m.Called(guildID, emoji) + if len(ret) == 0 { + panic("no return value specified for SetEmoji") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.Emoji) error); ok { r0 = rf(guildID, emoji) @@ -737,6 +861,10 @@ func (_m *IState) SetEmoji(guildID string, emoji *discordgo.Emoji) error { func (_m *IState) SetGuild(guild *discordgo.Guild) error { ret := _m.Called(guild) + if len(ret) == 0 { + panic("no return value specified for SetGuild") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Guild) error); ok { r0 = rf(guild) @@ -751,6 +879,10 @@ func (_m *IState) SetGuild(guild *discordgo.Guild) error { func (_m *IState) SetMember(guildID string, member *discordgo.Member) error { ret := _m.Called(guildID, member) + if len(ret) == 0 { + panic("no return value specified for SetMember") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.Member) error); ok { r0 = rf(guildID, member) @@ -765,6 +897,10 @@ func (_m *IState) SetMember(guildID string, member *discordgo.Member) error { func (_m *IState) SetMessage(message *discordgo.Message) error { ret := _m.Called(message) + if len(ret) == 0 { + panic("no return value specified for SetMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.Message) error); ok { r0 = rf(message) @@ -779,6 +915,10 @@ func (_m *IState) SetMessage(message *discordgo.Message) error { func (_m *IState) SetPresence(guildID string, presence *discordgo.Presence) error { ret := _m.Called(guildID, presence) + if len(ret) == 0 { + panic("no return value specified for SetPresence") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.Presence) error); ok { r0 = rf(guildID, presence) @@ -793,6 +933,10 @@ func (_m *IState) SetPresence(guildID string, presence *discordgo.Presence) erro func (_m *IState) SetRole(guildID string, role *discordgo.Role) error { ret := _m.Called(guildID, role) + if len(ret) == 0 { + panic("no return value specified for SetRole") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.Role) error); ok { r0 = rf(guildID, role) @@ -807,6 +951,10 @@ func (_m *IState) SetRole(guildID string, role *discordgo.Role) error { func (_m *IState) SetSelfUser(user *discordgo.User) error { ret := _m.Called(user) + if len(ret) == 0 { + panic("no return value specified for SetSelfUser") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.User) error); ok { r0 = rf(user) @@ -821,6 +969,10 @@ func (_m *IState) SetSelfUser(user *discordgo.User) error { func (_m *IState) SetUser(user *discordgo.User) error { ret := _m.Called(user) + if len(ret) == 0 { + panic("no return value specified for SetUser") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.User) error); ok { r0 = rf(user) @@ -835,6 +987,10 @@ func (_m *IState) SetUser(user *discordgo.User) error { func (_m *IState) SetVoiceState(guildID string, vs *discordgo.VoiceState) error { ret := _m.Called(guildID, vs) + if len(ret) == 0 { + panic("no return value specified for SetVoiceState") + } + var r0 error if rf, ok := ret.Get(0).(func(string, *discordgo.VoiceState) error); ok { r0 = rf(guildID, vs) @@ -849,6 +1005,10 @@ func (_m *IState) SetVoiceState(guildID string, vs *discordgo.VoiceState) error func (_m *IState) Shards(pool int) ([]*dgrs.Shard, error) { ret := _m.Called(pool) + if len(ret) == 0 { + panic("no return value specified for Shards") + } + var r0 []*dgrs.Shard var r1 error if rf, ok := ret.Get(0).(func(int) ([]*dgrs.Shard, error)); ok { @@ -875,6 +1035,10 @@ func (_m *IState) Shards(pool int) ([]*dgrs.Shard, error) { func (_m *IState) Subscribe(channel string, handler func(func(interface{}) error)) func() error { ret := _m.Called(channel, handler) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 func() error if rf, ok := ret.Get(0).(func(string, func(func(interface{}) error)) func() error); ok { r0 = rf(channel, handler) @@ -891,6 +1055,10 @@ func (_m *IState) Subscribe(channel string, handler func(func(interface{}) error func (_m *IState) SubscribeDMs(handler func(*dgrs.DirectMessageEvent)) func() error { ret := _m.Called(handler) + if len(ret) == 0 { + panic("no return value specified for SubscribeDMs") + } + var r0 func() error if rf, ok := ret.Get(0).(func(func(*dgrs.DirectMessageEvent)) func() error); ok { r0 = rf(handler) @@ -907,6 +1075,10 @@ func (_m *IState) SubscribeDMs(handler func(*dgrs.DirectMessageEvent)) func() er func (_m *IState) User(id string) (*discordgo.User, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for User") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(string) (*discordgo.User, error)); ok { @@ -933,6 +1105,10 @@ func (_m *IState) User(id string) (*discordgo.User, error) { func (_m *IState) UserGuilds(id string) ([]string, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for UserGuilds") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { @@ -959,6 +1135,10 @@ func (_m *IState) UserGuilds(id string) ([]string, error) { func (_m *IState) Users() ([]*discordgo.User, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Users") + } + var r0 []*discordgo.User var r1 error if rf, ok := ret.Get(0).(func() ([]*discordgo.User, error)); ok { @@ -985,6 +1165,10 @@ func (_m *IState) Users() ([]*discordgo.User, error) { func (_m *IState) VoiceState(guildID string, userID string) (*discordgo.VoiceState, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for VoiceState") + } + var r0 *discordgo.VoiceState var r1 error if rf, ok := ret.Get(0).(func(string, string) (*discordgo.VoiceState, error)); ok { @@ -1011,6 +1195,10 @@ func (_m *IState) VoiceState(guildID string, userID string) (*discordgo.VoiceSta func (_m *IState) VoiceStates(guildID string) ([]*discordgo.VoiceState, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for VoiceStates") + } + var r0 []*discordgo.VoiceState var r1 error if rf, ok := ret.Get(0).(func(string) ([]*discordgo.VoiceState, error)); ok { @@ -1033,13 +1221,12 @@ func (_m *IState) VoiceStates(guildID string) ([]*discordgo.VoiceState, error) { return r0, r1 } -type mockConstructorTestingTNewIState interface { +// NewIState creates a new instance of IState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewIState(t interface { mock.TestingT Cleanup(func()) -} - -// NewIState creates a new instance of IState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIState(t mockConstructorTestingTNewIState) *IState { +}) *IState { mock := &IState{} mock.Mock.Test(t) diff --git a/mocks/KarmaProvider.go b/mocks/KarmaProvider.go index 15412b76..b0807b87 100644 --- a/mocks/KarmaProvider.go +++ b/mocks/KarmaProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type KarmaProvider struct { func (_m *KarmaProvider) ApplyPenalty(guildID string, userID string) error { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for ApplyPenalty") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(guildID, userID) @@ -31,6 +35,10 @@ func (_m *KarmaProvider) ApplyPenalty(guildID string, userID string) error { func (_m *KarmaProvider) CheckAndUpdate(guildID string, executorID string, object *discordgo.User, value int) (bool, error) { ret := _m.Called(guildID, executorID, object, value) + if len(ret) == 0 { + panic("no return value specified for CheckAndUpdate") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string, *discordgo.User, int) (bool, error)); ok { @@ -55,6 +63,10 @@ func (_m *KarmaProvider) CheckAndUpdate(guildID string, executorID string, objec func (_m *KarmaProvider) GetState(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetState") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -79,6 +91,10 @@ func (_m *KarmaProvider) GetState(guildID string) (bool, error) { func (_m *KarmaProvider) IsBlockListed(guildID string, userID string) (bool, error) { ret := _m.Called(guildID, userID) + if len(ret) == 0 { + panic("no return value specified for IsBlockListed") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { @@ -103,6 +119,10 @@ func (_m *KarmaProvider) IsBlockListed(guildID string, userID string) (bool, err func (_m *KarmaProvider) Update(guildID string, userID string, executorID string, value int) error { ret := _m.Called(guildID, userID, executorID, value) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, int) error); ok { r0 = rf(guildID, userID, executorID, value) @@ -113,13 +133,12 @@ func (_m *KarmaProvider) Update(guildID string, userID string, executorID string return r0 } -type mockConstructorTestingTNewKarmaProvider interface { +// NewKarmaProvider creates a new instance of KarmaProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewKarmaProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewKarmaProvider creates a new instance of KarmaProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKarmaProvider(t mockConstructorTestingTNewKarmaProvider) *KarmaProvider { +}) *KarmaProvider { mock := &KarmaProvider{} mock.Mock.Test(t) diff --git a/mocks/KenContext.go b/mocks/KenContext.go index c5fcbdd6..af67461b 100644 --- a/mocks/KenContext.go +++ b/mocks/KenContext.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type KenContext struct { func (_m *KenContext) Channel() (*discordgo.Channel, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Channel") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func() (*discordgo.Channel, error)); ok { @@ -44,6 +48,10 @@ func (_m *KenContext) Channel() (*discordgo.Channel, error) { func (_m *KenContext) Defer() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Defer") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -58,6 +66,10 @@ func (_m *KenContext) Defer() error { func (_m *KenContext) FollowUp(wait bool, data *discordgo.WebhookParams) *ken.FollowUpMessageBuilder { ret := _m.Called(wait, data) + if len(ret) == 0 { + panic("no return value specified for FollowUp") + } + var r0 *ken.FollowUpMessageBuilder if rf, ok := ret.Get(0).(func(bool, *discordgo.WebhookParams) *ken.FollowUpMessageBuilder); ok { r0 = rf(wait, data) @@ -74,6 +86,10 @@ func (_m *KenContext) FollowUp(wait bool, data *discordgo.WebhookParams) *ken.Fo func (_m *KenContext) FollowUpEmbed(emb *discordgo.MessageEmbed) *ken.FollowUpMessageBuilder { ret := _m.Called(emb) + if len(ret) == 0 { + panic("no return value specified for FollowUpEmbed") + } + var r0 *ken.FollowUpMessageBuilder if rf, ok := ret.Get(0).(func(*discordgo.MessageEmbed) *ken.FollowUpMessageBuilder); ok { r0 = rf(emb) @@ -90,6 +106,10 @@ func (_m *KenContext) FollowUpEmbed(emb *discordgo.MessageEmbed) *ken.FollowUpMe func (_m *KenContext) FollowUpError(content string, title string) *ken.FollowUpMessageBuilder { ret := _m.Called(content, title) + if len(ret) == 0 { + panic("no return value specified for FollowUpError") + } + var r0 *ken.FollowUpMessageBuilder if rf, ok := ret.Get(0).(func(string, string) *ken.FollowUpMessageBuilder); ok { r0 = rf(content, title) @@ -102,10 +122,34 @@ func (_m *KenContext) FollowUpError(content string, title string) *ken.FollowUpM return r0 } +// FollowUpMessage provides a mock function with given fields: message +func (_m *KenContext) FollowUpMessage(message string) *ken.FollowUpMessageBuilder { + ret := _m.Called(message) + + if len(ret) == 0 { + panic("no return value specified for FollowUpMessage") + } + + var r0 *ken.FollowUpMessageBuilder + if rf, ok := ret.Get(0).(func(string) *ken.FollowUpMessageBuilder); ok { + r0 = rf(message) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*ken.FollowUpMessageBuilder) + } + } + + return r0 +} + // Get provides a mock function with given fields: key func (_m *KenContext) Get(key string) interface{} { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 interface{} if rf, ok := ret.Get(0).(func(string) interface{}); ok { r0 = rf(key) @@ -122,6 +166,10 @@ func (_m *KenContext) Get(key string) interface{} { func (_m *KenContext) GetCommand() ken.Command { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCommand") + } + var r0 ken.Command if rf, ok := ret.Get(0).(func() ken.Command); ok { r0 = rf() @@ -138,6 +186,10 @@ func (_m *KenContext) GetCommand() ken.Command { func (_m *KenContext) GetEphemeral() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEphemeral") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -152,6 +204,10 @@ func (_m *KenContext) GetEphemeral() bool { func (_m *KenContext) GetEvent() *discordgo.InteractionCreate { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEvent") + } + var r0 *discordgo.InteractionCreate if rf, ok := ret.Get(0).(func() *discordgo.InteractionCreate); ok { r0 = rf() @@ -168,6 +224,10 @@ func (_m *KenContext) GetEvent() *discordgo.InteractionCreate { func (_m *KenContext) GetKen() *ken.Ken { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetKen") + } + var r0 *ken.Ken if rf, ok := ret.Get(0).(func() *ken.Ken); ok { r0 = rf() @@ -184,6 +244,10 @@ func (_m *KenContext) GetKen() *ken.Ken { func (_m *KenContext) GetSession() *discordgo.Session { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSession") + } + var r0 *discordgo.Session if rf, ok := ret.Get(0).(func() *discordgo.Session); ok { r0 = rf() @@ -200,6 +264,10 @@ func (_m *KenContext) GetSession() *discordgo.Session { func (_m *KenContext) Guild() (*discordgo.Guild, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Guild") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func() (*discordgo.Guild, error)); ok { @@ -223,7 +291,7 @@ func (_m *KenContext) Guild() (*discordgo.Guild, error) { } // HandleSubCommands provides a mock function with given fields: handler -func (_m *KenContext) HandleSubCommands(handler ...ken.SubCommandHandler) error { +func (_m *KenContext) HandleSubCommands(handler ...ken.CommandHandler) error { _va := make([]interface{}, len(handler)) for _i := range handler { _va[_i] = handler[_i] @@ -232,8 +300,12 @@ func (_m *KenContext) HandleSubCommands(handler ...ken.SubCommandHandler) error _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for HandleSubCommands") + } + var r0 error - if rf, ok := ret.Get(0).(func(...ken.SubCommandHandler) error); ok { + if rf, ok := ret.Get(0).(func(...ken.CommandHandler) error); ok { r0 = rf(handler...) } else { r0 = ret.Error(0) @@ -246,6 +318,10 @@ func (_m *KenContext) HandleSubCommands(handler ...ken.SubCommandHandler) error func (_m *KenContext) MessageCommand() (ken.MessageCommand, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MessageCommand") + } + var r0 ken.MessageCommand var r1 bool if rf, ok := ret.Get(0).(func() (ken.MessageCommand, bool)); ok { @@ -272,6 +348,10 @@ func (_m *KenContext) MessageCommand() (ken.MessageCommand, bool) { func (_m *KenContext) Options() ken.CommandOptions { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Options") + } + var r0 ken.CommandOptions if rf, ok := ret.Get(0).(func() ken.CommandOptions); ok { r0 = rf() @@ -284,10 +364,19 @@ func (_m *KenContext) Options() ken.CommandOptions { return r0 } +// ResetState provides a mock function with given fields: +func (_m *KenContext) ResetState() { + _m.Called() +} + // Respond provides a mock function with given fields: r func (_m *KenContext) Respond(r *discordgo.InteractionResponse) error { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for Respond") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.InteractionResponse) error); ok { r0 = rf(r) @@ -302,6 +391,10 @@ func (_m *KenContext) Respond(r *discordgo.InteractionResponse) error { func (_m *KenContext) RespondEmbed(emb *discordgo.MessageEmbed) error { ret := _m.Called(emb) + if len(ret) == 0 { + panic("no return value specified for RespondEmbed") + } + var r0 error if rf, ok := ret.Get(0).(func(*discordgo.MessageEmbed) error); ok { r0 = rf(emb) @@ -316,6 +409,10 @@ func (_m *KenContext) RespondEmbed(emb *discordgo.MessageEmbed) error { func (_m *KenContext) RespondError(content string, title string) error { ret := _m.Called(content, title) + if len(ret) == 0 { + panic("no return value specified for RespondError") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(content, title) @@ -326,6 +423,24 @@ func (_m *KenContext) RespondError(content string, title string) error { return r0 } +// RespondMessage provides a mock function with given fields: message +func (_m *KenContext) RespondMessage(message string) error { + ret := _m.Called(message) + + if len(ret) == 0 { + panic("no return value specified for RespondMessage") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(message) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // SetEphemeral provides a mock function with given fields: v func (_m *KenContext) SetEphemeral(v bool) { _m.Called(v) @@ -335,6 +450,10 @@ func (_m *KenContext) SetEphemeral(v bool) { func (_m *KenContext) SlashCommand() (ken.SlashCommand, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SlashCommand") + } + var r0 ken.SlashCommand var r1 bool if rf, ok := ret.Get(0).(func() (ken.SlashCommand, bool)); ok { @@ -361,6 +480,10 @@ func (_m *KenContext) SlashCommand() (ken.SlashCommand, bool) { func (_m *KenContext) User() *discordgo.User { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for User") + } + var r0 *discordgo.User if rf, ok := ret.Get(0).(func() *discordgo.User); ok { r0 = rf() @@ -377,6 +500,10 @@ func (_m *KenContext) User() *discordgo.User { func (_m *KenContext) UserCommand() (ken.UserCommand, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for UserCommand") + } + var r0 ken.UserCommand var r1 bool if rf, ok := ret.Get(0).(func() (ken.UserCommand, bool)); ok { @@ -399,13 +526,12 @@ func (_m *KenContext) UserCommand() (ken.UserCommand, bool) { return r0, r1 } -type mockConstructorTestingTNewKenContext interface { +// NewKenContext creates a new instance of KenContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewKenContext(t interface { mock.TestingT Cleanup(func()) -} - -// NewKenContext creates a new instance of KenContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKenContext(t mockConstructorTestingTNewKenContext) *KenContext { +}) *KenContext { mock := &KenContext{} mock.Mock.Test(t) diff --git a/mocks/KenState.go b/mocks/KenState.go index 710e1535..c5c75366 100644 --- a/mocks/KenState.go +++ b/mocks/KenState.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type KenState struct { func (_m *KenState) Channel(s *discordgo.Session, id string) (*discordgo.Channel, error) { ret := _m.Called(s, id) + if len(ret) == 0 { + panic("no return value specified for Channel") + } + var r0 *discordgo.Channel var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Session, string) (*discordgo.Channel, error)); ok { @@ -42,6 +46,10 @@ func (_m *KenState) Channel(s *discordgo.Session, id string) (*discordgo.Channel func (_m *KenState) Guild(s *discordgo.Session, id string) (*discordgo.Guild, error) { ret := _m.Called(s, id) + if len(ret) == 0 { + panic("no return value specified for Guild") + } + var r0 *discordgo.Guild var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Session, string) (*discordgo.Guild, error)); ok { @@ -68,6 +76,10 @@ func (_m *KenState) Guild(s *discordgo.Session, id string) (*discordgo.Guild, er func (_m *KenState) Role(s *discordgo.Session, gID string, id string) (*discordgo.Role, error) { ret := _m.Called(s, gID, id) + if len(ret) == 0 { + panic("no return value specified for Role") + } + var r0 *discordgo.Role var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Session, string, string) (*discordgo.Role, error)); ok { @@ -94,6 +106,10 @@ func (_m *KenState) Role(s *discordgo.Session, gID string, id string) (*discordg func (_m *KenState) SelfUser(s *discordgo.Session) (*discordgo.User, error) { ret := _m.Called(s) + if len(ret) == 0 { + panic("no return value specified for SelfUser") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Session) (*discordgo.User, error)); ok { @@ -120,6 +136,10 @@ func (_m *KenState) SelfUser(s *discordgo.Session) (*discordgo.User, error) { func (_m *KenState) User(s *discordgo.Session, id string) (*discordgo.User, error) { ret := _m.Called(s, id) + if len(ret) == 0 { + panic("no return value specified for User") + } + var r0 *discordgo.User var r1 error if rf, ok := ret.Get(0).(func(*discordgo.Session, string) (*discordgo.User, error)); ok { @@ -142,13 +162,12 @@ func (_m *KenState) User(s *discordgo.Session, id string) (*discordgo.User, erro return r0, r1 } -type mockConstructorTestingTNewKenState interface { +// NewKenState creates a new instance of KenState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewKenState(t interface { mock.TestingT Cleanup(func()) -} - -// NewKenState creates a new instance of KenState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKenState(t mockConstructorTestingTNewKenState) *KenState { +}) *KenState { mock := &KenState{} mock.Mock.Test(t) diff --git a/mocks/Logger.go b/mocks/Logger.go index 8fc65f6e..34a6d216 100644 --- a/mocks/Logger.go +++ b/mocks/Logger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ func (_m *Logger) Debugf(guildID string, message string, data ...interface{}) er _ca = append(_ca, data...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Debugf") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...interface{}) error); ok { r0 = rf(guildID, message, data...) @@ -36,6 +40,10 @@ func (_m *Logger) Errorf(guildID string, message string, data ...interface{}) er _ca = append(_ca, data...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Errorf") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...interface{}) error); ok { r0 = rf(guildID, message, data...) @@ -53,6 +61,10 @@ func (_m *Logger) Fatalf(guildID string, message string, data ...interface{}) er _ca = append(_ca, data...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Fatalf") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...interface{}) error); ok { r0 = rf(guildID, message, data...) @@ -70,6 +82,10 @@ func (_m *Logger) Infof(guildID string, message string, data ...interface{}) err _ca = append(_ca, data...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Infof") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...interface{}) error); ok { r0 = rf(guildID, message, data...) @@ -84,6 +100,10 @@ func (_m *Logger) Infof(guildID string, message string, data ...interface{}) err func (_m *Logger) Section(module string) guildlog.Logger { ret := _m.Called(module) + if len(ret) == 0 { + panic("no return value specified for Section") + } + var r0 guildlog.Logger if rf, ok := ret.Get(0).(func(string) guildlog.Logger); ok { r0 = rf(module) @@ -103,6 +123,10 @@ func (_m *Logger) Warnf(guildID string, message string, data ...interface{}) err _ca = append(_ca, data...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Warnf") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, ...interface{}) error); ok { r0 = rf(guildID, message, data...) @@ -113,13 +137,12 @@ func (_m *Logger) Warnf(guildID string, message string, data ...interface{}) err return r0 } -type mockConstructorTestingTNewLogger interface { +// NewLogger creates a new instance of Logger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewLogger(t interface { mock.TestingT Cleanup(func()) -} - -// NewLogger creates a new instance of Logger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLogger(t mockConstructorTestingTNewLogger) *Logger { +}) *Logger { mock := &Logger{} mock.Mock.Test(t) diff --git a/mocks/PermissionsProvider.go b/mocks/PermissionsProvider.go index 2b1a6915..d9fb20ce 100644 --- a/mocks/PermissionsProvider.go +++ b/mocks/PermissionsProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -22,6 +22,10 @@ type PermissionsProvider struct { func (_m *PermissionsProvider) Before(ctx *ken.Ctx) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Before") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*ken.Ctx) (bool, error)); ok { @@ -53,6 +57,10 @@ func (_m *PermissionsProvider) CheckPermissions(s discordutil.ISession, guildID _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CheckPermissions") + } + var r0 bool var r1 bool var r2 error @@ -91,6 +99,10 @@ func (_m *PermissionsProvider) CheckSubPerm(ctx ken.Context, subDN string, expli _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CheckSubPerm") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(ken.Context, string, bool, ...string) (bool, error)); ok { @@ -115,6 +127,10 @@ func (_m *PermissionsProvider) CheckSubPerm(ctx ken.Context, subDN string, expli func (_m *PermissionsProvider) GetMemberPermission(s discordutil.ISession, guildID string, memberID string) (pkgpermissions.PermissionArray, error) { ret := _m.Called(s, guildID, memberID) + if len(ret) == 0 { + panic("no return value specified for GetMemberPermission") + } + var r0 pkgpermissions.PermissionArray var r1 error if rf, ok := ret.Get(0).(func(discordutil.ISession, string, string) (pkgpermissions.PermissionArray, error)); ok { @@ -141,6 +157,10 @@ func (_m *PermissionsProvider) GetMemberPermission(s discordutil.ISession, guild func (_m *PermissionsProvider) GetPermissions(s discordutil.ISession, guildID string, userID string) (pkgpermissions.PermissionArray, bool, error) { ret := _m.Called(s, guildID, userID) + if len(ret) == 0 { + panic("no return value specified for GetPermissions") + } + var r0 pkgpermissions.PermissionArray var r1 bool var r2 error @@ -174,6 +194,10 @@ func (_m *PermissionsProvider) GetPermissions(s discordutil.ISession, guildID st func (_m *PermissionsProvider) HandleWs(s discordutil.ISession, required string) func(*fiber.Ctx) error { ret := _m.Called(s, required) + if len(ret) == 0 { + panic("no return value specified for HandleWs") + } + var r0 func(*fiber.Ctx) error if rf, ok := ret.Get(0).(func(discordutil.ISession, string) func(*fiber.Ctx) error); ok { r0 = rf(s, required) @@ -186,13 +210,12 @@ func (_m *PermissionsProvider) HandleWs(s discordutil.ISession, required string) return r0 } -type mockConstructorTestingTNewPermissionsProvider interface { +// NewPermissionsProvider creates a new instance of PermissionsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewPermissionsProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewPermissionsProvider creates a new instance of PermissionsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPermissionsProvider(t mockConstructorTestingTNewPermissionsProvider) *PermissionsProvider { +}) *PermissionsProvider { mock := &PermissionsProvider{} mock.Mock.Test(t) diff --git a/mocks/ReportProvider.go b/mocks/ReportProvider.go index aef2f94b..8c31a5f7 100644 --- a/mocks/ReportProvider.go +++ b/mocks/ReportProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type ReportProvider struct { func (_m *ReportProvider) ExpireExpiredReports() *multierror.MultiError { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExpireExpiredReports") + } + var r0 *multierror.MultiError if rf, ok := ret.Get(0).(func() *multierror.MultiError); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *ReportProvider) ExpireExpiredReports() *multierror.MultiError { func (_m *ReportProvider) ExpireLastReport(guildID string, victimID string, typ models.ReportType) error { ret := _m.Called(guildID, victimID, typ) + if len(ret) == 0 { + panic("no return value specified for ExpireLastReport") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, models.ReportType) error); ok { r0 = rf(guildID, victimID, typ) @@ -50,6 +58,10 @@ func (_m *ReportProvider) ExpireLastReport(guildID string, victimID string, typ func (_m *ReportProvider) PushBan(rep models.Report) (models.Report, error) { ret := _m.Called(rep) + if len(ret) == 0 { + panic("no return value specified for PushBan") + } + var r0 models.Report var r1 error if rf, ok := ret.Get(0).(func(models.Report) (models.Report, error)); ok { @@ -74,6 +86,10 @@ func (_m *ReportProvider) PushBan(rep models.Report) (models.Report, error) { func (_m *ReportProvider) PushKick(rep models.Report) (models.Report, error) { ret := _m.Called(rep) + if len(ret) == 0 { + panic("no return value specified for PushKick") + } + var r0 models.Report var r1 error if rf, ok := ret.Get(0).(func(models.Report) (models.Report, error)); ok { @@ -98,6 +114,10 @@ func (_m *ReportProvider) PushKick(rep models.Report) (models.Report, error) { func (_m *ReportProvider) PushMute(rep models.Report) (models.Report, error) { ret := _m.Called(rep) + if len(ret) == 0 { + panic("no return value specified for PushMute") + } + var r0 models.Report var r1 error if rf, ok := ret.Get(0).(func(models.Report) (models.Report, error)); ok { @@ -122,6 +142,10 @@ func (_m *ReportProvider) PushMute(rep models.Report) (models.Report, error) { func (_m *ReportProvider) PushReport(rep models.Report) (models.Report, error) { ret := _m.Called(rep) + if len(ret) == 0 { + panic("no return value specified for PushReport") + } + var r0 models.Report var r1 error if rf, ok := ret.Get(0).(func(models.Report) (models.Report, error)); ok { @@ -146,6 +170,10 @@ func (_m *ReportProvider) PushReport(rep models.Report) (models.Report, error) { func (_m *ReportProvider) RevokeMute(guildID string, executorID string, victimID string, reason string) (*discordgo.MessageEmbed, error) { ret := _m.Called(guildID, executorID, victimID, reason) + if len(ret) == 0 { + panic("no return value specified for RevokeMute") + } + var r0 *discordgo.MessageEmbed var r1 error if rf, ok := ret.Get(0).(func(string, string, string, string) (*discordgo.MessageEmbed, error)); ok { @@ -172,6 +200,10 @@ func (_m *ReportProvider) RevokeMute(guildID string, executorID string, victimID func (_m *ReportProvider) RevokeReport(rep models.Report, executorID string, reason string, wsPublicAddr string) (*discordgo.MessageEmbed, error) { ret := _m.Called(rep, executorID, reason, wsPublicAddr) + if len(ret) == 0 { + panic("no return value specified for RevokeReport") + } + var r0 *discordgo.MessageEmbed var r1 error if rf, ok := ret.Get(0).(func(models.Report, string, string, string) (*discordgo.MessageEmbed, error)); ok { @@ -198,6 +230,10 @@ func (_m *ReportProvider) RevokeReport(rep models.Report, executorID string, rea func (_m *ReportProvider) UnbanReport(unbanReq models.UnbanRequest, executorID string, reason string, isUnban bool) (*discordgo.MessageEmbed, error) { ret := _m.Called(unbanReq, executorID, reason, isUnban) + if len(ret) == 0 { + panic("no return value specified for UnbanReport") + } + var r0 *discordgo.MessageEmbed var r1 error if rf, ok := ret.Get(0).(func(models.UnbanRequest, string, string, bool) (*discordgo.MessageEmbed, error)); ok { @@ -220,13 +256,12 @@ func (_m *ReportProvider) UnbanReport(unbanReq models.UnbanRequest, executorID s return r0, r1 } -type mockConstructorTestingTNewReportProvider interface { +// NewReportProvider creates a new instance of ReportProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReportProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewReportProvider creates a new instance of ReportProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReportProvider(t mockConstructorTestingTNewReportProvider) *ReportProvider { +}) *ReportProvider { mock := &ReportProvider{} mock.Mock.Test(t) diff --git a/mocks/Storage.go b/mocks/Storage.go index 02499f5e..6b929c5e 100644 --- a/mocks/Storage.go +++ b/mocks/Storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type Storage struct { func (_m *Storage) BucketExists(name string) (bool, error) { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for BucketExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -43,6 +47,10 @@ func (_m *Storage) BucketExists(name string) (bool, error) { func (_m *Storage) Connect(cfg config.Provider) error { ret := _m.Called(cfg) + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 error if rf, ok := ret.Get(0).(func(config.Provider) error); ok { r0 = rf(cfg) @@ -64,6 +72,10 @@ func (_m *Storage) CreateBucket(name string, location ...string) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateBucket") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...string) error); ok { r0 = rf(name, location...) @@ -85,6 +97,10 @@ func (_m *Storage) CreateBucketIfNotExists(name string, location ...string) erro _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateBucketIfNotExists") + } + var r0 error if rf, ok := ret.Get(0).(func(string, ...string) error); ok { r0 = rf(name, location...) @@ -99,6 +115,10 @@ func (_m *Storage) CreateBucketIfNotExists(name string, location ...string) erro func (_m *Storage) DeleteObject(bucketName string, objectName string) error { ret := _m.Called(bucketName, objectName) + if len(ret) == 0 { + panic("no return value specified for DeleteObject") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(bucketName, objectName) @@ -113,6 +133,10 @@ func (_m *Storage) DeleteObject(bucketName string, objectName string) error { func (_m *Storage) GetObject(bucketName string, objectName string) (io.ReadCloser, int64, error) { ret := _m.Called(bucketName, objectName) + if len(ret) == 0 { + panic("no return value specified for GetObject") + } + var r0 io.ReadCloser var r1 int64 var r2 error @@ -146,6 +170,10 @@ func (_m *Storage) GetObject(bucketName string, objectName string) (io.ReadClose func (_m *Storage) PutObject(bucketName string, objectName string, reader io.Reader, objectSize int64, mimeType string) error { ret := _m.Called(bucketName, objectName, reader, objectSize, mimeType) + if len(ret) == 0 { + panic("no return value specified for PutObject") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, io.Reader, int64, string) error); ok { r0 = rf(bucketName, objectName, reader, objectSize, mimeType) @@ -160,6 +188,10 @@ func (_m *Storage) PutObject(bucketName string, objectName string, reader io.Rea func (_m *Storage) Status() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -170,13 +202,12 @@ func (_m *Storage) Status() error { return r0 } -type mockConstructorTestingTNewStorage interface { +// NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStorage(t interface { mock.TestingT Cleanup(func()) -} - -// NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStorage(t mockConstructorTestingTNewStorage) *Storage { +}) *Storage { mock := &Storage{} mock.Mock.Test(t) diff --git a/mocks/TimeProvider.go b/mocks/TimeProvider.go index ad8aa4ce..138649ae 100644 --- a/mocks/TimeProvider.go +++ b/mocks/TimeProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type TimeProvider struct { func (_m *TimeProvider) Now() time.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Now") + } + var r0 time.Time if rf, ok := ret.Get(0).(func() time.Time); ok { r0 = rf() @@ -27,13 +31,12 @@ func (_m *TimeProvider) Now() time.Time { return r0 } -type mockConstructorTestingTNewTimeProvider interface { +// NewTimeProvider creates a new instance of TimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTimeProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeProvider creates a new instance of TimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeProvider(t mockConstructorTestingTNewTimeProvider) *TimeProvider { +}) *TimeProvider { mock := &TimeProvider{} mock.Mock.Test(t) diff --git a/mocks/VerificationProvider.go b/mocks/VerificationProvider.go index 32e52842..b9e6ea0f 100644 --- a/mocks/VerificationProvider.go +++ b/mocks/VerificationProvider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.2. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type VerificationProvider struct { func (_m *VerificationProvider) EnqueueVerification(member discordgo.Member) error { ret := _m.Called(member) + if len(ret) == 0 { + panic("no return value specified for EnqueueVerification") + } + var r0 error if rf, ok := ret.Get(0).(func(discordgo.Member) error); ok { r0 = rf(member) @@ -30,6 +34,10 @@ func (_m *VerificationProvider) EnqueueVerification(member discordgo.Member) err func (_m *VerificationProvider) GetEnabled(guildID string) (bool, error) { ret := _m.Called(guildID) + if len(ret) == 0 { + panic("no return value specified for GetEnabled") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -54,6 +62,10 @@ func (_m *VerificationProvider) GetEnabled(guildID string) (bool, error) { func (_m *VerificationProvider) IsVerified(userID string) (bool, error) { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for IsVerified") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -83,6 +95,10 @@ func (_m *VerificationProvider) KickRoutine() { func (_m *VerificationProvider) SetEnabled(guildID string, enabled bool) error { ret := _m.Called(guildID, enabled) + if len(ret) == 0 { + panic("no return value specified for SetEnabled") + } + var r0 error if rf, ok := ret.Get(0).(func(string, bool) error); ok { r0 = rf(guildID, enabled) @@ -97,6 +113,10 @@ func (_m *VerificationProvider) SetEnabled(guildID string, enabled bool) error { func (_m *VerificationProvider) Verify(userID string) error { ret := _m.Called(userID) + if len(ret) == 0 { + panic("no return value specified for Verify") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(userID) @@ -107,13 +127,12 @@ func (_m *VerificationProvider) Verify(userID string) error { return r0 } -type mockConstructorTestingTNewVerificationProvider interface { +// NewVerificationProvider creates a new instance of VerificationProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewVerificationProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewVerificationProvider creates a new instance of VerificationProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVerificationProvider(t mockConstructorTestingTNewVerificationProvider) *VerificationProvider { +}) *VerificationProvider { mock := &VerificationProvider{} mock.Mock.Test(t)