b.Session.ChannelMessageSend(b.Message.ChannelID,fmt.Sprintf("New last bump time: <t:%+v:t>, expecting next bump at <t:%+v:t>",config.BumpTime.Unix(),config.BumpTime.Add(2*time.Hour).Unix()))
b.Session.ChannelMessageSend(b.Message.ChannelID,fmt.Sprintf("New bump time: %+v, expecting bump at %+v",config.BumpTime,config.BumpTime.Add(2*time.Hour)))
log.LogDebug("Member %+v has been updated",m.User.Username)
for_,role:=rangem.Roles{
forrole:=rangem.Roles{
iffmt.Sprintf("%+v",role)==config.MonitorRole{
log.LogDebug("Role found, Monitor Role")
s.ChannelMessageSend(config.AdminChannel,"New unverified user detected.")
s.ChannelMessageSend(config.MonitorChann,fmt.Sprintf("Welcome %+v, you may PM me your verification, or I will ban you in an hour!\nSay \"!rules\" in this channel, without quotes for the rules. You may private/direct message me for verification instructions.\n\nYou will not be able to read/see other channels or users until you verify.",m.User.Mention()))
config.Unverified[m.User.ID]=time.Now()
config.Probations[m.User.ID]=time.Now()
saveConfig()
return
}
log.LogDebug("Monitor Role not found: %+v != %+v",fmt.Sprintf("%+v",role),config.MonitorRole)
s.ChannelMessageSend(config.MonitorChann,fmt.Sprintf("Welcome %+v, you may PM me your verification, or I will ban you in an hour!\nSay \"!rules\" in this channel, without quotes for the rules. You may private/direct message me for verification instructions.\n\nYou will not be able to read/see other channels or users until you verify.",m.User.Mention()))
saveConfig()
}
@ -110,12 +105,8 @@ func readReaction(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
@@ -110,12 +105,8 @@ func readReaction(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
requestAge(s,user)
log.LogInfo("%+v has requested ASL for user %+v.",admin.User.Username,user.Username)
return
}elseifm.Emoji.Name=="🔄"{
requestReupload(s,user)
log.LogInfo("%+v has requested reupload for user %+v.",admin.User.Username,user.Username)
return
}elseifm.Emoji.Name=="⛔"{
s.GuildBanCreateWithReason(config.GuildID,user.ID,fmt.Sprintf("Underage, female, or too many failed verifications. %+v",admin.User.Username),5)
s.GuildBanCreateWithReason(config.GuildID,user.ID,fmt.Sprintf("Underage or too many failed verifications. %+v",admin.User.Username),5)
s.ChannelMessageSend(m.ChannelID,fmt.Sprintf("%+v send me a private message for verification.",m.Author.Mention()))
}
return
}
ifm.ChannelID!=config.AdminChannel{
lastActiveTime=time.Now()
iflen(m.Attachments)>0{
activeInteraction(s,m.Author.ID)
}
}
ifstrings.Contains(m.Content,"http"){
safe:=false
for_,testURL:=rangeconfig.WhitelistURLs{
ifstrings.Contains(m.Content,testURL){
safe=true
forrole:=rangem.Member.Roles{
iffmt.Sprintf("%+v",role)==config.AdminRole{
adminInteraction(s,m.Author.ID)
}
}
if!safe{
s.ChannelMessageSend(m.ChannelID,fmt.Sprintf("%+v: That domain is not approved by the admins. Please contact Admins if the domain should be whitelisted.",m.Author.Mention()))
s.ChannelMessageSend(m.ChannelID,"I specifically said to say \"!rules\" (without quotes) in the _unverified_ channel for the rules - this is a PM :) .")
s.ChannelMessageSend(m.ChannelID,"I specifically said to say \"!rules\" without quotes in the unverified channel for the rules.")
}
for_,uid:=rangeconfig.Verifications{
user:=userFromID(uid.UserID)
@ -137,14 +90,6 @@ func handlePM(s *discordgo.Session, m *discordgo.MessageCreate) {
@@ -137,14 +90,6 @@ func handlePM(s *discordgo.Session, m *discordgo.MessageCreate) {
s.ChannelMessageSend(m.ChannelID,"You have tried to send an unsupported file (HEIC). Please try again using an image (jpeg, jpg, png, etc).")
quotes=[]string{"The hardest choices require the strongest wills.","You're strong, but I could snap my fingers and you'd all cease to exist.","Fun isn't something one considers when balancing the universe. But this... does put a smile on my face.","Perfectly balanced, as all things should be.","I am inevitable."}
fmt.Sprintf("This is a reminder that you have not verified with me and will be removed at <t:%+v:t>. You may reply to this message for verification instructions.",v.Add(1*time.Hour).Unix()))
fmt.Sprintf("This is a reminder that you have not verified with me and will be removed in %+v. You may reply to this message for verification instructions.",time.Until(v.Add(1*time.Hour))))
iftime.Since(v)>(time.Hour*1){
s.ChannelMessageSend(config.AdminChannel,fmt.Sprintf("%+v was removed.",m.Mention()))
s.GuildMemberDeleteWithReason(config.GuildID,k,fmt.Sprintf("Unverified user %+v.",v))
s.ChannelMessageSend(st.ID,"Your verification has been accepted, welcome!")
log.LogDebug("Sending Intro message")
m,err:=s.ChannelMessageSend(config.IntroChann,fmt.Sprintf("Welcome %+v please introduce yourself! :) feel free to check out <#710557387937022034> to tag your roles. Also please mute any channels you are not interested in!",u.Mention()))
iferr!=nil{
log.LogErrorType(err)
}
log.LogDebug("Storing introMsg ID to be deleted later")
m,_:=s.ChannelMessageSend(config.IntroChann,fmt.Sprintf("Welcome %+v please introduce yourself! :) feel free to check out <#710557387937022034> to tag your roles. Also please mute any channels you are not interested in!",u.Mention()))
s.ChannelMessageSend(st.ID,fmt.Sprintf("Your verification has been rejected. This means it did not clearly show your face, with your pinkie finger held to the corner of your mouth, or the photo looked edited/filtered. No filters will be accepted.\n\nPlease try again before <t:%+v:t>",time.Now().Add(1*time.Hour).Unix()))
s.ChannelMessageSend(st.ID,fmt.Sprintf("Your verification has been rejected. This means it did not clearly show your face, with your pinkie finger held to the corner of your mouth, or the photo looked edited/filtered. No filters will be accepted.\n\nPlease try again before %+v",time.Until(time.Now().Add(1*time.Hour))))
s.ChannelMessageSend(st.ID,"What is your ASL? (Age/Sex/Language) Please note, this is NOT requesting your gender, but your biological sex. Gender is a social construct, sex is measurable and in the context of pornographic images more important.")
st,_:=s.UserChannelCreate(u.ID)
s.ChannelMessageSend(st.ID,"What is your ASL? (Age/Sex/Language) Please note, this is NOT requesting your gender, but your biological sex. Gender is a social construct, sex is biology and in the context of pornographic images more important.")
s.ChannelMessageSend(st.ID,"Hello! Your verification has been denied because it failed to load. Please try again! The instructions will follow this message:")