add gitignore, fix same sender issue
This commit is contained in:
parent
5aade75594
commit
ca11dbbdd4
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.yaml
|
||||
*.pstore
|
||||
spool
|
||||
.bundle
|
@ -65,7 +65,7 @@ class Folder
|
||||
message = @submissions.sample
|
||||
i = i + 1
|
||||
end
|
||||
if i == 5
|
||||
if i == 5 or message.sender == target
|
||||
return nil
|
||||
end
|
||||
@submissions.delete(message)
|
||||
|
7
main.rb
7
main.rb
@ -52,13 +52,8 @@ bot.message(private: true, contains: "!folder status") do |event|
|
||||
end
|
||||
|
||||
bot.message(private: true) do |event|
|
||||
(mem,au) = event.author
|
||||
sender = event.author.id
|
||||
i = 1
|
||||
if mem == nil
|
||||
sender = au.username
|
||||
else
|
||||
sender = mem.username
|
||||
end
|
||||
event.message.attachments.each do |file|
|
||||
res = MimeMagic.by_path(file.filename)
|
||||
if res != nil
|
||||
|
Loading…
Reference in New Issue
Block a user