add gitignore, fix same sender issue

This commit is contained in:
stryan 2022-02-05 15:47:00 -05:00
parent 5aade75594
commit ca11dbbdd4
3 changed files with 6 additions and 7 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.yaml
*.pstore
spool
.bundle

View File

@ -65,7 +65,7 @@ class Folder
message = @submissions.sample message = @submissions.sample
i = i + 1 i = i + 1
end end
if i == 5 if i == 5 or message.sender == target
return nil return nil
end end
@submissions.delete(message) @submissions.delete(message)

View File

@ -52,13 +52,8 @@ bot.message(private: true, contains: "!folder status") do |event|
end end
bot.message(private: true) do |event| bot.message(private: true) do |event|
(mem,au) = event.author sender = event.author.id
i = 1 i = 1
if mem == nil
sender = au.username
else
sender = mem.username
end
event.message.attachments.each do |file| event.message.attachments.each do |file|
res = MimeMagic.by_path(file.filename) res = MimeMagic.by_path(file.filename)
if res != nil if res != nil