Passed
Push — master ( d2824e...c8dbbf )
by Viktor
01:38
created

bot.*Context.RemoveGreetings   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package bot
2
3
import "github.com/bwmarrin/discordgo"
4
5
func Greetings(discord *discordgo.Session, event *discordgo.GuildMemberAdd, guild *GuildData, conf *Config) {
0 ignored issues
show
introduced by
exported function Greetings should have comment or be unexported
Loading history...
6
	if guild.Greeting != "" {
7
		_, _ = discord.ChannelMessageSend(event.User.ID, guild.Greeting)
8
	}
9
}
10
11
func (ctx *Context) AddGreetings(text string) {
0 ignored issues
show
introduced by
exported method Context.AddGreetings should have comment or be unexported
Loading history...
12
	ctx.Guilds.Guilds[ctx.Guild.ID].Greeting = text
13
}
14
15
func (ctx *Context) RemoveGreetings() {
0 ignored issues
show
introduced by
exported method Context.RemoveGreetings should have comment or be unexported
Loading history...
16
	ctx.Guilds.Guilds[ctx.Guild.ID].Greeting = ""
17
}
18