| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package bot |
||
| 2 | |||
| 3 | import "github.com/bwmarrin/discordgo" |
||
| 4 | |||
| 5 | func Greeting(discord *discordgo.Session, event *discordgo.GuildMemberAdd, guild *GuildData, conf *Config) { |
||
|
|
|||
| 6 | if guild.Greeting != "" { |
||
| 7 | NewEmbed(conf.GetLocaleLang("", guild.Language)) |
||
| 8 | _, _ = discord.ChannelMessageSend(event.User.ID, guild.Greeting) |
||
| 9 | } |
||
| 10 | } |
||
| 11 | |||
| 12 | func (ctx *Context) AddGreeting(text string) { |
||
| 13 | ctx.Guilds.Guilds[ctx.Guild.ID].Greeting = text |
||
| 14 | } |
||
| 15 | |||
| 16 | func (ctx *Context) RemoveGreeting() { |
||
| 17 | ctx.Guilds.Guilds[ctx.Guild.ID].Greeting = "" |
||
| 18 | } |
||
| 19 |